diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-12 10:08:49 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-12 10:08:49 +0100 |
commit | 64f98502ae9d9c60973862f10ddae8fcce363f9d (patch) | |
tree | 77566106652a5d7c13333925e1921cdcd9092dcf | |
parent | 2d1e3699cdd1e4d7cefa348b338c92de2d90facb (diff) |
add recent local problems photos to alert list page
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 8 | ||||
-rw-r--r-- | templates/web/default/alert/list.html | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 28b338563..f88e57d1a 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -122,6 +122,12 @@ sub list : Path('list') : Args(0) { $dist = $dist / 10.0; $c->stash->{population_radius} = $dist; + + $c->stash->{photos} = $c->cobrand->recent_photos( + 5, + $c->stash->{latitude}, + $c->stash->{longitude}, $dist + ); # # my $checked = ''; # $checked = ' checked' if $q->param('feed') && $q->param('feed') eq "local:$lat:$lon"; @@ -344,7 +350,7 @@ sub subscribe_email : Private { =head2 confirm -Confirm signup to an alert +Confirm signup to an alert. Forwarded here from Tokens. =cut diff --git a/templates/web/default/alert/list.html b/templates/web/default/alert/list.html index 8b76fd04a..547cd27d3 100644 --- a/templates/web/default/alert/list.html +++ b/templates/web/default/alert/list.html @@ -15,6 +15,13 @@ [%# FIXME cobrands and pics here %] + [% IF photos %] + <div id="alert_photos"> + <h2>[% loc('Photos of recent nearby reports') %]</h2> + [% photos %] + </div> + [% END %] + <p> [% IF pretty_pc %] [% tprintf( loc('Here are the types of local problem alerts for %s.'), pretty_pc ) %] |