2006-06-28 22:11:03 +04:00
|
|
|
<%= error_messages_for 'role' %>
|
2007-08-29 20:52:35 +04:00
|
|
|
|
2007-10-01 18:00:38 +04:00
|
|
|
<% unless @role.builtin? %>
|
2006-07-29 13:32:58 +04:00
|
|
|
<div class="box">
|
2007-10-01 18:00:38 +04:00
|
|
|
<p><%= f.text_field :name, :required => true %></p>
|
2007-08-16 21:47:41 +04:00
|
|
|
<p><%= f.check_box :assignable %></p>
|
2007-09-14 15:34:08 +04:00
|
|
|
</div>
|
2007-10-01 18:00:38 +04:00
|
|
|
<% end %>
|
2007-09-14 15:34:08 +04:00
|
|
|
|
2007-09-22 17:17:49 +04:00
|
|
|
<h3><%= l(:label_permissions) %></h3>
|
|
|
|
<div class="box">
|
2007-09-14 15:34:08 +04:00
|
|
|
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %>
|
|
|
|
<% perms_by_module.keys.sort.each do |mod| %>
|
|
|
|
<fieldset><legend><%= mod.blank? ? l(:label_project) : mod.humanize %></legend>
|
|
|
|
<% perms_by_module[mod].each do |permission| %>
|
2007-10-06 00:06:53 +04:00
|
|
|
<label class="floating">
|
2007-09-14 15:34:08 +04:00
|
|
|
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %>
|
|
|
|
<%= permission.name.to_s.humanize %>
|
2007-10-06 00:06:53 +04:00
|
|
|
</label>
|
2007-09-14 15:34:08 +04:00
|
|
|
<% end %>
|
|
|
|
</fieldset>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
2007-09-14 15:34:08 +04:00
|
|
|
<br /><%= check_all_links 'role_form' %>
|
2007-08-29 20:52:35 +04:00
|
|
|
<%= hidden_field_tag 'role[permissions][]', '' %>
|
2007-09-14 15:34:08 +04:00
|
|
|
</div>
|