aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-26 18:58:24 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-03-26 18:58:24 +0100
commiteba1039023271bac6178776f9e7d48b79a1c43e3 (patch)
treee427fe8474bee870d07eebd417f8045e6e93aafb
parentcadd35d4853974178a8a04ef7e93ec58f69607ee (diff)
Photos in report list on /my page, and only show cobranded reports.
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm11
-rw-r--r--templates/web/fixmystreet/my/my.html6
2 files changed, 14 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 60e9dd09f..3de83b265 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -30,9 +30,16 @@ sub my : Path : Args(0) {
my $pins = [];
my $problems = {};
- my $rs = $c->user->problems->search( {
+
+ my $params = {
state => [ FixMyStreet::DB::Result::Problem->visible_states() ],
- }, {
+ };
+ $params = {
+ %{ $c->cobrand->problems_clause },
+ %$params
+ } if $c->cobrand->problems_clause;
+
+ my $rs = $c->user->problems->search( $params, {
order_by => { -desc => 'confirmed' },
rows => 50
} )->page( $p_page );
diff --git a/templates/web/fixmystreet/my/my.html b/templates/web/fixmystreet/my/my.html
index 687c5686e..4793989f8 100644
--- a/templates/web/fixmystreet/my/my.html
+++ b/templates/web/fixmystreet/my/my.html
@@ -78,9 +78,13 @@ END %]
[% END %]
</small>
</div>
+ [% IF p.photo %]
+ <div class="img">
+ <img height="60" width="90" src="/photo/[% p.id %].fp.jpeg" alt="">
+ </div>
+ [% END %]
</a>
</li>
[% "</ul>" IF loop.last %]
[% END %]
-