<!-- BEGIN [% component.name %] -->
  <h3 class="header">[% xna.upper %] quantification labels</h3>

  [% IF labels.size %]
  <form name="labels" method="post"
      action="[% app_url%]/local_labels/print_xna_quantification_labels">
    <p class="indent bold">[% n_labels = labels.size - ( done.size || 0 ) %]
      Have [% n_labels %] set[% 's' UNLESS n_labels == 1 %] of labels to print:
    </p>

    <table class="indent">
     <tr class="borderless">
      [% count = 1 %]
    [% FOREACH entry IN labels; # PROCESS dumper.tt dump = entry.as_tree;
         data = entry.request %]
      <td width="110" align="right">
        [% INCLUDE site/lab_number.tt want_url = 1 %] [% # data.id %]
      </td>
      <td>
        [% IF done.item(data.id) %]
          <img src="/images/tick.gif" />
        [% ELSE %]
          <input type="checkbox" name="request_id" value="[% data.id %]" />
        [% END %]
      </td>

      [% UNLESS loop.last OR # don't start new table unless multiple of 5:
          labels.size > 5 AND count % 5 %]
        </tr>
        </table>
        <table class="indent">
        <tr class="borderless">
      [% END %]

      [% count = count + 1 %]
     [% END %]
     </tr>
    </table>

    <input type="hidden" name="label_type" value="[% c.query.param('label_type') %]" />

    <p class="indent">
      <input type="button" name="CheckAll" value="Select all"
        onClick="checkAll(document.labels.request_id)">
      <input type="button" name="UnCheckAll" value="Clear all"
        onClick="uncheckAll(document.labels.request_id)">
      [% site.html.submit %]
    </p>
    </form>
  [% ELSE %]
    <p class="info indent">No labels to print</p>
  [% END %]
<!-- END [% component.name %] -->
