diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 3 | ||||
-rw-r--r-- | templates/web/default/admin/index.html | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 133c83024..69238f90f 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -130,6 +130,9 @@ sub index : Path : Args(0) { $c->stash->{categories} = $c->cobrand->problems->categories_summary(); + if ($c->config->{SHOW_ADMIN_HINTS}) { + $c->stash->{total_bodies} = $c->model('DB::Body')->count(); + } return 1; } diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html index 2c5ee55db..d88897872 100644 --- a/templates/web/default/admin/index.html +++ b/templates/web/default/admin/index.html @@ -1,5 +1,13 @@ [% INCLUDE 'admin/header.html' title=loc('Summary') -%] +[% IF c.config.SHOW_ADMIN_HINTS AND total_bodies == 0 %] + <p class="fms-admin-info"> + [% loc('Currently no bodies have been created.') %] + <br> + [% tprintf( loc('You need to <a href="%s">add some bodies</a> (such as councils or departments) before any reports can be sent.'), c.uri_for('bodies')) %] + </p> +[% END %] + [%- BLOCK states -%] <h2>[% title %]</h2> |