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.

list.rhtml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="contextual">
  2. <%= link_to l(:label_role_new), {:action => 'new'}, :class => 'icon icon-add' %>
  3. </div>
  4. <h2><%=l(:label_role_plural)%></h2>
  5. <table class="list">
  6. <thead><tr>
  7. <th><%=l(:label_role)%></th>
  8. <th><%=l(:button_sort)%></th>
  9. <th></th>
  10. </tr></thead>
  11. <tbody>
  12. <% for role in @roles %>
  13. <tr class="<%= cycle("odd", "even") %>">
  14. <td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, :action => 'edit', :id => role)) %></td>
  15. <td align="center" style="width:15%;">
  16. <% unless role.builtin? %>
  17. <%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => role, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
  18. <%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:action => 'move', :id => role, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> -
  19. <%= link_to image_tag('1downarrow.png', :alt => l(:label_sort_lower)), {:action => 'move', :id => role, :position => 'lower'}, :method => :post, :title => l(:label_sort_lower) %>
  20. <%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:action => 'move', :id => role, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %>
  21. <% end %>
  22. </td>
  23. <td align="center" style="width:10%;">
  24. <%= button_to(l(:button_delete), { :action => 'destroy', :id => role }, :confirm => l(:text_are_you_sure), :class => "button-small", :disabled => role.builtin? ) %>
  25. </td>
  26. </tr>
  27. <% end %>
  28. </tbody>
  29. </table>
  30. <p class="pagination"><%= pagination_links_full @role_pages %></p>
  31. <p><%= link_to l(:label_permissions_report), :action => 'report' %></p>
  32. <% html_title(l(:label_role_plural)) -%>