<%=l(:label_permissions_report)%>

<%= start_form_tag({:action => 'report'}, :id => 'permissions_form') %> <% permissions = @permissions.group_by {|p| p.group_id } %> <% permissions.keys.sort.each do |group_id| %> <% @roles.each do |role| %><% end %> <% permissions[group_id].each do |p| %> "> <% @roles.each do |role| %> <% end %> <% end %> <% reset_cycle end %>
<%=l(:label_permissions)%> <%= l(:label_role_plural) %>
<%= l(Permission::GROUPS[group_id]) %><%= role.name %>
<%= l(p.description.to_sym) %><%= check_box_tag "permission_ids[#{role.id}][]", p.id, (role.permissions.include? p) %>

<%= check_all_links 'permissions_form' %>

<%= submit_tag l(:button_save) %>

<%= end_form_tag %>