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