[% META title = 'Admin » Lab Test Accreditation' -%]
<!-- BEGIN [% template.name %] -->
[% # PROCESS dumper.tt dump = s.as_tree FOR s IN lab_sections %]
[% # PROCESS dumper.tt dump = t.as_tree FOR t IN lab_tests %]
[% # PROCESS dumper.tt dump = [d.key, d.value.datetime] FOR d IN data %]
<h2 align="center">Accredited Lab Tests</h2>
<form method="get" action="[% app_url %]/admin/lab_test_accreditation"
name="section" id="section">
<p class="title">Select lab section:
<select name="lab_section_id" onChange="submit()">
<option value="">-- none --</option>
[% FOREACH section IN lab_sections %]
<option value="[% section.id %]"
[% 'selected' IF section.id == c.query.param('lab_section_id') %]>
[% section.section_name %]
</option>
[% END %]
</select>
[% # site.html.submit %]
</p>
</form>
[% IF lab_tests.size %]
<div class="indent">
<table>
<tr>
<td class="borderless"></td>
<th>Test name</th>
<th>Test type</th>
<th>Accreditation date</th>
<td class="borderless"></td>
</tr>
[% FOREACH t IN lab_tests; # PROCESS dumper.tt dump = t.as_tree; %]
<tr>
<td align="right">[% loop.count %]</td>
<td>[% t.field_label %]</td>
<td>[% t.test_type %]</td>
<td align="center">[% data.${t.id}.dmy %]</td>
<td><a href="[% c.query.url(path_info=1) %]/edit/[% t.id %]">Edit</a></td>
</tr>
[% END %]
</table>
<p class="center">
[% site.html.submit %]
[% site.html.reset %]
</p>
</div>
[% ELSE %]
[% END %]
<!-- END [% template.name %] -->