|
<% title _("Roles") %>
|
|
<% title_actions link_to_if_authorized(_("New role"), hash_for_new_role_path) %>
|
|
|
|
<table class="table table-bordered table-striped table-two-pane">
|
|
<thead>
|
|
<tr>
|
|
<th><%= sort :name, :as => s_("Role|Name") %></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% for role in @roles %>
|
|
<tr>
|
|
<td>
|
|
<%= content_tag(role.builtin? ? 'em' : 'span', role.builtin? ? role.name : link_to_if_authorized(role.name, hash_for_edit_role_path(:id => role))) %>
|
|
</td>
|
|
<td>
|
|
<% links = [display_link_if_authorized(_('Filters and permissions'), hash_for_filters_path(:role_id => role)),
|
|
display_link_if_authorized(_('Add permission'), hash_for_new_filter_path(:role_id => role)),
|
|
display_link_if_authorized(_('Clone'), hash_for_clone_role_path(:id => role))] %>
|
|
<% links.push(display_delete_if_authorized(hash_for_role_path(:id => role), :confirm => (_("Delete %s?") % role.name))) unless role.builtin? %>
|
|
<%= action_buttons(*links) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%= page_entries_info @roles %>
|
|
<%= will_paginate @roles %>
|