aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-05 15:23:55 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-05 16:05:53 +0000
commitcd8e76997219d5f1fca3430e2b9649cd221e5932 (patch)
treef943851ae4af19142ad0c9ad878f28f12273a396 /perllib
parent81caf2f758251eef817ac2bd0debf02794ed663c (diff)
Reports list, and start of pagination.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 121aa2562..faad88f1f 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -584,6 +584,15 @@ sub reports : Path('reports') {
# Switch quoting back off. See above for explanation of this.
$c->model('DB')->schema->storage->sql_maker->quote_char( '' );
+ } else {
+
+ my $page = $c->req->params->{p} || 1;
+ my $problems = $c->cobrand->problems->search(
+ { },
+ { order_by => 'created desc' }
+ )->page( $page );
+ $c->stash->{problems} = [ $problems->all ];
+ $c->stash->{pager} = $problems->pager;
}
}