|
<% title "Roles" %>
|
|
<% title_actions link_to("New role", new_role_path),
|
|
link_to_if_authorized("Permissions report", :action => 'report') %>
|
|
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><%= sort :name, :as => "Role" %></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% for role in @roles %>
|
|
<tr>
|
|
<td>
|
|
<%= content_tag(role.builtin? ? 'em' : 'span', link_to_if_authorized(role.name, :action => 'edit', :id => role)) %>
|
|
</td>
|
|
<td class="buttons">
|
|
<%= display_delete_if_authorized(hash_for_role_path(:id => role),
|
|
:confirm => "Delete #{role.name}?") unless role.builtin?
|
|
%>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%= page_entries_info @roles %>
|
|
<%= will_paginate @roles %>
|