Project

General

Profile

« Previous | Next » 

Revision acfbc458

Added by Marek Hulán about 10 years ago

fixes #812 - new permissions model, user group role and nest support, role filters for better granularity

Contributions from:

View differences:

app/views/roles/index.html.erb
<% title _("Roles") %>
<% title_actions link_to(_("New role"), new_role_path),
link_to_if_authorized(_("Permissions report"), :action => 'report') %>
<% title_actions link_to_if_authorized(_("New role"), hash_for_new_role_path) %>
<table class="table table-bordered table-striped table-two-pane">
<thead>
......
<% for role in @roles %>
<tr>
<td>
<%= content_tag(role.builtin? ? 'em' : 'span', link_to_if_authorized(role.name, :action => 'edit', :id => role)) %>
<%= 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 class="buttons">
<%= display_delete_if_authorized(hash_for_role_path(:id => role),
:confirm => (_("Delete %s?") % role.name)) unless role.builtin?
%>
<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 %>

Also available in: Unified diff