diff options
author | Dave Arter <davea@mysociety.org> | 2015-06-23 16:16:51 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-07-23 11:46:40 +0100 |
commit | 35967326ec05ecc0dfd82e1a347dfd3cefdf1cc1 (patch) | |
tree | c997430b8c2ef351520c12c580097aa56048576a /templates | |
parent | a5d74c06da94b3b157097a23cfff65296edb45b4 (diff) |
[Oxfordshire] Display message when reports list is empty
If filters for reports list are too restrictive, shows a message to
the user indicating that no reports match the query, on /my and
/reports
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/oxfordshire/my/_problem-list.html | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/templates/web/oxfordshire/my/_problem-list.html b/templates/web/oxfordshire/my/_problem-list.html index e0f16586a..1ff69f9fb 100644 --- a/templates/web/oxfordshire/my/_problem-list.html +++ b/templates/web/oxfordshire/my/_problem-list.html @@ -1,12 +1,14 @@ -[% FOREACH p = problems.all %] - [% INCLUDE problem %] -[% END %] - -[% BLOCK problem %] - [% "<ul class='issue-list-a full-width'>" IF loop.first %] - [% INCLUDE 'reports/_list-entry.html', problem = p, no_fixed =1 %] - [% "</ul>" IF loop.last %] -[% END %] +<ul class='issue-list-a full-width'> + [% IF problems.all %] + [% FOREACH p = problems.all %] + [% INCLUDE 'reports/_list-entry.html', problem = p, no_fixed =1 %] + [% END %] + [% ELSE %] + <li class="empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> + [% END %] +</ul> [% IF ! problems.size %] <!-- Preserve behaviour of map filters despite map not being shown --> |