RSS Git Download  Clone
Raw Blame History
<!-- BEGIN [% template.name %] -->
    [% # INCLUDE dumper.tt dump = data %]

  [% META title = 'Worklist &raquo; Outreach Reports to Issue' -%]

  [% # define some data structures:
    headers = [ 'LabNo' 'Name' 'Print' 'NHS No.' 'Auth Date' 'Location' 'Enter' ];
  %]

  [% IF requests.size %]
  <h3 class="header">Authorised Outreach reports to issue [[% requests.size %]]</h3>

  <form method="post" action="[% app_url %]/outreach/do_reports_issued"
      name="worksheet">

    <table class="indent">
      <tr class="borderless">
        <td colspan="7" align="right">
          <input type="button" name="CheckAll" value="Select all"
            onClick="checkAll(document.worksheet.request_id)">
          <input type="button" name="UnCheckAll" value="Clear all"
            onClick="uncheckAll(document.worksheet.request_id)">
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        [% FOREACH item IN headers %]
          <th scope="">[% item | html_line_break %]</th>
        [% END %]
      </tr>

      [% FOREACH data IN requests; # PROCESS dumper.tt dump = data.as_tree %]
      <tr>
        <td>[% loop.count %]
       <td>[% INCLUDE site/lab_number.tt want_url = 1 %]</td>
       <td>
           [% data.last_name  | upper %],
           [% data.first_name | ucfirst %]
       </td>
       <td>
            <a href="[% app_url %]/request/print_record/[% data.id %]"
                    class="image">
                <img src="/images/print_icon_sm.png" /></a>
       </td>
       <td>[% data.nhs_number %]</td>
       <td>[% data.auth_datetime.strftime('%d.%b.%Y') %]</td>
       <td>[% data.location %]</td>
       <td>
          <input type="checkbox" name="request_id" value="[% data.id %]" />
          [% data.request_number _ '/' _ ( data.year - 2000 ) %]
       </td>
      </tr>
      [% END %]
      <tr class="borderless">
        <td colspan="7" align="center">
          <input type="button" name="CheckAll" value="Select all"
            onClick="checkAll(document.worksheet.request_id)">
          <input type="button" name="UnCheckAll" value="Clear all"
            onClick="uncheckAll(document.worksheet.request_id)">
          [% site.html.submit %]
        </td>
      </tr>
    </table>
  </form>

  [% ELSE %]
    <p class="info indent">No authorised Outreach reports to issue</p>
  [% END %]
<!-- END [% template.name %] -->