app/views/assets/samples_partials/_asset_samples.erb
<section id="samples-table" class='info-panel'>
<header>
<a href='#asset-samples-table-collapser' role="button" data-toggle='collapse'>
<h3>Samples
<%= counter_badge @asset.aliquots.count %>
<small class='show-hide'>Click to toggle</small>
</h3>
</a>
</header>
<div id="asset-samples-table-collapser" class="collapse in show">
<div class="card-body">
If the tags below are not correct, you may wish to <%= link_to 'perform tag substitution', new_receptacle_tag_substitution_path(@asset.receptacle) %>.
</div>
<%= pagination @aliquots %>
<table id="asset-samples-table" class="sortable table table-striped">
<colgroup>
<col class="npg_aliquot_index">
</colgroup>
<thead>
<tr>
<th>Sample Name</th>
<th>Sanger Sample Id</th>
<th>Tag</th>
<th>Tag2</th>
<th>Control?</th>
</tr>
</thead>
<tbody>
<% @aliquots.each_with_index do |aliquot, i| %>
<tr>
<td><strong><%= link_to(aliquot.sample.name, sample_url(aliquot.sample)) -%></strong></td>
<td><%= aliquot.sample.sanger_sample_id %></td>
<td><%= render partial: 'shared/tag_info', locals: {tag: aliquot.tag } if aliquot.tag.present? %></td>
<td><%= render partial: 'shared/tag_info', locals: {tag: aliquot.tag2 } if aliquot.tag2.present? %></td>
<td><%= aliquot.sample.control_formatted %></td>
</tr>
<% end %>
</tbody>
</table>
<%= pagination @aliquots %>
</div>
</section>