sanger/sequencescape

View on GitHub
app/views/admin/roles/index.html.erb

Summary

Maintainability
Test Coverage

<%- add :about, "User Management" %>
<%- add :menu, "Add new role" => new_admin_role_path if can?(:create, Role) %>
<%- add :menu, "Back to Admin Panel" => admin_path if can?(:administer, Sequencescape) %>

<div class="page-header"><h1>Listing Roles</h1></div>

<ul>
  <% @roles.each do |role| -%>
    <li>
      <h3><%= role.humanize %></h3>
      <p><strong><%= link_to "Show all users that are #{role}s", admin_role_users_path(role) %></strong></p>
    </li>
  <% end %>
</ul>