You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html.erb 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <div class="contextual">
  2. <%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %>
  3. <%= link_to l(:label_permissions_report), permissions_roles_path, :class => 'icon icon-summary' %>
  4. </div>
  5. <h2><%=l(:label_role_plural)%></h2>
  6. <table class="list roles">
  7. <thead><tr>
  8. <th><%=l(:label_role)%></th>
  9. <th></th>
  10. <th></th>
  11. </tr></thead>
  12. <tbody>
  13. <% for role in @roles %>
  14. <tr class="<%= role.builtin? ? "builtin" : "givable" %>">
  15. <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
  16. <td>
  17. <% unless role.builtin? || role.workflow_rules.exists? %>
  18. <span class="icon icon-warning">
  19. <%= l(:text_role_no_workflow) %> (<%= link_to l(:button_edit), edit_workflows_path(:role_id => role) %>)
  20. </span>
  21. <% end %>
  22. </td>
  23. <td class="buttons">
  24. <%= reorder_handle(role) unless role.builtin? %>
  25. <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
  26. <%= delete_link role_path(role) unless role.builtin? %>
  27. </td>
  28. </tr>
  29. <% end %>
  30. </tbody>
  31. </table>
  32. <% html_title(l(:label_role_plural)) -%>
  33. <%= javascript_tag do %>
  34. $(function() { $("table.roles tbody").positionedItems({items: ".givable"}); });
  35. <% end %>