sanger/sequencescape

View on GitHub
app/views/studies/collaborators.html.erb

Summary

Maintainability
Test Coverage

<% add :about, "Contacts for study." -%>
<% add :back_menu, I18n.t("navigation.menu.back_to_study") => study_path(@study) -%>
<% if can? :edit, @study %>
  <% add :menu, "Edit" => edit_study_path(@study) -%>
<% end %>

<div id="content-links">
  <%= link_to "View status", study_path(@study) %>
</div>

<%= page_title @study.name, 'Contacts' %>
<div class='lead'>
Study <%= @study.id %> &middot; Created on <%= time_tag(@study.created_at) %> &middot; <%= @study.state.capitalize %>
</div>

<div id="role_list">
  <!-- renders all roles on this study -->
  <%= render partial: "roles" -%>
</div>

<% if can? :create, Role, { authorizable: @study } -%>
  <%= panel :add_new_role, title: 'Assign roles to users' do %>
    <%= render partial: "role" -%>
  <% end %>
<% end -%>