aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-19 18:30:11 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-19 18:30:11 +0000
commitdaa508bcf8c193fc90786c628cdcca76abfedb30 (patch)
tree912d60c75b9e7b8138d55d5dea67f2c340a8c8c0
parent0580506d826846595f19480992d10bce66807734 (diff)
Ignore whensent last update time.
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm3
-rw-r--r--templates/web/barnet/footer.html1
-rw-r--r--templates/web/default/reports/cobrand_stats.html0
-rwxr-xr-xtemplates/web/default/reports/council.html4
4 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index dd6ecd9e3..9fb72121e 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -344,6 +344,7 @@ sub load_and_group_problems : Private {
#{ duration => { extract => "epoch from current_timestamp-lastupdate" } },
#{ age => { extract => "epoch from current_timestamp-confirmed" } },
{ confirmed => { extract => 'epoch from confirmed' } },
+ { whensent => { extract => 'epoch from whensent' } },
{ lastupdate => { extract => 'epoch from lastupdate' } },
{ photo => 'photo is not null' },
],
@@ -356,7 +357,7 @@ sub load_and_group_problems : Private {
my ( %problems, @pins );
my $re_councils = join('|', keys %{$c->stash->{areas_info}});
- my @cols = ( 'id', 'council', 'state', 'areas', 'latitude', 'longitude', 'title', 'cobrand', 'confirmed', 'lastupdate', 'photo' );
+ my @cols = ( 'id', 'council', 'state', 'areas', 'latitude', 'longitude', 'title', 'cobrand', 'confirmed', 'whensent', 'lastupdate', 'photo' );
while ( my @problem = $problems->next ) {
my %problem = zip @cols, @problem;
$problem{is_fixed} = FixMyStreet::DB::Result::Problem->fixed_states()->{$problem{state}};
diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html
index 9bbeaa7e9..21848963e 100644
--- a/templates/web/barnet/footer.html
+++ b/templates/web/barnet/footer.html
@@ -14,7 +14,6 @@
<li class="section">[% c.req.uri.path == '/reports/Barnet' ? '<strong>All reports</strong>' : '<a href="/reports/Barnet">All reports</a>' %]</li>
<li class="section">[% c.req.uri.path == '/alert' ? '<strong>Local alerts</strong>' : '<a href="/alert">Local alerts</a>' %]</li>
<li class="section">[% c.req.uri.path == '/faq' ? '<strong>Help</strong>' : '<a href="/faq">Help</a>' %]</li>
- <li class="section">[% c.req.uri.path == '/contact' ? '<strong>Contact</strong>' : '<a href="/contact">Contact</a>' %]</li>
</ul>
</ul>
</div> <!-- end navigation -->
diff --git a/templates/web/default/reports/cobrand_stats.html b/templates/web/default/reports/cobrand_stats.html
deleted file mode 100644
index e69de29bb..000000000
--- a/templates/web/default/reports/cobrand_stats.html
+++ /dev/null
diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html
index f4aa02e97..0d3d43d82 100755
--- a/templates/web/default/reports/council.html
+++ b/templates/web/default/reports/council.html
@@ -79,7 +79,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
<p><a href="[% rss_url %]"><img align="right" src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% tprintf(loc('RSS feed of problems in this %s'), thing) %]" border="0" hspace="4"></a>
[% END %]
-[% INCLUDE 'reports/cobrand_stats.html' %]
+[% TRY %][% INCLUDE 'reports/cobrand_stats.html' %][% CATCH file %][% END %]
[% IF c.cobrand.moniker == 'fixmystreet' AND children.size %]
<section id="council_wards" class="hidden-js">
@@ -125,7 +125,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
<div class="text">
<h4>[% problem.title | html %]</h4>
<small>[% prettify_epoch( problem.confirmed, 1 ) %]
- [%- IF problem.confirmed != problem.lastupdate %], last updated [% prettify_epoch( problem.lastupdate, 1 ) %]
+ [%- IF problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], last updated [% prettify_epoch( problem.lastupdate, 1 ) %]
[%- END %]</small>
[% IF problem.councils > 1 %] <small>[% loc('(sent to both)') %]</small>
[% ELSIF problem.councils == 0 %] <small>[% loc('(not sent to council)') %]</small>