diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 10 | ||||
-rw-r--r-- | templates/web/default/admin/report_edit.html | 5 |
2 files changed, 10 insertions, 5 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; } diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html index 9c38b014e..551f80127 100644 --- a/templates/web/default/admin/report_edit.html +++ b/templates/web/default/admin/report_edit.html @@ -19,7 +19,10 @@ <option [% 'selected ' IF !problem.anonymous %]value="0">[% loc('No') %]</option> </select></li> <li><label for="state">[% loc('State:') %]</label> <select name="state" id="state"> - [% FOREACH state IN [ ['confirmed', loc('Open')], ['fixed', loc('Fixed')], ['hidden', loc('Hidden')], ['partial', loc('Partial')],['unconfirmed',loc('Unconfirmed')] ] %] + [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', + loc('Investigating')], ['planned', loc('Planned')], ['in progress', + loc('In Progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')], ['fixed - user', + loc('Fixed - User')], ['fixed - council', loc('Fixed - Council')], ['hidden', loc('Hidden')], ['partial', loc('Partial')],['unconfirmed',loc('Unconfirmed')] ] %] <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> [% END %] </select></li> |