aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-13 18:15:00 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-13 18:15:00 +0100
commit3a13fb54e3d82983fc6ec5c117ef6f54f5929d31 (patch)
treec8df94e85cd4eedd490a741da3c5dacf0f71ce14
parentbe9141945396909f285110b4267e2adf27d2a6e6 (diff)
Photos always on front page, /reports uses confirmed, not confirmed_local.
-rw-r--r--templates/web/fixmystreet/index.html3
-rw-r--r--templates/web/fixmystreet/report/_item.html6
2 files changed, 7 insertions, 2 deletions
diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html
index 70155b029..2acc108d2 100644
--- a/templates/web/fixmystreet/index.html
+++ b/templates/web/fixmystreet/index.html
@@ -90,7 +90,8 @@ kinds of problems like missed bins use our
<section class="full-width">
<ul class="issue-list-a">
[% FOREACH problem IN recent_photos %]
- [% INCLUDE 'report/_item.html', no_fixed = 1 %]
+ [% problem.photo = 1; # Definitely is
+ INCLUDE 'report/_item.html', no_fixed = 1 %]
[% END %]
</ul>
</section>
diff --git a/templates/web/fixmystreet/report/_item.html b/templates/web/fixmystreet/report/_item.html
index 95d2c5b92..9499398cf 100644
--- a/templates/web/fixmystreet/report/_item.html
+++ b/templates/web/fixmystreet/report/_item.html
@@ -2,7 +2,11 @@
<a href="[% c.uri_for('/report', problem.id ) %]">
<div class="text">
<h4>[% problem.title | html %]</h4>
- <small>[% prettify_epoch( problem.confirmed_local.epoch, 1 ) %]
+ <small>[% IF problem.confirmed_local %]
+ [%- prettify_epoch( problem.confirmed_local.epoch, 1 ) %]
+ [%- ELSE %]
+ [%- prettify_epoch( problem.confirmed, 1 ) %]
+ [%- END %]
[%- IF dist %], [% dist %]km[% END %]
[%- IF include_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], last updated [% prettify_epoch( problem.lastupdate, 1 ) %]
[%- END %]</small>