app/views/plates/_plate.html.erb
<div class="card-body bg-dark">
<table id="<%= (id ||= "plate") %>"
class="plate-view plate-<%= plate_presenter.size %> plate-<%= plate_presenter.style_class %> <%= plate_presenter.state %>"
data-animate-tags="true">
<thead>
<tr>
<th class="first-col"> </th>
<% 1.upto(plate_presenter.number_of_columns).each do |column_number| %>
<th><%= column_number %></th>
<% end %>
</tr>
</thead>
<tbody>
<% aliquot_partial = "aliquots/#{plate_presenter.aliquot_partial}" %>
<% plate_presenter.wells_by_row.each do |row_label, row_wells| %>
<tr>
<th class="first-col"><%= row_label %></th>
<% 1.upto(plate_presenter.number_of_columns) do |column| %>
<% well = row_wells[column - 1] %>
<td>
<% location = "#{row_label}#{column}" %>
<%# Don't remove the empty data-pool or data-aliquot-count attributes. They're used by custom pooling. %>
<div id="<%= "well_#{location}" %>" class="well" data-location="<%= location %>" data-pool="" data-aliquot-count="">
<% if well.try(:aliquots).present? -%>
<%= render partial: aliquot_partial, locals: { presenter: plate_presenter, id: well.location, container: well } %>
<% end -%>
</div>
</td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
</div>