Project

General

Profile

Defect #11 » _form.rhtml

Chris Grant, 2008-02-03 10:48

 
1
<%= error_messages_for 'role' %> 
2
<div class="box">
3
<!--[form:role]-->
4
<p><%= f.text_field :name, :required => true %></p>
5

    
6
<h3><%=l(:label_permissions)%></h3>
7
<% permissions = @permissions.group_by {|p| p.group_id } %>
8
<% permissions.keys.sort.each do |group_id| %>
9
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
10
<% permissions[group_id].each do |p| %>
11
  <div style="width:170px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %>
12
  <%= l(p.description.to_sym) %>
13
  </div>
14
<% end %>
15
<div style="clear: both"></div>
16
</fieldset>
17
<% end %>
18
<br />
19
<%= check_all_links 'role_form' %>
20
<!--[eoform:role]-->
21
</div>
(2-2/2)