aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-29 10:47:10 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-29 10:47:10 +0000
commitd772dfa161d474943d10f25b89892317d0222543 (patch)
tree47533ea5f1e812594c8eee83ebd4a0e1fe3e199a
parent57f79d16ea14dbc4ea1b0ec4e99041e0e7f6d6dd (diff)
Get Zurich superuser admin index page working a bit better.
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm4
-rw-r--r--templates/web/zurich/admin/index.html23
2 files changed, 25 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 9f356ac41..17bc3ca76 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -62,7 +62,7 @@ Displays some summary information for the requests.
sub index : Path : Args(0) {
my ( $self, $c ) = @_;
- if ($c->cobrand->moniker eq 'zurich') {
+ if ($c->cobrand->moniker eq 'zurich' && $c->stash->{admin_type} ne 'super') {
return $c->cobrand->admin();
}
@@ -937,7 +937,7 @@ sub user_edit : Path('user_edit') : Args(1) {
if ( $user->email ne $c->req->param('email') ||
$user->name ne $c->req->param('name' ) ||
- ($user->from_body && $user->from_body->id != $c->req->param('body')) ||
+ ($user->from_body && $user->from_body->id ne $c->req->param('body')) ||
(!$user->from_body && $c->req->param('body'))
) {
$edited = 1;
diff --git a/templates/web/zurich/admin/index.html b/templates/web/zurich/admin/index.html
new file mode 100644
index 000000000..ab835b5a3
--- /dev/null
+++ b/templates/web/zurich/admin/index.html
@@ -0,0 +1,23 @@
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
+
+<ul>
+ <li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %];
+ [% tprintf( loc('from %d different users'), total_problems_users ) %]</li>
+ <li>[% tprintf( loc('%d council contacts &ndash; %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li>
+</ul>
+
+[% IF c.cobrand.admin_show_creation_graph -%]
+ <p>
+ <a href="[% c.config.BASE_URL %]/fms-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a>
+ </p>
+[% END -%]
+
+<h2>[% loc('Problem breakdown by state') %]</h2>
+<ul>
+ [% FOREACH state IN problems.keys.sort %]
+ [% NEXT IF NOT states.$state %]
+ <li>[% problems.$state %] [% states.$state %]</li>
+ [% END %]
+</ul>
+
+[% INCLUDE 'admin/footer.html' %]