aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm7
-rw-r--r--templates/web/default/footer.html2
-rw-r--r--templates/web/default/front/stats.html3
-rw-r--r--templates/web/default/index.html14
4 files changed, 14 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index 8c1f95bae..44c066454 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -64,11 +64,14 @@ sub recent {
my ( $rs ) = @_;
my $key = "recent:$site_key";
my $result = Memcached::get($key);
- unless ($result) {
+ if ( $result ) {
+ # Need to reattach schema so that confirmed column gets reinflated.
+ $result->[0]->result_source->schema( $rs->result_source->schema );
+ } else {
$result = [ $rs->search( {
state => [ FixMyStreet::DB::Result::Problem->visible_states() ]
}, {
- columns => [ 'id', 'title' ],
+ columns => [ 'id', 'title', 'confirmed' ],
order_by => { -desc => 'confirmed' },
rows => 5,
} )->all ];
diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html
index bd684b722..b1f22da2c 100644
--- a/templates/web/default/footer.html
+++ b/templates/web/default/footer.html
@@ -14,7 +14,7 @@
<div id="footer">
<p>[% loc('Built by <a href="http://www.mysociety.org/">mySociety</a>') %]
- | <a href="/contact">[% loc("Contact FixMyStreet") %]</a></p>
+ | <a href="/contact">[% loc("Contact FixMyStreet") | replace(' ', '&nbsp;') %]</a></p>
<p>Mobile apps:
<a href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">iPhone</a>,
diff --git a/templates/web/default/front/stats.html b/templates/web/default/front/stats.html
index 4b98ef31e..c5d931d08 100644
--- a/templates/web/default/front/stats.html
+++ b/templates/web/default/front/stats.html
@@ -4,8 +4,6 @@
# 'Template::Plugin::Number::Format'
%]
-<h2>[% loc('FixMyStreet updates') %]</h2>
-
[%
stats = c.cobrand.front_stats_data();
@@ -43,4 +41,3 @@
[% END %]
<div>[% tprintf( updates_text, stats.updates ) | comma %]</div>
</div>
-
diff --git a/templates/web/default/index.html b/templates/web/default/index.html
index 131701b0e..96f5c33de 100644
--- a/templates/web/default/index.html
+++ b/templates/web/default/index.html
@@ -29,12 +29,12 @@
<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
<label for="pc">[% question %]:</label>
- &nbsp;<input type="text" name="pc" value="" id="pc" size="10" maxlength="200">
- &nbsp;<input type="submit" value="[% loc('Go') %]" id="submit">
+ <span><input type="text" name="pc" value="" id="pc" size="10" maxlength="200">
+ <input type="submit" value="[% loc('Go') %]" id="submit">
+ </span>
[% c.cobrand.form_elements('postcodeForm') %]
</form>
-
<div id="front_intro">
<h2>[% loc('How to report a problem') %]</h2>
@@ -59,22 +59,24 @@
[% IF probs.size || recent_photos.size %]
<div id="front_recent">
+ <h2>[% loc('Recently reported problems') %]</h2>
[% IF recent_photos.size %]
- <h2>[% loc('Photos of recent reports') %]</h2>
+ <p id="front_photos">
[% FOREACH p IN recent_photos %]
<a href="/report/[% p.id %]"><img border="0" height="100"
src="/photo?tn=1;id=[% p.id %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
[% END %]
+ </p>
[% END %]
[% IF probs.size %]
- <h2>[% loc('Recently reported problems') %]</h2>
- <ul>
+ <ul id="nearby_lists">
[% FOREACH p IN probs %]
<li>
<a href="/report/[% p.id %]">[% p.title | html %]</a>
+ <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small>
</li>
[% END %]
</ul>