Project

General

Profile

Feature #24780 » add-tooltip-on-permissions-report.diff

patch - Go MAEDA, 2017-01-09 03:25

View differences:

app/views/roles/permissions.html.erb (working copy)
33 33
        </tr>
34 34
    <% end %>
35 35
    <% perms_by_module[mod].each do |permission| %>
36
        <% humanized_perm_name = l_or_humanize(permission.name, :prefix => 'permission_') %>
36 37
        <tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
37 38
        <td class="name">
38 39
            <%= link_to_function('',
39 40
                                 "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
40 41
                                 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
41 42
                                 :class => 'icon-only icon-checked') %>
42
            <%= l_or_humanize(permission.name, :prefix => 'permission_') %>
43
            <%= humanized_perm_name %>
43 44
        </td>
44 45
        <% @roles.each do |role| %>
45
        <td>
46
        <% if role.setable_permissions.include? permission %>
47
          <%= check_box_tag "permissions[#{role.id}][]", permission.name, (role.permissions.include? permission.name), :id => nil, :class => "role-#{role.id}" %>
46
          <% if role.setable_permissions.include? permission %>
47
            <td title="<%= "#{humanized_perm_name} (#{role.name})" %>">
48
              <%= check_box_tag "permissions[#{role.id}][]", permission.name, (role.permissions.include? permission.name), :id => nil, :class => "role-#{role.id}" %>
49
            </td>
50
          <% else %>
51
            <td></td>
52
          <% end %>
48 53
        <% end %>
49
        </td>
50
        <% end %>
51 54
        </tr>
52 55
    <% end %>
53 56
<% end %>
(2-2/2)