sanger/limber

View on GitHub
app/views/plates/_pooled_plate.html.erb

Summary

Maintainability
Test Coverage
<table class="plate-view">
  <thead>
    <tr>
      <th class="first-col">&nbsp;</th>
      <% (1..12).each do |column_number| %>
        <th><%= column_number %></th>
      <% end %>
    </tr>
  </thead>

  <tbody>
    <% walker.each do |row_label, row_wells| %>
      <tr>
        <th class="first-col"><%= row_label %></th>
        <% row_wells.each_with_index do |well, index| %>
          <td>
            <div id="<%= "well_#{well.location}" %>" class="well">
              <% unless transfers[well.location].nil? -%>
                <% Array(transfers[well.location]).each do |location| -%>
                <div id="<%= "aliquot_#{location}" %>" class="aliquot <%= colours_by_location[location] %>">
                  <%= location %>
                </div>
                <% end %>
              <% end %>
            </div>
          </td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>