diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 11 | ||||
-rw-r--r-- | templates/web/default/admin/list_updates.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-dm.html | 28 | ||||
-rw-r--r-- | templates/web/zurich/admin/list_updates.html | 16 |
4 files changed, 27 insertions, 30 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 51daf58f5..6ef0f4f77 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -78,13 +78,12 @@ sub admin { state => 'unconfirmed', bodies_str => $c->stash->{body}->id, }); - $c->stash->{approval} = $c->model('DB::Comment')->search({ - 'problem.state' => 'in progress', - 'problem.bodies_str' => \@children, - 'me.state' => 'unconfirmed' - }, { join => 'problem' } ); + $c->stash->{approval} = $c->cobrand->problems->search({ + state => 'planned', + bodies_str => $c->stash->{body}->id, + }); $c->stash->{other} = $c->cobrand->problems->search({ - state => { '!=', 'unconfirmed' }, + state => { -not_in => [ 'unconfirmed', 'planned' ] }, bodies_str => \@all, }); } elsif ($type eq 'sdm') { diff --git a/templates/web/default/admin/list_updates.html b/templates/web/default/admin/list_updates.html index 0b2b6a88a..ff0ec2f31 100644 --- a/templates/web/default/admin/list_updates.html +++ b/templates/web/default/admin/list_updates.html @@ -33,6 +33,6 @@ <td>[% update.cobrand %]<br>[% update.cobrand_data | html %]</td> <td>[% update.text | html %]</td> <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> - <tr> + </tr> [% END -%] </table> diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index 0e6bd7dc9..7b30c1861 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -5,36 +5,18 @@ 'unconfirmed' = loc('Submitted'), 'confirmed' = loc('Open'), 'in progress' = loc('In progress'), - 'fixed - council' = loc('Fixed'), + 'planned' = loc('Feedback pending'), + 'fixed - council' = loc('Closed'), 'hidden' = loc('Hidden'), - 'closed' = loc('Third party'), + 'closed' = loc('Closed'), } %] <h2>New reports</h2> [% INCLUDE list, problems = unconfirmed.all %] -<h2>Updates needing attention</h2> -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('ID') %]</th> - <th>[% loc('Problem ID') %]</th> - <th>[% loc('Category') %]</th> - <th>[% loc('Text') %]</th> - <th>[% loc('Created') %]</th> - <th>*</th> - </tr> -[%- FOR update IN approval.all %] - <tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]> - <td>[% update.id %]</td> - <td>[% update.problem.id %]</td> - <td>[% update.problem.category %]</td> - <td>[% update.text %]</td> - <td>[% PROCESS format_time time=update.created %]</td> - <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> - </tr> -[%- END -%] -</table> +<h2>[% loc('Feedback pending') %]</h2> +[% INCLUDE list, problems = approval.all %] <h2>All reports</h2> [% INCLUDE list, problems = other.all %] diff --git a/templates/web/zurich/admin/list_updates.html b/templates/web/zurich/admin/list_updates.html new file mode 100644 index 000000000..e8b8a059b --- /dev/null +++ b/templates/web/zurich/admin/list_updates.html @@ -0,0 +1,16 @@ +<h2>[% loc('Updates') %]</h2> + +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Created') %]</th> + <th>[% loc('Text') %]</th> + </tr> +[% FOREACH update IN updates -%] + <tr[% ' class="adminhidden"' IF update.state == 'hidden' || update.problem.state == 'hidden' %]> + <td>[%- update.id %]</td> + <td>[% PROCESS format_time time=update.created %]</td> + <td>[% update.text | html %]</td> + </tr> +[% END -%] +</table> |