diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-22 09:16:12 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-06-22 09:16:12 +0100 |
commit | 4d646d87ad5a603d046c6c3e23e9688bf058ebcc (patch) | |
tree | bb9e307174d56827a966f38b6a8b30f83ecb03b6 /perllib/FixMyStreet | |
parent | 56999c8a8bc9515a67b46702607ba2d6a6cbd28a (diff) |
add new states into admin
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index abc454600..ae4154e98 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -56,10 +56,12 @@ sub index : Path : Args(0) { %prob_counts = map { $_ => $prob_counts{$_} || 0 } - qw(confirmed fixed unconfirmed hidden partial); + ('confirmed', 'investigating', 'in progress', 'closed', 'fixed - council', + 'fixed - user', 'fixed', 'unconfirmed', 'hidden', + 'partial', 'planned'); $c->stash->{problems} = \%prob_counts; - $c->stash->{total_problems_live} = - $prob_counts{confirmed} + $prob_counts{fixed}; + $c->stash->{total_problems_live} += $prob_counts{$_} + for ( FixMyStreet::DB::Result::Problem->visible_states() ); my $comments = $c->model('DB::Comment')->summary_count( $site_restriction ); @@ -740,7 +742,7 @@ sub update_edit : Path('update_edit') : Args(1) { # If we're hiding an update, see if it marked as fixed and unfix if so if ( $new_state eq 'hidden' && $update->mark_fixed ) { - if ( $update->problem->state eq 'fixed' ) { + if ( $update->problem->is_fixed ) { $update->problem->state('confirmed'); $update->problem->update; } |