index.html.erb 1020 Bytes
Newer Older
jplang's avatar
jplang committed
1
<div class="contextual">
jplang's avatar
jplang committed
2
<%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %>
jplang's avatar
jplang committed
3
<%= link_to l(:label_permissions_report), permissions_roles_path, :class => 'icon icon-summary' %>
jplang's avatar
jplang committed
4 5
</div>

6
<h2><%=l(:label_role_plural)%></h2>
jplang's avatar
jplang committed
7

8
<table class="list roles">
jplang's avatar
jplang committed
9
  <thead><tr>
10
    <th><%=l(:label_role)%></th>
11
  <th></th>
jplang's avatar
jplang committed
12 13
  </tr></thead>
  <tbody>
jplang's avatar
jplang committed
14
<% for role in @roles %>
15
  <tr class="<%= cycle("odd", "even") %> <%= role.builtin? ? "builtin" : "givable" %>">
jplang's avatar
jplang committed
16
  <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
17
  <td class="buttons">
18
    <%= reorder_handle(role) unless role.builtin? %>
jplang's avatar
jplang committed
19
    <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
jplang's avatar
jplang committed
20
    <%= delete_link role_path(role) unless role.builtin? %>
jplang's avatar
jplang committed
21
  </td>
jplang's avatar
jplang committed
22 23
  </tr>
<% end %>
jplang's avatar
jplang committed
24
  </tbody>
jplang's avatar
jplang committed
25
</table>
26

27
<% html_title(l(:label_role_plural)) -%>
28 29 30 31

<%= javascript_tag do %>
  $(function() { $("table.roles tbody").positionedItems({items: ".givable"}); });
<% end %>