@@ -1,30 +1,30 | |||
|
1 |
<%= error_messages_for 'role' %> |
|
|
1 | <%= error_messages_for 'role' %> | |
|
2 | 2 | |
|
3 | 3 | <div class="box"> |
|
4 | 4 | <% unless @role.builtin? %> |
|
5 | 5 | <p><%= f.text_field :name, :required => true %></p> |
|
6 | 6 | <p><%= f.check_box :assignable %></p> |
|
7 | 7 | <% end %> |
|
8 | 8 | <p><%= f.select :issues_visibility, Role::ISSUES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %></p> |
|
9 | 9 | <% if @role.new_record? && @roles.any? %> |
|
10 | 10 | <p><label><%= l(:label_copy_workflow_from) %></label> |
|
11 | 11 | <%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@roles, :id, :name)) %></p> |
|
12 | 12 | <% end %> |
|
13 | 13 | </div> |
|
14 | 14 | |
|
15 | 15 | <h3><%= l(:label_permissions) %></h3> |
|
16 | 16 | <div class="box" id="permissions"> |
|
17 | 17 | <% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %> |
|
18 | 18 | <% perms_by_module.keys.sort.each do |mod| %> |
|
19 | 19 | <fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend> |
|
20 | 20 | <% perms_by_module[mod].each do |permission| %> |
|
21 | 21 | <label class="floating"> |
|
22 | 22 | <%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %> |
|
23 | 23 | <%= l_or_humanize(permission.name, :prefix => 'permission_') %> |
|
24 | 24 | </label> |
|
25 | 25 | <% end %> |
|
26 | 26 | </fieldset> |
|
27 | 27 | <% end %> |
|
28 | 28 | <br /><%= check_all_links 'permissions' %> |
|
29 | 29 | <%= hidden_field_tag 'role[permissions][]', '' %> |
|
30 | 30 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now