diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-10 17:27:18 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-08-09 18:32:04 +0100 |
commit | bf2583d2221e75f7cecdd94ca573b0ecc4d387de (patch) | |
tree | 3972916bbddab187ae9a5725d9ad297bc4c46ebb /perllib/FixMyStreet/App/Controller/Admin.pm | |
parent | e46f7af02ad2b54033bc9c525e7473ca256d9188 (diff) |
list flagged items page for admin
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index e1ced4a25..de90321a0 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -715,6 +715,22 @@ sub search_abuse : Path('search_abuse') : Args(0) { return 1; } +sub list_flagged : Path('list_flagged') : Args(0) { + my ( $self, $c ) = @_; + + $c->forward('set_allowed_pages'); + + my $problems = $c->model('DB::Problem')->search( { flagged => 1 } ); + + $c->stash->{problems} = $problems; + + my $users = $c->model('DB::User')->search( { flagged => 1 } ); + + $c->stash->{users} = $users; + + return 1; +} + =head2 set_allowed_pages Sets up the allowed_pages stash entry for checking if the current page is @@ -735,10 +751,11 @@ sub set_allowed_pages : Private { 'timeline' => [_('Timeline'), 3], 'questionnaire' => [_('Survey Results'), 4], 'search_abuse' => [_('Search Abuse'), 5], - 'council_contacts' => [undef, undef], - 'council_edit' => [undef, undef], - 'report_edit' => [undef, undef], - 'update_edit' => [undef, undef], + 'list_flagged' => [_('List Flagged'), 6], + 'council_contacts' => [undef, undef], + 'council_edit' => [undef, undef], + 'report_edit' => [undef, undef], + 'update_edit' => [undef, undef], 'abuse_edit' => [undef, undef], } } |