blob: d69fff132df50143727932a51e852b82bc26d049 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<%= error_messages_for 'role' %>
<div class="box">
<!--[form:role]-->
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :assignable %></p>
<div class="clear"></div>
<h3><%=l(:label_permissions)%></h3>
<% permissions = @permissions.group_by {|p| p.group_id } %>
<% permissions.keys.sort.each do |group_id| %>
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
<% permissions[group_id].each do |p| %>
<div style="width:170px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %>
<%= l(p.description.to_sym) %>
</div>
<% end %>
<div class="clear"></div>
</fieldset>
<% end %>
<br />
<%= check_all_links 'role_form' %>
<!--[eoform:role]-->
</div>
|