diff options
Diffstat (limited to 'templates/web/base/admin/index.html')
-rw-r--r-- | templates/web/base/admin/index.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/templates/web/base/admin/index.html b/templates/web/base/admin/index.html index 8c49a5685..dde6523a3 100644 --- a/templates/web/base/admin/index.html +++ b/templates/web/base/admin/index.html @@ -55,14 +55,16 @@ and to receive notices of updates. <h2>[% loc('Update breakdown by state') %]</h2> [% PROCESS states object=comments list=comments.keys.sort %] -[% FOREACH category IN categories %] - [% IF loop.first %] - <h2>[% loc('Category fix rate for problems > 4 weeks old') %]</h2> +[% IF categories.size %] + <h2 id="category-fix-rate">[% loc('Category fix rate for problems > 4 weeks old') %]</h2> <table> <tr><th>[% loc('Category') %]</th><th>[% loc('Total') %]</th><th>[% loc('Fixed') %]</th></tr> - [% END %] +[% FOREACH category IN categories %] <tr><td>[% category.key %]</td><td>[% category.value.total %]</td><td>[% category.value.fixed / category.value.total * 100 | format('%.1f') %]%</td></tr> - [% '</table>' IF loop.last %] +[% END %] + </table> +[% ELSE %] +<p><a href="?show_categories=1#category-fix-rate">[% loc('Category fix rate for problems > 4 weeks old') %]</a></p> [% END %] [% INCLUDE 'admin/footer.html' %] |