<tal:stickers define="portal_state context/@@plone_portal_state;
                      portal_url portal_state/portal_url;
                      items python:view.items;
                      item1 python:view.current_item;
                      item2 python:view.current_item;
                      items python:[item1, item2];">

  <table cellpadding="0" cellspacing="0" class="stickers-row">
    <tr>
      <td class="sticker-horizontal-separator"></td>
      <td class="sticker-vertical-separator"></td>
      <td class="sticker-horizontal-separator"></td>
      <td class="sticker-horizontal-separator"></td>
      <td class="sticker-vertical-separator"></td>
      <td class="sticker-horizontal-separator"></td>
    </tr>
    <tr>
      <tal:sticker_loop repeat="item items">
        <td class="sticker-horizontal-separator"></td>
        <td class="sticker-cell">
            <tal:sticker define="sample_id item/getId;
                                 client_sample_id item/getClientSampleID|nothing;
                                 hazardous item/getHazardous|nothing;">

            <!-- Barcode -->
            <div class="barcode"
                 tal:attributes="data-id sample_id;"
                 data-code="code93"
                 data-barHeight="10"
                 data-addQuietZone="true"
                 data-showHRI="false">
            </div>

            <!-- Some additional info about the sample -->
            <div class="sample-info">
              <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                  <td>
                    <img tal:condition="hazardous | nothing"
                         height="16"
                         tal:attributes="src string:${portal_url}/senaite_theme/icon/hazardous"/>
                    <strong tal:content="sample_id">Sample ID</strong>
                  </td>
                </tr>
                <tr>
                  <td class="client-sample-id" tal:content="python:'%s: %s' % ('CSID', client_sample_id)"/>
                </tr>
              </table>
            </div>
          </tal:sticker>
        </td>
        <td class="sticker-horizontal-separator"></td>
      </tal:sticker_loop>
    </tr>
    <tr>
      <td class="sticker-horizontal-separator"></td>
      <td class="sticker-vertical-separator"></td>
      <td class="sticker-horizontal-separator"></td>
      <td class="sticker-horizontal-separator"></td>
      <td class="sticker-vertical-separator"></td>
      <td class="sticker-horizontal-separator"></td>
    </tr>
  </table>
</tal:stickers>
