2006-06-28 22:11:03 +04:00
|
|
|
<%= error_messages_for 'role' %>
|
2006-07-29 13:32:58 +04:00
|
|
|
<div class="box">
|
2006-06-28 22:11:03 +04:00
|
|
|
<!--[form:role]-->
|
2006-09-02 17:33:23 +04:00
|
|
|
<p><%= f.text_field :name, :required => true %></p>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2006-12-26 18:02:33 +03:00
|
|
|
<h3><%=l(:label_permissions)%></h3>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% permissions = @permissions.group_by {|p| p.group_id } %>
|
2006-07-29 23:54:22 +04:00
|
|
|
<% permissions.keys.sort.each do |group_id| %>
|
|
|
|
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% permissions[group_id].each do |p| %>
|
2006-07-29 23:54:22 +04:00
|
|
|
<div style="width:170px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %>
|
|
|
|
<%= l(p.description.to_sym) %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</fieldset>
|
|
|
|
<% end %>
|
2006-09-03 14:25:21 +04:00
|
|
|
<br />
|
|
|
|
<%= check_all_links 'role_form' %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<!--[eoform:role]-->
|
2006-07-29 13:32:58 +04:00
|
|
|
</div>
|