aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-02-23 10:24:02 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-02-23 10:24:10 +0000
commit63f4c86f68d9be39275c3081306736c77da4cb40 (patch)
treea6473eb1c81c9745287d1a7999b8af32f8b1f8c0
parent2bcc42fcdc96caa22e8ab2af6155bfff7e2d875b (diff)
Nearby list needs photo too, and via nearby object (for #227).
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Nearby.pm2
-rw-r--r--templates/web/fixmystreet/around/around_map_list_items.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
index 04089096e..4b37e7731 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
@@ -24,7 +24,7 @@ sub nearby {
columns => [
'problem.id', 'problem.title', 'problem.latitude',
'problem.longitude', 'distance', 'problem.state',
- 'problem.confirmed'
+ 'problem.confirmed', { photo => 'photo is not null' },
],
bind => [ $mid_lat, $mid_lon, $dist ],
order_by => [ 'distance', { -desc => 'created' } ],
diff --git a/templates/web/fixmystreet/around/around_map_list_items.html b/templates/web/fixmystreet/around/around_map_list_items.html
index edf8dcbf1..49a7798c3 100644
--- a/templates/web/fixmystreet/around/around_map_list_items.html
+++ b/templates/web/fixmystreet/around/around_map_list_items.html
@@ -12,7 +12,7 @@
<small>[% loc('(fixed)') %]</small>
[% END %]
</div>
- [% IF p.photo %]
+ [% IF p.problem.photo %]
<div class="img">
<img height="60" width="90" src="/photo?id=[% p.id %];fp=1" alt="">
</div>