@trackers = Tracker.find(:all, :order => 'position')
@statuses = IssueStatus.find(:all, :include => :workflows, :order => 'position')
end
+
+ def report
+ @roles = Role.find :all
+ @permissions = Permission.find :all, :conditions => ["is_public=?", false], :order => 'sort'
+ if request.post?
+ @roles.each do |role|
+ role.permissions = Permission.find(params[:permission_ids] ? (params[:permission_ids][role.id.to_s] || []) : [] )
+ end
+ Permission.allowed_to_role_expired
+ flash[:notice] = l(:notice_successful_update)
+ redirect_to :action => 'list'
+ end
+ end
end
</tbody>
</table>
-<%= pagination_links_full @role_pages %>
\ No newline at end of file
+<p><%= pagination_links_full @role_pages %></p>
+
+<p><%= link_to l(:label_permissions_report), :action => 'report' %></p>
--- /dev/null
+<h2><%=l(:label_permissions_report)%></h2>
+
+<%= start_form_tag({:action => 'report'}, :id => 'permissions_form') %>
+
+<table class="list">
+<thead><tr>
+ <th><%=l(:label_permissions)%></th>
+ <th colspan="<%= @roles.length %>"><%= l(:label_role_plural) %></th>
+</tr>
+</thead>
+<tbody>
+<% permissions = @permissions.group_by {|p| p.group_id } %>
+<% permissions.keys.sort.each do |group_id| %>
+ <tr>
+ <th><%= l(Permission::GROUPS[group_id]) %></th>
+ <% @roles.each do |role| %><th align="center"><small><%= role.name %></small></th><% end %>
+ </tr>
+ <% permissions[group_id].each do |p| %>
+ <tr class="<%= cycle("odd", "even") %>">
+ <td><%= l(p.description.to_sym) %></td>
+ <% @roles.each do |role| %>
+ <td align="center"><%= check_box_tag "permission_ids[#{role.id}][]", p.id, (role.permissions.include? p) %></td>
+ <% end %>
+ </tr>
+ <% end %>
+<% reset_cycle
+end %>
+</tbody>
+</table>
+<p><%= check_all_links 'permissions_form' %></p>
+<p><%= submit_tag l(:button_save) %></p>
+<%= end_form_tag %>
\ No newline at end of file
label_diff_side_by_side: side by side
label_options: Options
label_copy_workflow_from: Copy workflow from
+label_permissions_report: Permissions report
button_login: Einloggen
button_submit: OK
label_diff_side_by_side: side by side
label_options: Options
label_copy_workflow_from: Copy workflow from
+label_permissions_report: Permissions report
button_login: Login
button_submit: Submit
label_diff_side_by_side: side by side
label_options: Options
label_copy_workflow_from: Copy workflow from
+label_permissions_report: Permissions report
button_login: Conexión
button_submit: Someter
label_diff_side_by_side: côte à côte
label_options: Options
label_copy_workflow_from: Copier le workflow de
+label_permissions_report: Synthèse des permissions
button_login: Connexion
button_submit: Soumettre
label_diff_side_by_side: side by side
label_options: Options
label_copy_workflow_from: Copy workflow from
+label_permissions_report: Permissions report
button_login: Login
button_submit: Invia
label_diff_side_by_side: 横に並べる
label_options: Options
label_copy_workflow_from: Copy workflow from
+label_permissions_report: Permissions report
button_login: ログイン
button_submit: 変更
label_diff_side_by_side: side by side
label_options: Options
label_copy_workflow_from: Copy workflow from
+label_permissions_report: Permissions report
button_login: 登录
button_submit: 提交
}
table.list tbody th {
- font-weight: normal;
+ font-weight: bold;
background: #eed;
border: 1px solid #d7d7d7;
+ color: #777;
}
/********** Validation error messages *************/