diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-23 14:19:28 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-23 14:34:10 +0100 |
commit | 9cfd82314c739315633bcd8463a44883d13e3ee1 (patch) | |
tree | 9f84954c917100d1ee3c5c8b938bed719a985a72 | |
parent | 26a419284324e4625e86954b9b287452d1ac1603 (diff) |
emptyhome cobrand photos get resized for display
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 9 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/EmptyHomes.pm | 9 |
3 files changed, 20 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm index 9b828f894..774e5c4f7 100644 --- a/perllib/FixMyStreet/App/Controller/Photo.pm +++ b/perllib/FixMyStreet/App/Controller/Photo.pm @@ -45,8 +45,8 @@ sub index :Path :Args(0) { $photo = $photo->photo; if ( $c->req->param('tn' ) ) { $photo = _resize( $photo, 'x100' ); - } elsif ( 0 ) { # emptyhomes - $photo = _resize( $photo, '195x' ); + } elsif ( $c->cobrand->default_photo_resize ) { + $photo = _resize( $photo, $c->cobrand->default_photo_resize ); } my $dt = DateTime->now(); diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 37c5f478b..552fba5db 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -813,5 +813,14 @@ sub reports_council_check { } } +=head2 default_photo_resize + +Size that photos are to be resized to for display. If photos aren't +to be resized then return 0; + +=cut + +sub default_photo_resize { return 0; } + 1; diff --git a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm index 7dfa60a49..cbecb1c34 100644 --- a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm +++ b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm @@ -100,5 +100,14 @@ sub generate_problem_banner { return $banner; } +=head2 default_photo_resize + +Size that photos are to be resized to for display. If photos aren't +to be resized then return 0; + +=cut + +sub default_photo_resize { return '195x'; } + 1; |