obsolete.ChilliProject/redmine/app/views/roles/_form.rhtml

23 lines
812 B
Plaintext

<%= error_messages_for 'role' %>
<!--[form:role]-->
<p><label for="role_name"><%=_('Name')%> <span class="required">*</span></label><br />
<%= text_field 'role', 'name' %></p>
<strong><%=_('Permissions')%></strong>
<% permissions = @permissions.group_by {|p| p.group_id } %>
<% permissions.keys.sort.each do |group_id| %>
<fieldset><legend><%= _(Permission::GROUPS[group_id]) %></legend>
<% permissions[group_id].each do |p| %>
<div style="width:200px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %>
<%= _(p.descr) %>
</div>
<% end %>
</fieldset>
<% end %>
<br />
<a href="javascript:checkAll('role_form', true)"><%=_('Check all')%></a> |
<a href="javascript:checkAll('role_form', false)"><%=_('Uncheck all')%></a><br />
<!--[eoform:role]-->