aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorpezholio <pezholio@gmail.com>2017-01-24 16:20:48 +0000
committerDave Arter <davea@mysociety.org>2017-02-27 13:18:03 +0000
commit587a125c46f229ed23aaf68d3308f6755e2d8299 (patch)
treec6bff793a2dd44bc249326fdf8b2c187e20ef4ea /templates
parent36838708a432de937828f6a8ef4aff608654f900 (diff)
[Oxfordshire] Use 'days ago' format on problem lists
Fixes mysociety/fixmystreetforcouncils#98
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/_item.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index e233ff09f..a561c4c8d 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -45,13 +45,21 @@
<span class="item-list__item__state">[% problem.response_priority.name %]</span>
[% END %]
[%- IF c.cobrand.moniker != 'fixamingata' %] [%# Default: %]
- [%- prettify_dt( problem.confirmed, 1 ) %]
+ [%- IF problem.days_ago > 0 AND problem.days_ago <= c.cobrand.display_days_ago_threshold %]
+ [% tprintf( nget( loc('Reported %d day ago'), loc('Reported %d days ago'), problem.days_ago), problem.days_ago ) %]
+ [%- ELSE %]
+ [% prettify_dt( problem.confirmed, 1 ) %]
+ [%- END %]
[%- ELSE %] [%# Swedish cobrand fixamingata: %]
[%- prettify_dt( problem.confirmed) %]
[%- END %]
[%- IF dist %], [% dist %]km[% END %]
[%- IF problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %],
- [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %]
+ [%- IF problem.days_ago('lastupdate') > 0 AND problem.days_ago('lastupdate') <= c.cobrand.display_days_ago_threshold %]
+ [% tprintf(loc('last updated %s days ago'), problem.days_ago('lastupdate') ) %]
+ [%- ELSE %]
+ [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %]
+ [%- END %]
[%- END %]
[% IF include_sentinfo %]
[% IF c.cobrand.is_council && !c.cobrand.owns_problem( problem ) %]