Sha256: 3b21ba2b33216090ba5205487bb94104d8f68a3b23ca2a7f1ee3ca4a6456c406
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
- rights = Right.all.sort_by(&:name) - roles = current_objects - right_ids_by_role = roles.hash_by(:id){|r| r.right_ids} %table.general_table(style="width: auto; margin-top: 50px") %tbody - Right.by_groups.each_pair do |group, rights| %tr %th{:colspan => roles.size+1, :style => 'height: 40px; background: none'} %tr %th(style="width: 250px; height: 40px")= group.titleize - roles.each do |role| %th.diagonal(style="width: 10px") %span.title(id="matrix_role_#{role.id}" class="matrix_role") = truncate_with_title(role.to_s, 15) - rights.each do |right| - klass = cycle('striped_row2', '') %tr(style="padding: 0;" class=klass) %td(style="text-align: left; padding: 0") %strong= truncate_with_title(right.sensible_name, :length => 35) - roles.each do |role| - has_right = right_ids_by_role[role.id].include?(right.id) %td(style="text-align: left; padding: 0; text-align: center; #{has_right ? 'background-color: green' : ''}")
Version data entries
6 entries across 6 versions & 1 rubygems