[% IF records;
IF NOT records.size %]
No records found matching "[% params.search || params.category %]"
[% 'category' IF params.category %]
[% ELSE # have records %]
Total records: [% records.size %]
[% SET needs_filter = ( records.size >= 100 AND NOT params.category );
filter_title = needs_filter ? 'Filter selected' : 'SELECT FILTER' %]
[% IF records.size > 1 # no need for filter if less %]
[% filter_title %]
[% END %]
[% IF records.size < 100 OR params.category # need category if > 100 %]
| Date |
Category |
Detail |
Retained |
Uploaded |
[% USE date(format = '%d/%m/%Y');
FOREACH entry IN records %]
| [% date.format(entry.date _ " 00:00:00") # add time to satisfy requirement %] |
[% entry.category.ucfirst %] |
[% entry.description %] [[%-
IF entry.comment.match('^http') %][% entry.comment %][%- ELSE %][% entry.comment %][% END %]]
[% IF entry.filename %]
[% END %]
|
[% entry.retained.upper %] |
[% date.format(entry.time) %] |
[% END %]
[% END; END %]
[% END %]