|
|
|
@ -30,10 +30,10 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
<%= error_messages_for 'role' %> |
|
|
|
|
|
|
|
|
|
<% unless @role.builtin? %> |
|
|
|
|
<section class="form--section"> |
|
|
|
|
<div class="form--field"><%= f.text_field :name, required: true %></div> |
|
|
|
|
<div class="form--field"><%= f.check_box :assignable %></div> |
|
|
|
|
<% if @role.new_record? && @roles.any? %> |
|
|
|
|
<div class="form--field"><%= f.text_field :name, required: true %></div> |
|
|
|
|
<div class="form--field"><%= f.check_box :assignable %></div> |
|
|
|
|
<% if @role.new_record? && @roles.any? %> |
|
|
|
|
<div id="member_attributes"> |
|
|
|
|
<div class="form--field"> |
|
|
|
|
<%= styled_label_tag 'copy_workflow_from', l(:label_copy_workflow_from) %> |
|
|
|
|
<div class="form--field-container"> |
|
|
|
@ -41,15 +41,15 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
content_tag("option") + options_from_collection_for_select(@roles, :id, :name)) %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
</section> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<h3 class="form--section-title"><%= l(:label_permissions) %></h3> |
|
|
|
|
<section class="form--section" id="permissions"> |
|
|
|
|
<div class="grid-block small-up-2 medium-up-3 large-up-4"> |
|
|
|
|
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %> |
|
|
|
|
<% perms_by_module.keys.sort.each do |mod| %> |
|
|
|
|
<div id="member_permissions"> |
|
|
|
|
<% perms_by_module = @permissions.group_by {|p| p.project_module.to_s} %> |
|
|
|
|
<% perms_by_module.keys.sort.each do |mod| %> |
|
|
|
|
<% module_name = mod.blank? ? 'fieldset--' + Project.model_name.human.downcase.gsub(' ', '_') : 'fieldset--' + l_or_humanize(mod, prefix: 'project_module_').downcase.gsub(' ', '_') %> |
|
|
|
|
<fieldset class="form--fieldset -collapsible" id="<%= module_name %>"> |
|
|
|
|
<% module_name = mod.blank? ? "form--" + I18n.t('attributes.project') : "form--" + l_or_humanize(mod, prefix: 'project_module_').gsub(' ','_') %> |
|
|
|
|
<div class="grid-section"> |
|
|
|
|
<fieldset class="form--fieldset -collapsible" id= "<%= module_name %>"> |
|
|
|
@ -59,17 +59,20 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
(<%= check_all_links module_name %>) |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="autoscroll"> |
|
|
|
|
<div class="-columns-2"> |
|
|
|
|
<% perms_by_module[mod].each do |permission| %> |
|
|
|
|
<label class="form--label-with-check-box"> |
|
|
|
|
<%= styled_check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %> |
|
|
|
|
<%= l_or_humanize(permission.name, prefix: 'permission_') %> |
|
|
|
|
</label> |
|
|
|
|
<div class="form--field autoscroll -trailing-label "> |
|
|
|
|
<label class="form--label"> |
|
|
|
|
<%= l_or_humanize(permission.name, prefix: 'permission_') %> |
|
|
|
|
</label> |
|
|
|
|
<div class="form--field-container"> |
|
|
|
|
<%= styled_check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
</fieldset> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|
<%= check_all_links 'permissions' %> |
|
|
|
|
</section> |
|
|
|
|
</fieldset> |
|
|
|
|
<% end %> |
|
|
|
|
</div> |
|
|
|
|