kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.1 KiB
53 lines
2.1 KiB
16 years ago
|
<h2><%= link_to l(:label_role_plural), :controller => 'roles', :action => 'index' %> » <%=l(:label_permissions_report)%></h2>
|
||
18 years ago
|
|
||
17 years ago
|
<% form_tag({:action => 'report'}, :id => 'permissions_form') do %>
|
||
16 years ago
|
<%= hidden_field_tag 'permissions[0]', '', :id => nil %>
|
||
14 years ago
|
<div class="autoscroll">
|
||
18 years ago
|
<table class="list">
|
||
17 years ago
|
<thead>
|
||
18 years ago
|
<tr>
|
||
17 years ago
|
<th><%=l(:label_permissions)%></th>
|
||
18 years ago
|
<% @roles.each do |role| %>
|
||
16 years ago
|
<th>
|
||
|
<%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %>
|
||
|
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.role-#{role.id}')",
|
||
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
||
|
</th>
|
||
18 years ago
|
<% end %>
|
||
|
</tr>
|
||
17 years ago
|
</thead>
|
||
|
<tbody>
|
||
17 years ago
|
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
|
||
|
<% perms_by_module.keys.sort.each do |mod| %>
|
||
|
<% unless mod.blank? %>
|
||
16 years ago
|
<tr class="group open">
|
||
|
<td colspan="<%= @roles.size + 1 %>">
|
||
14 years ago
|
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
||
16 years ago
|
<%= l_or_humanize(mod, :prefix => 'project_module_') %>
|
||
|
</td>
|
||
|
</tr>
|
||
18 years ago
|
<% end %>
|
||
17 years ago
|
<% perms_by_module[mod].each do |permission| %>
|
||
16 years ago
|
<tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
|
||
|
<td>
|
||
|
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
|
||
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
|
||
16 years ago
|
<%= l_or_humanize(permission.name, :prefix => 'permission_') %>
|
||
16 years ago
|
</td>
|
||
17 years ago
|
<% @roles.each do |role| %>
|
||
|
<td align="center">
|
||
|
<% if role.setable_permissions.include? permission %>
|
||
16 years ago
|
<%= check_box_tag "permissions[#{role.id}][]", permission.name, (role.permissions.include? permission.name), :id => nil, :class => "role-#{role.id}" %>
|
||
17 years ago
|
<% end %>
|
||
|
</td>
|
||
|
<% end %>
|
||
|
</tr>
|
||
17 years ago
|
<% end %>
|
||
|
<% end %>
|
||
18 years ago
|
</tbody>
|
||
|
</table>
|
||
14 years ago
|
</div>
|
||
18 years ago
|
<p><%= check_all_links 'permissions_form' %></p>
|
||
|
<p><%= submit_tag l(:button_save) %></p>
|
||
17 years ago
|
<% end %>
|