aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2014-06-06 11:37:06 +0000
committerHakim Cassimally <hakim@mysociety.org>2014-08-14 09:44:36 +0000
commit8d97bff0663729b2abea6f7a38a547515cb23f9a (patch)
tree299cb680904e93ebdc5a6a81e6738ec3270c6eb9
parent963bfbc11643e0499162e33161ab539c6dcb611f (diff)
Move bromley from report hiding to moderation
The feature to hide reports is still enabled, as it is used by other `users_can_hide` bodies. As we want to roll out moderation to Bromley, in this commit we hide the functionality *only* for Bromley. Of course if we migrate those other users to this moderation method, then we will need to make equivalent change to general template, and remove the functionality from Report.pm.
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm13
-rw-r--r--templates/web/bromley/report/display.html8
2 files changed, 14 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 13a347a90..c20a6754a 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -211,6 +211,19 @@ sub generate_map_tags : Private {
return 1;
}
+=head2 delete
+
+Endpoint for the council report hiding feature enabled for
+C<users_can_hide> bodies, and Bromley. The latter is migrating
+to moderation, however we'd need to inform all the other
+users too about this change, at which point we can delete:
+
+ - this method
+ - the call to it in templates/web/fixmystreet/report/display.html
+ - the users_can_hide cobrand method, in favour of user->has_permission_to
+
+=cut
+
sub delete :Local :Args(1) {
my ( $self, $c, $id ) = @_;
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index 67802e82a..a4bd76fdc 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -20,13 +20,7 @@
<div class="shadow-wrap">
<ul id="key-tools">
- [% IF c.user_exists AND c.user.body == 'Bromley Council' %]
- <li><form method="post" action="/report/delete/[% problem.id %]">
- <input type="submit" class="abuse" value="Remove from site">
- </form></li>
- [% ELSE %]
- <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse') %]</a></li>
- [% END %]
+ <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse') %]</a></li>
<li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
<li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
</ul>