diff options
Diffstat (limited to 'app/views/roles/_form.rhtml')
-rw-r--r-- | app/views/roles/_form.rhtml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/roles/_form.rhtml b/app/views/roles/_form.rhtml new file mode 100644 index 000000000..e0ab1c099 --- /dev/null +++ b/app/views/roles/_form.rhtml @@ -0,0 +1,20 @@ +<%= error_messages_for 'role' %> +<div class="box"> +<!--[form:role]-->
+<p><%= f.text_field :name, :required => true %></p>
+
+<strong><%=l(:label_permissions)%>:</strong>
+<% 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 %>
+</fieldset>
+<% end %>
+<br /> +<%= check_all_links 'role_form' %>
+<!--[eoform:role]--> +</div> |