sanger/sequencescape

View on GitHub
app/views/batches/print_plate_labels.html.erb

Summary

Maintainability
Test Coverage

<% add :about, "Print plate labels" -%>
<% add :back_menu, "Back to batch" => batch_path(@batch) -%>

<%= page_title 'Print Labels', "Batch #{@batch.id}" %>

<div class="content">
  <div class="info">
    <form action='/batches/print_plate_barcodes' method='POST'>
      <%= render partial: "shared/plate_print" %>
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td width="35%" class="item">Number of copies:</td>
          <td width="65%"><input name="count" size="10" value="1" /></td>
        </tr>

        <% @output_barcodes.each do |plate| -%>
          <tr>
            <td width="35%" class="item"><label for="plate_<%= plate %>"><%= plate %></label></td>
            <td width="65%"><input id="plate_<%= plate  %>" type='checkbox' checked='on' name='printable[<%= plate  %>]'></td>
          </tr>
        <% end -%>
        <tr>
          <td width="35%" class="item">&nbsp;</td>
          <td width="65%"><input type='submit' value='Print labels' class="print-button"> or <%= link_to 'cancel', controller: 'batches', action: 'show', id: @batch.id %></td>
          <td><input type="button" name="select_printables" class="select-all-behaviour" value="Select all" /></td>
          <td><input type="button" name="unselect_printables" class="deselect-all-behaviour" value="Deselect all" /></td>
        </tr>
      </table>
    <input type='hidden' name='batch_id' value='<%= @batch.id %>' />
  </div>
</div>