diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | t/script/inactive.t | 3 | ||||
-rw-r--r-- | templates/web/base/report/display.html | 20 |
3 files changed, 16 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 82a204b9a..c94357485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Front end improvements: - Simplify footer CSS. #2107 - Keep commas in geocode lookups. + - Show message on reports closed to updates. - Bugfixes: - Don't remove automated fields when editing contacts #2163 - Remove small border to left of Fixed banner. #2156 diff --git a/t/script/inactive.t b/t/script/inactive.t index 4d78b385f..4667c989b 100644 --- a/t/script/inactive.t +++ b/t/script/inactive.t @@ -55,7 +55,8 @@ subtest 'Closing updates on inactive fixed/closed reports' => sub { $in->reports; $problems[2]->discard_changes; is $problems[2]->get_extra_metadata('closed_updates'), 1, 'Closed to updates'; - # TODO Visit page, check closed for updates + $mech->get_ok("/report/" . $problems[2]->id); + $mech->content_contains('now closed to updates'); }; subtest 'Anonymization of inactive users' => sub { diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html index 8c461dced..ebe969994 100644 --- a/templates/web/base/report/display.html +++ b/templates/web/base/report/display.html @@ -53,17 +53,23 @@ [% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %] [% INCLUDE 'report/updates.html' %] -[% 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 %] [% IF problem.duplicate_of %] [% INCLUDE 'report/duplicate-no-updates.html' %] +[% ELSIF problem.extra.closed_updates %] + <p>[% loc('This report is now closed to updates.') %] + [% tprintf(loc('You can <a href="%s">make a new report in the same location</a>.'), + c.uri_for( '/report/new', { longitude => longitude, latitude => latitude } ) + ) %] + </p> [% ELSIF NOT shown_form %] + [% IF two_column_sidebar %] + <button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button> + <div class="hidden-js"> + [% END %] [% INCLUDE 'report/update-form.html' %] -[% END %] -[% IF two_column_sidebar AND NOT problem.extra.closed_updates %] -</div> + [% IF two_column_sidebar %] + </div> + [% END %] [% END %] </div> |