aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-11-22 15:24:56 +0000
committerStruan Donald <struan@exo.org.uk>2012-11-22 15:24:56 +0000
commit0754d06f830c9eaf148ee276def1a80cbc04e83b (patch)
tree88e3b4d95a09f4bb9cb38e9468710f01b72c7f04
parentf558f9913c06408ea1fb3edabf0991e48556eb79 (diff)
Add ability to configure if council users can hide reports plus template
support for this
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Stevenage.pm2
-rw-r--r--templates/web/fixmystreet/report/display.html6
3 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 6324030b8..dcadd9b52 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -728,5 +728,7 @@ sub can_support_problems { return 0; }
sub default_map_zoom { undef };
+sub users_can_hide { return 0; }
+
1;
diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm
index 5f6ac81e8..f7a9ccd84 100644
--- a/perllib/FixMyStreet/Cobrand/Stevenage.pm
+++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm
@@ -34,5 +34,7 @@ sub example_places {
sub default_map_zoom { return 3; }
+sub users_can_hide { return 1; }
+
1;
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
index c71694da5..8c6498448 100644
--- a/templates/web/fixmystreet/report/display.html
+++ b/templates/web/fixmystreet/report/display.html
@@ -23,7 +23,13 @@
<div class="shadow-wrap">
<ul id="key-tools">
+ [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_council( c.cobrand.council_id ) %]
+ <li><form method="post" action="/report/delete/[% problem.id %]">
+ <input type="submit" id="key-tool-report-abuse" 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-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
[% IF c.cobrand.moniker == 'fixmystreet' %]
<li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li>