authorization fixed
This commit is contained in:
parent
2da2e1e502
commit
0edcec7c2b
|
@ -1,9 +1,10 @@
|
|||
class Admin::TextMarqueesController < OrbitAdminController
|
||||
def index
|
||||
@tags = @module_app.tags
|
||||
uac = @module_app.categories.enabled.authorized(current_user) if @user_authorized_categories.nil?
|
||||
categories = @module_app.categories.enabled
|
||||
@filter_fields = filter_fields(categories, @tags)
|
||||
@categories = categories.collect{|c|[c.title, c.id]}
|
||||
@categories = uac.collect{|c|[c.title, c.id]}
|
||||
@table_fields = [:title, :category]
|
||||
@marquees = Marquee.where(:title.ne => "")
|
||||
.order_by(sort)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<a href="<%= text.url %>" target="_blank"><%= text.title %></a>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if can_edit_or_delete?(text) %>
|
||||
<% if can_edit_or_delete?(@marquee) %>
|
||||
<li><a href="<%= admin_text_marquee_edittext_path(text) %>">
|
||||
<%= t(:edit) %>
|
||||
</a>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<div class="pagination pagination-centered"></div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<div id="pageslide">
|
||||
<div class="page-title clearfix">
|
||||
<a class="pull-right" href="javascript:$.pageslide.close()">
|
||||
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</tbody>
|
||||
</div>
|
||||
|
||||
<% if current_user.is_admin? or current_user.is_manager?(@module_app) %>
|
||||
<% if can_edit_or_delete?(@marquee) %>
|
||||
<div class="bottomnav clearfix" style="left: 81px;">
|
||||
<div class="action pull-right">
|
||||
<a data-fx="fade" class="btn btn-primary" href="/admin/text_marquees/<%= @marquee.id.to_s %>/newtext">
|
||||
|
|
Loading…
Reference in New Issue