comparison .svn/pristine/d8/d872c59c53fb6c77d47a3fa010a7ea331d0c6dee.svn-base @ 1295:622f24f53b42 redmine-2.3

Update to Redmine SVN revision 11972 on 2.3-stable branch
author Chris Cannam
date Fri, 14 Jun 2013 09:02:21 +0100
parents
children
comparison
equal deleted inserted replaced
1294:3e4c3460b6ca 1295:622f24f53b42
1 <h2><%= link_to l(:label_role_plural), roles_path %> &#187; <%=l(:label_permissions_report)%></h2>
2
3 <%= form_tag(permissions_roles_path, :id => 'permissions_form') do %>
4 <%= hidden_field_tag 'permissions[0]', '', :id => nil %>
5 <div class="autoscroll">
6 <table class="list permissions">
7 <thead>
8 <tr>
9 <th><%=l(:label_permissions)%></th>
10 <% @roles.each do |role| %>
11 <th>
12 <%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %>
13 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.role-#{role.id}')",
14 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
15 </th>
16 <% end %>
17 </tr>
18 </thead>
19 <tbody>
20 <% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
21 <% perms_by_module.keys.sort.each do |mod| %>
22 <% unless mod.blank? %>
23 <tr class="group open">
24 <td>
25 <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
26 <%= l_or_humanize(mod, :prefix => 'project_module_') %>
27 </td>
28 <% @roles.each do |role| %>
29 <td class="role"><%= h(role.name) %></td>
30 <% end %>
31 </tr>
32 <% end %>
33 <% perms_by_module[mod].each do |permission| %>
34 <tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
35 <td>
36 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
37 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
38 <%= l_or_humanize(permission.name, :prefix => 'permission_') %>
39 </td>
40 <% @roles.each do |role| %>
41 <td align="center">
42 <% if role.setable_permissions.include? permission %>
43 <%= check_box_tag "permissions[#{role.id}][]", permission.name, (role.permissions.include? permission.name), :id => nil, :class => "role-#{role.id}" %>
44 <% end %>
45 </td>
46 <% end %>
47 </tr>
48 <% end %>
49 <% end %>
50 </tbody>
51 </table>
52 </div>
53 <p><%= check_all_links 'permissions_form' %></p>
54 <p><%= submit_tag l(:button_save) %></p>
55 <% end %>