2006-06-28 20:11:03 +02:00
|
|
|
<%= error_messages_for 'role' %>
|
2007-08-29 18:52:35 +02:00
|
|
|
|
2007-10-01 16:00:38 +02:00
|
|
|
<% unless @role.builtin? %>
|
2006-07-29 11:32:58 +02:00
|
|
|
<div class="box">
|
2007-10-01 16:00:38 +02:00
|
|
|
<p><%= f.text_field :name, :required => true %></p>
|
2007-08-16 19:47:41 +02:00
|
|
|
<p><%= f.check_box :assignable %></p>
|
2008-03-15 09:27:38 +01:00
|
|
|
<% if @role.new_record? && @roles.any? %>
|
|
|
|
<p><label><%= l(:label_copy_workflow_from) %></label>
|
|
|
|
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@roles, :id, :name)) %></p>
|
|
|
|
<% end %>
|
2007-09-14 13:34:08 +02:00
|
|
|
</div>
|
2007-10-01 16:00:38 +02:00
|
|
|
<% end %>
|
2007-09-14 13:34:08 +02:00
|
|
|
|
2007-09-22 15:17:49 +02:00
|
|
|
<h3><%= l(:label_permissions) %></h3>
|
2008-05-18 18:53:23 +02:00
|
|
|
<div class="box" id="permissions">
|
2007-09-14 13:34:08 +02: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-05 22:06:53 +02:00
|
|
|
<label class="floating">
|
2007-09-14 13:34:08 +02:00
|
|
|
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %>
|
|
|
|
<%= permission.name.to_s.humanize %>
|
2007-10-05 22:06:53 +02:00
|
|
|
</label>
|
2007-09-14 13:34:08 +02:00
|
|
|
<% end %>
|
|
|
|
</fieldset>
|
2007-03-12 18:59:02 +01:00
|
|
|
<% end %>
|
2008-05-18 18:53:23 +02:00
|
|
|
<br /><%= check_all_links 'permissions' %>
|
2007-08-29 18:52:35 +02:00
|
|
|
<%= hidden_field_tag 'role[permissions][]', '' %>
|
2007-09-14 13:34:08 +02:00
|
|
|
</div>
|