sanger/sequencescape

View on GitHub
app/views/gels/index.html.erb

Summary

Maintainability
Test Coverage

<div class="page-header"><h1>Gel scoring</h1></div>

<%= form_tag(lookup_gels_url, method: :post) do %>
  <%= label_tag :barcode, "Find gel plate:" %>
  <%= text_field_tag :barcode %>
  <br /><br />
  <%= submit_tag 'Update gel values' %>
<% end %>

<h2>Recently updated</h2>
<%= pagination @gel_plates %>
<table id="study_list" class="sortable">
  <thead>
  <tr>
    <th>Plate</th>
    <th>Study</th>
    <th>Created on</th>
    <th>Gel Score</th>
    </tr>
  </thead>
  <tbody>
  <% @plates.each do |plate|  %>
    <tr>
      <td><%= link_to plate.human_barcode, labware_path(plate) %></td>
      <td>
      <% plate.studies.each do |study| %>
        <%= link_to study.name, study_path(study) %>
      <% end %>
      </td>
      <td class="strong faint"><span style="display:none"><%= plate.created_at %></span><%= plate.created_at.to_formatted_s(:sortable) %></td>
      <td><%= link_to plate.scored? ? "Rescore" : "Score",  gel_path(plate) %></td>
    </tr>
  <% end %>
  </tbody>
</table>
<%= pagination @gel_plates %>