<%= render :partial => 'caboose/pages/admin_header' %>

URI: /<%= @page.uri %>

<% admin_role = Caboose::Role.admin_role(@site.id) %> <% Caboose::Role.flat_tree(@site.id, ' - ').each do |r| %> <% next if r.id == admin_role.id %> <% may_view = Caboose::PagePermission.where(:role_id => r.id, :page_id => @page.id, :action => 'view').exists? %> <% may_edit = Caboose::PagePermission.where(:role_id => r.id, :page_id => @page.id, :action => 'edit').exists? %> <% end %>
RoleViewEdit
onchange="toggle_page_permission(<%= r.id %>, $(this).prop('checked'), 'view');" /> onchange="toggle_page_permission(<%= r.id %>, $(this).prop('checked'), 'edit');" />

<%= render :partial => 'caboose/pages/admin_footer' %> <% content_for :caboose_css do %> <% end %> <% content_for :caboose_js do %> <% end %>