[%# META title = 'Summary' %]
[% # PROCESS dumper.tt dump = records %]
<div class="container">
<div class="row">
<legend class="form-file-upload-heading">
Summary
</legend>
</div>
<div class="row">
<div class="container span12">
<span class="pull-right">
<a href="[% uri_for_section.dpw.home %]">« return</a>
</span>
<script type="text/javascript">
jQuery(function() {
jQuery('#category_select').change(function() {
this.form.submit();
});
});
</script>
<div class="input-group flex-nowrap mt-2 mb-2">
<span class="input-group-text col-md-2" id="title">Filter</span>
<form action="[% uri_for_section.dpw.summary %]" id="filter" method="post">
<select name="category" class="form-control" id="category_select">
<option value="">--- select ---</option>
[% FOREACH opt in dpw_categories.sort %]
<option value="[% opt %]" [% 'selected' IF params.category.match(opt) %]>
[% opt.ucfirst %]</option>
[% END %]
</select>
</form>
</div>
<table class="table table-bordered table-striped table-condensed">
<tr>
<th>Date</th>
<th>Category</th>
<th>Detail</th>
<th>Retained</th>
<th>Uploaded</th>
</tr>
[% USE date(format = '%d/%m/%Y');
FOREACH entry IN records %]
<tr>
<td>[% date.format(entry.date _ " 00:00:00") # add time to satisfy requirement %]</td>
<td>[% entry.category.ucfirst %]</td>
<td>
<a href="[% uri_for_section.dpw.document %]/[% entry.id %]">
[% entry.description %]</a> [[% entry.comment %]]
<a href="[% uri_for_section.dpw.download %]/[% entry.category %]/[% entry.filename %]"
target="_blank"><i class="bi bi-file-pdf"></i>
</a>
</td>
<td>[% entry.retained.upper %]</td>
<td>[% date.format(entry.time) %]</td>
</tr>
[% END %]
</table>
</div>
</div>
</div>