Skip to content
Browse files

Photos in report list on /my page, and only show cobranded reports.

  • Loading branch information...
1 parent cadd35d commit eba1039023271bac6178776f9e7d48b79a1c43e3 @dracos dracos committed Mar 26, 2012
Showing with 14 additions and 3 deletions.
  1. +9 −2 perllib/FixMyStreet/App/Controller/My.pm
  2. +5 −1 templates/web/fixmystreet/my/my.html
View
11 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 );
View
6 templates/web/fixmystreet/my/my.html
@@ -78,9 +78,13 @@
[% 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 %]
-

0 comments on commit eba1039

Please sign in to comment.
Something went wrong with that request. Please try again.