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-07-29 23:54:22 +04:00
|
|
|
<p><label for="role_name"><%=l(:field_name)%> <span class="required">*</span></label><br />
|
2006-06-28 22:11:03 +04:00
|
|
|
<%= text_field 'role', 'name' %></p>
|
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<strong><%=l(:label_permissions)%>:</strong>
|
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 %>
|
|
|
|
<br />
|
2006-07-29 23:54:22 +04:00
|
|
|
<a href="javascript:checkAll('role_form', true)"><%=l(:button_check_all)%></a> |
|
|
|
|
<a href="javascript:checkAll('role_form', false)"><%=l(:button_uncheck_all)%></a><br />
|
2006-06-28 22:11:03 +04:00
|
|
|
<!--[eoform:role]-->
|
2006-07-29 13:32:58 +04:00
|
|
|
</div>
|