[% META title = 'Resources » User Workload' %]
<!-- BEGIN [% template.name %] -->
[% # PROCESS dumper.tt dump = data %]
[%
actions = data.keys;
cols = ['BMAT' 'BMA' 'PB' 'Tissue' 'Other'];
%]
<form action="[% app_url%]/audit/user_workload" method="post">
<h3>
Workload by user for past [% c.stash.duration %] days
or enter new: <input type="text" name="duration" size="2" />
[% site.html.go_btn %]
</h3>
</form>
<div class="indent">
[% FOREACH action IN actions.sort.reverse; # happy co-incidence !!
users = data.item(action); # PROCESS dumper.tt dump = users; %]
<h4>[% action | ucfirst %]</h4>
<table class="indent tbl_header_darken">
<tr>
<th>UserID</th>
[% FOREACH col IN cols %]
<th>[% col %]</th>
[% END %]
</tr>
[% FOREACH user IN users.keys.sort;
results = data.item(action).item(user);
class = c.authen.username == user
? 'bkgd_light_yellow' : 'normal';
%]
<tr class="[% class %]">
<td class="label">[% user | upper %]</td>
[% FOREACH col IN cols %]
<td align="center">
[% results.item(col) || site.html.grey_null %]
</td>
[% END %]
</tr>
[% END %]
</table>
[% END %]
</div>
<p>[% site.html.back_button %]</p>
<!-- END [% template.name %] -->