aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/default/admin/bodies.html91
1 files changed, 50 insertions, 41 deletions
diff --git a/templates/web/default/admin/bodies.html b/templates/web/default/admin/bodies.html
index e0cf013d8..88dccc2b8 100644
--- a/templates/web/default/admin/bodies.html
+++ b/templates/web/default/admin/bodies.html
@@ -2,51 +2,60 @@
[% INCLUDE 'admin/edit-league.html' %]
-<table cellspacing="0" cellpadding="2" border="1">
- <tr>
- <th>[% loc('Name') %]</th>
+[% IF c.config.SHOW_ADMIN_HINTS AND bodies.size == 0 %]
+ <p class="fms-admin-info">
+ [% loc('Currently no bodies have been created.') %]
+ <br>
+ [% loc('You need to add bodies (such as councils or departments) so that you can then add
+ the categories of problems they can handle (such as potholes or streetlights) and the
+ contacts (such as an email address) to which reports are sent.') %]
+ </p>
+[% ELSE %]
+ <table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('Name') %]</th>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <th>[% loc('Email') %]</th>
+ [% ELSE %]
+ <th>[% loc('Category') %]</th>
+ [% END %]
+ </tr>
+ [%- FOREACH body IN bodies %]
+ [%- SET id = body.id %]
+ [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
+ <tr>
+ <td>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ [% FILTER repeat(4*body.api_key) %]&nbsp;[% END %]
+ [% END %]
+ [% IF admin_type == 'super' %]
+ <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
+ [% ELSE %]
+ <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
+ [% IF c.cobrand.moniker != 'zurich' %]
+ [%- ', ' _ body.parent.name IF body.parent -%]
+ [% END %]
+ </td>
[% IF c.cobrand.moniker == 'zurich' %]
- <th>[% loc('Email') %]</th>
+ <td>[% body.endpoint %]</td>
[% ELSE %]
- <th>[% loc('Category') %]</th>
- [% END %]
- </tr>
-[%- FOREACH body IN bodies %]
- [%- SET id = body.id %]
- [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
- <tr>
- <td>
- [% IF c.cobrand.moniker == 'zurich' %]
- [% FILTER repeat(4*body.api_key) %]&nbsp;[% END %]
- [% END %]
- [% IF admin_type == 'super' %]
- <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
+ <td>
+ [% IF counts.$id %]
+ [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %]
+ [% IF counts.$id.deleted %]
+ (1+ deleted)
+ [% ELSIF counts.$id.confirmed != counts.$id.c %]
+ (some unconfirmed)
+ [% END %]
[% ELSE %]
- [% body.name %]
+ no categories
[% END %]
- [% IF c.cobrand.moniker != 'zurich' %]
- [%- ', ' _ body.parent.name IF body.parent -%]
- [% END %]
- </td>
- [% IF c.cobrand.moniker == 'zurich' %]
- <td>[% body.endpoint %]</td>
- [% ELSE %]
- <td>
- [% IF counts.$id %]
- [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %]
- [% IF counts.$id.deleted %]
- (1+ deleted)
- [% ELSIF counts.$id.confirmed != counts.$id.c %]
- (some unconfirmed)
- [% END %]
- [% ELSE %]
- no categories
- [% END %]
- </td>
- [% END %]
- </tr>
-[%- END %]
-</table>
+ </td>
+ [% END %]
+ </tr>
+ [%- END %]
+ </table>
+[% END %]
[% IF c.cobrand.moniker == 'zurich' %]
[% IF admin_type == 'super' %]