sanger/sequencescape

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

Summary

Maintainability
Test Coverage

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

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

<div class="page-header"><h1>Study Specification</h1></div>

<table width='100%' cellspacing='0' cellpadding='0'>
  <tbody>
    <tr>
      <td class="item" width="40%">Name:</td>
      <td><strong><%=h @study.name %></strong></td>
    </tr>
    <tr>
      <td class="item">Created at:</td>
      <td><strong><%=h @study.created_at.to_formatted_s(:day_full_with_time) %></strong></td>
    </tr>
    <tr>
      <td class="item">Study reference genome:</td>
      <td><strong><%= @study.study_metadata.reference_genome&.name %></strong></td>
    </tr>
  </tbody>
</table>

<div id="template_form_body">
  <%= render partial: 'shared/metadata/show/study', locals: { study: @study } %>
  <hr>
  <h2>Additional Properties</h2>
  <small>Following fields are optional and specific to certain studies.</small>
  <%= render partial: 'shared/poly_metadata/show/study', locals: { study: @study } %>
</div>