diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-15 13:05:17 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-23 18:55:10 +0100 |
commit | 15678f4923a3395fc3bb4b6c6cc82cf38d09021e (patch) | |
tree | a8ae0b8b0a1d48f79e41fcaedcd5dd155620e8ec /templates | |
parent | eb58ad65f8b25be9dc4321ca5914ad1d89f8bf3a (diff) |
Add ability to close updates on reports.
The inactive report script can mark matched reports as closed for updates.
This removes the update form and signing up for updates from a report page.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/report/display.html | 4 | ||||
-rw-r--r-- | templates/web/base/report/display_tools.html | 2 | ||||
-rw-r--r-- | templates/web/base/report/update-form.html | 2 | ||||
-rw-r--r-- | templates/web/bromley/report/update-form.html | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html index f9c42b35d..8c461dced 100644 --- a/templates/web/base/report/display.html +++ b/templates/web/base/report/display.html @@ -53,7 +53,7 @@ [% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %] [% INCLUDE 'report/updates.html' %] -[% IF two_column_sidebar %] +[% IF two_column_sidebar AND NOT problem.extra.closed_updates %] <button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button> <div class="hidden-js"> [% END %] @@ -62,7 +62,7 @@ [% ELSIF NOT shown_form %] [% INCLUDE 'report/update-form.html' %] [% END %] -[% IF two_column_sidebar %] +[% IF two_column_sidebar AND NOT problem.extra.closed_updates %] </div> [% END %] diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html index 8ed86c228..e0d8e3f99 100644 --- a/templates/web/base/report/display_tools.html +++ b/templates/web/base/report/display_tools.html @@ -10,7 +10,7 @@ c.cobrand.moniker == 'fixmystreet' ? 'Unsuitable?' : loc('Report abuse') %]</a></li> [% END %] - [% IF c.cobrand.moniker != 'zurich' %] + [% IF NOT problem.extra.closed_updates AND c.cobrand.moniker != 'zurich' %] <li><a rel="nofollow" id="key-tool-report-updates" class="feed js-feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li> [% END %] [% IF c.cobrand.moniker == 'fixmystreet' %] diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index 1e67c2072..9276acde9 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -1,5 +1,5 @@ [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %] -[% RETURN IF NOT allow_creation %] +[% RETURN IF NOT allow_creation OR problem.extra.closed_updates %] <div id="update_form"> [% IF NOT login_success AND NOT oauth_need_email %] diff --git a/templates/web/bromley/report/update-form.html b/templates/web/bromley/report/update-form.html index bdabe12c5..6c3ca9298 100644 --- a/templates/web/bromley/report/update-form.html +++ b/templates/web/bromley/report/update-form.html @@ -1,3 +1,6 @@ +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %] +[% RETURN IF NOT allow_creation OR problem.extra.closed_updates %] + <div id="update_form"> [% UNLESS hide_header %] <h2[% IF two_column_sidebar %] class="hidden-js"[% END %]>[% loc('Provide an update') %]</h2> |