2006-06-28 22:11:03 +04:00
|
|
|
<%= error_messages_for 'role' %>
|
2006-07-29 13:32:58 +04:00
|
|
|
<div class="box">
|
2007-03-12 20:59:02 +03:00
|
|
|
<!--[form:role]-->
|
|
|
|
<p><%= f.text_field :name, :required => true %></p>
|
|
|
|
|
|
|
|
<h3><%=l(:label_permissions)%></h3>
|
|
|
|
<% permissions = @permissions.group_by {|p| p.group_id } %>
|
2006-07-29 23:54:22 +04:00
|
|
|
<% permissions.keys.sort.each do |group_id| %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<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>
|
2007-03-07 01:46:58 +03:00
|
|
|
<% end %>
|
2006-09-03 14:25:21 +04:00
|
|
|
<br />
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= check_all_links 'role_form' %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<!--[eoform:role]-->
|
2006-07-29 13:32:58 +04:00
|
|
|
</div>
|