To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / roles / _form.html.erb @ 1298:4f746d8966dd
History | View | Annotate | Download (1.38 KB)
| 1 |
<%= error_messages_for 'role' %>
|
|---|---|
| 2 |
|
| 3 |
<% unless @role.anonymous? %>
|
| 4 |
<div class="box tabular"> |
| 5 |
<% unless @role.builtin? %>
|
| 6 |
<p><%= f.text_field :name, :required => true %></p> |
| 7 |
<p><%= f.check_box :assignable %></p> |
| 8 |
<% end %>
|
| 9 |
<p><%= f.select :issues_visibility, Role::ISSUES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %></p> |
| 10 |
<% if @role.new_record? && @roles.any? %>
|
| 11 |
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label> |
| 12 |
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@roles, :id, :name, params[:copy_workflow_from] || @copy_from.try(:id))) %></p> |
| 13 |
<% end %>
|
| 14 |
</div>
|
| 15 |
<% end %>
|
| 16 |
|
| 17 |
<h3><%= l(:label_permissions) %></h3> |
| 18 |
<div class="box tabular" id="permissions"> |
| 19 |
<% perms_by_module = @role.setable_permissions.group_by {|p| p.project_module.to_s} %>
|
| 20 |
<% perms_by_module.keys.sort.each do |mod| %>
|
| 21 |
<fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend> |
| 22 |
<% perms_by_module[mod].each do |permission| %>
|
| 23 |
<label class="floating"> |
| 24 |
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %>
|
| 25 |
<%= l_or_humanize(permission.name, :prefix => 'permission_') %>
|
| 26 |
</label>
|
| 27 |
<% end %>
|
| 28 |
</fieldset>
|
| 29 |
<% end %>
|
| 30 |
<br /><%= check_all_links 'permissions' %> |
| 31 |
<%= hidden_field_tag 'role[permissions][]', '' %>
|
| 32 |
</div>
|