diff options
author | Steven Day <steve@mysociety.org> | 2015-06-23 16:16:20 +0100 |
---|---|---|
committer | Steven Day <steve@mysociety.org> | 2015-06-29 12:43:02 +0100 |
commit | a6031c12e7a0f69ecdfa104387d0ae245a513d5f (patch) | |
tree | fee63e81df0b767fbaa77ca5b4ecb3c5956378bf | |
parent | be12a9abd8447ecba3d6468a3ec0059dcf480e93 (diff) |
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
-rw-r--r-- | templates/web/base/reports/_problem-list.html | 19 | ||||
-rwxr-xr-x | templates/web/base/reports/body.html | 19 |
2 files changed, 20 insertions, 18 deletions
diff --git a/templates/web/base/reports/_problem-list.html b/templates/web/base/reports/_problem-list.html new file mode 100644 index 000000000..45746e309 --- /dev/null +++ b/templates/web/base/reports/_problem-list.html @@ -0,0 +1,19 @@ +<section class="full-width"> + [% INCLUDE column + problems = problems.${body.id} + %] +</section> + +[% BLOCK column %] + <ul class="issue-list-a"> + [% IF problems %] + [% FOREACH problem IN problems %] + [% INCLUDE 'reports/_list-entry.html' %] + [% END %] + [% ELSE %] + <li class="empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> + [% END %] + </ul> +[% END %] diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html index 31d708917..841e3db60 100755 --- a/templates/web/base/reports/body.html +++ b/templates/web/base/reports/body.html @@ -88,26 +88,9 @@ [% INCLUDE 'pagination.html', param = 'p' %] -<section class="full-width"> - [% INCLUDE column - problems = problems.${body.id} - %] -</section> +[% INCLUDE 'reports/_problem-list.html' %] [% INCLUDE 'pagination.html', param = 'p' %] </div> [% INCLUDE 'footer.html' %] - -[% BLOCK column %] -[% IF problems %] - -<ul class="issue-list-a"> -[% FOREACH problem IN problems %] - [% INCLUDE 'reports/_list-entry.html' %] -[% END %] -</ul> - -[% END %] -[% END %] - |