aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/report
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default/report')
-rw-r--r--templates/web/default/report/display.html2
-rw-r--r--templates/web/default/report/update.html22
-rw-r--r--templates/web/default/report/updates.html52
3 files changed, 44 insertions, 32 deletions
diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html
index 999d332d2..abfff624f 100644
--- a/templates/web/default/report/display.html
+++ b/templates/web/default/report/display.html
@@ -1,7 +1,7 @@
[%
PROCESS "maps/${map.type}.html";
- problem_title = problem.title _ ' - ' _ loc('Viewing a problem') | html;
+ problem_title = problem.title _ ' - ' _ loc('Viewing a problem');
INCLUDE 'header.html'
title = problem_title
rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ]
diff --git a/templates/web/default/report/update.html b/templates/web/default/report/update.html
new file mode 100644
index 000000000..048968eae
--- /dev/null
+++ b/templates/web/default/report/update.html
@@ -0,0 +1,22 @@
+[% IF loop.first %]
+<div id="updates">
+ <h2 class="problem-update-list-header">[% loc('Updates') %]</h2>
+[% END %]
+ <div><div class="problem-update"><p><a name="update_[% update.id %]"></a><em>
+ [% INCLUDE meta_line %]
+ </em></p></div>
+[% IF NOT update.whenanswered %]
+ <div class="update-text">
+ [% add_links( update.text ) | html_para %]
+
+ [% INCLUDE 'report/photo.html' object=update %]
+
+ [% IF c.cobrand.allow_update_reporting %]
+ <p align="right">
+ <small><a rel="nofollow" class="unsuitable-problem" href="[% c.uri_for( '/contact', { id => update.problem_id, update_id => update.id } ) %]">[% loc('Offensive? Unsuitable? Tell us') %]</a></small>
+ </p>
+ [% END %]
+ </div>
+[% END %]
+ </div>
+[% '</div>' IF loop.last %]
diff --git a/templates/web/default/report/updates.html b/templates/web/default/report/updates.html
index 4fd3c75d4..374a7c570 100644
--- a/templates/web/default/report/updates.html
+++ b/templates/web/default/report/updates.html
@@ -1,36 +1,26 @@
-[% FOREACH update IN updates.all %]
-[% IF loop.first %]
-<div id="updates">
- <h2 class="problem-update-list-header">[% loc('Updates') %]</h2>
+[% FOREACH update IN updates %]
+[% INCLUDE 'report/update.html' %]
[% END %]
- <div><div class="problem-update"><p><a name="update_[% update.id %]"></a><em>
- [% IF update.anonymous || update.name == '' %]
- [% tprintf( loc( 'Posted anonymously at %s' ), prettify_epoch( update.confirmed_local.epoch ) ) -%]
- [%- ELSIF update.user.from_council %]
- [% user_name = update.user.name | html %]
- [% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, update.user.council, prettify_epoch( update.confirmed_local.epoch ) ) -%]
- [%- ELSE %]
- [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html -%]
- [%- END -%]
- [%- c.cobrand.extra_update_meta_text(update) -%]
- [%- ", " _ loc( 'marked as fixed' ) IF update.mark_fixed %]
- [%- ", " _ loc( 'reopened' ) IF update.mark_open %]
- [%- ", " _ tprintf(loc( 'marked as %s' ), update.meta_problem_state) IF update.problem_state %]
- </em></p>
- </div>
+[% BLOCK meta_line %]
- <div class="update-text">
- [% add_links( update.text ) | html_para %]
+ [% IF update.whenanswered %]
+ [%# A questionnaire update, currently saying report is still open %]
+ [% tprintf( loc( 'Still open, via questionnaire, %s' ), prettify_epoch( update.whenanswered_local.epoch ) ) %]
+ [% RETURN %]
+ [% END %]
- [% INCLUDE 'report/photo.html' object=update %]
-
- [% IF c.cobrand.allow_update_reporting %]
- <p align="right">
- <small><a rel="nofollow" class="unsuitable-problem" href="[% c.uri_for( '/contact', { id => update.problem_id, update_id => update.id } ) %]">[% loc('Offensive? Unsuitable? Tell us') %]</a></small>
- </p>
- [% END %]
- </div>
- </div>
-[% '</div>' IF loop.last %]
+ [% IF update.anonymous || update.name == '' %]
+ [% tprintf( loc( 'Posted anonymously at %s' ), prettify_epoch( update.confirmed_local.epoch ) ) -%]
+ [%- ELSIF update.user.from_council %]
+ [% user_name = update.user.name | html %]
+ [% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, update.user.council, prettify_epoch( update.confirmed_local.epoch ) ) -%]
+ [%- ELSE %]
+ [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html -%]
+ [%- END -%]
+ [%- c.cobrand.extra_update_meta_text(update) -%]
+ [%- ", " _ loc( 'marked as fixed' ) IF update.mark_fixed %]
+ [%- ", " _ loc( 'reopened' ) IF update.mark_open %]
+ [%- ", " _ tprintf(loc( 'marked as %s' ), update.meta_problem_state) IF update.problem_state %]
[% END %]
+