sanger/sequencescape

View on GitHub
app/views/poolings/new.html.erb

Summary

Maintainability
Test Coverage
<%= page_title 'Multiplex pools', 'New' %>

<p class='lead'>
  This page allows you to scan in multiple tubes of tagged samples to generate a new multiplexed library.
  Tube can contain single or multiple samples. Just scan or type each barcode into the 'Scan tube' box in turn.
</p>

<%= render partial: 'tag_clash_report', locals: { report: @pooling.tag_clash_report } %>

<%= form_for(@pooling) do |form| %>
  <div class="form-group">
    <%= label_tag :asset_scan, 'Scan tube' %>
    <%= text_field_tag :asset_scan, '', class: 'rescannable form-control' %>
  </div>

  <div id="scanned"></div>

  <ol id="barcode_list" class="barcode_list">
    <%@pooling.barcodes.each do |barcode|%>
      <li>
        <%=barcode%>
        <input type="hidden" name="pooling[barcodes][]" value=<%=barcode%> >
        <a>Remove from list</a>
      </li>
    <%end%>
  </ol>

  <div class="form-group">
    <%= form.label :stock_mx_tube_required, 'Create stock multiplexed tube' %>
    <%= form.check_box :stock_mx_tube_required, {}, true, '' %>
  </div>
  <div class="form-group">
    <%= form.label :standard_mx_tube_required, 'Create standard multiplexed tube' %>
    <%= form.check_box :standard_mx_tube_required, {disabled: true, checked: true} %>
  </div>

  <%= field_set_tag 'Print labels' do %>
    <div class="form-group">
      <%= form.label :count, 'Count' %>
      <%= form.number_field :count, value: 1 %>
    </div>
    <div class="form-group">
      <%= form.label :barcode_printer, 'Barcode printer' %>
      <%= render partial: "shared/printer_list" %>
    </div>
  <% end %>
  <%= form.submit 'Transfer and print labels', class: 'btn btn-success' %>
<% end %>

<%= vite_javascript_tag 'pooling' %>