<!-- BEGIN history/categories.tt -->

    <h3 class="header">Request history:</h3>
    [% IF categorical.request_data.size %]
        <div class="indent">
            <table class="history">
                <tr>
                    <th>Day</th>
                    <th>Date</th>
                    <th>Time</th>
                    <th>UserID</th>
                    <th>Action</th>
                </tr>
                [% FOREACH event IN categorical.request_data %]
                    <tr class="[% loop.count % 2 ? 'normal' : 'bkgd_grey' %]">
                        <td>
                            [% event.time.strftime('%a') %]
                        </td>
                        <td>
                            [% event.time.strftime('%d.%b.%Y') %]
                        </td>
                        <td>
                            [% event.time.strftime('%T') %]
                        </td>
                        <td>
                            [% event.user.username | upper %]
                        </td>
                        <td>
                            [% event.action.replace('_', ' ') | html;
                                INCLUDE report_diff IF is_lab_user %]
                        </td>
                    </tr>
                [% END %]
            </table>
        </div>
    [% ELSE %]
        <p class="indent">[ NONE ]</p>
    [% END %]

    [% IF is_lab_user %]
        <h3 class="header">Lab test history:</h3>
        [% IF categorical.lab_test_data.size;
            # PROCESS dumper.tt dump = categorical.lab_test_data %]
    
            <div class="indent">
                <table class="history">
                    <tr>
                        <th>Day</th>
                        <th>Date</th>
                        <th>Time</th>
                        <th>UserID</th>
                        <th>Action</th>
                    </tr>
                    [% FOREACH event IN categorical.lab_test_data %]
                        <tr class="[% loop.count % 2 ? 'normal' : 'bkgd_grey' %]">
                            <td>
                                [% event.time.strftime('%a ') %]
                            </td>
                            <td>
                                [% event.time.strftime('%d.%b.%Y') %]
                            </td>
                            <td>
                                [% event.time.strftime('%T') %]
                            </td>
                            <td>
                                [% event.user.username | upper %]
                            </td>
                            <td>
                                [% event.action %]
                            </td>
                        </tr>
                    [% END %]
                </table>
            </div>
        [% ELSE %]
            <p class="indent">[ NONE ]</p>
        [% END %]
    [% END %]
<!-- END history/categories.tt -->
