diff options
author | matthew <matthew> | 2008-07-10 21:20:02 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-07-10 21:20:02 +0000 |
commit | ef2e0c932a5479db1614626e5ee8725da66d0172 (patch) | |
tree | 1ad015881bfc2fbd7ce3359943579db4961f5b7b | |
parent | 8138fa9ca58105cdc96029582e5ba1ea2f73c0e5 (diff) |
Work if ward is not present.
-rwxr-xr-x | web/alert.cgi | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/web/alert.cgi b/web/alert.cgi index 40b465c94..c7a7910a3 100755 --- a/web/alert.cgi +++ b/web/alert.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: alert.cgi,v 1.28 2008-05-23 09:53:10 matthew Exp $ +# $Id: alert.cgi,v 1.29 2008-07-10 21:20:02 matthew Exp $ use strict; use Standard; @@ -103,6 +103,20 @@ sub alert_list { alert_list_options($q, @options) ); + } elsif (keys %$areas == 1) { + + # One-tier council, no ward + my (@options, $council); + foreach (values %$areas) { + $council = $_; + } + push @options, [ 'council', $council->{area_id}, Page::short_name($council->{name}), + sprintf(_("Problems within %s"), $council->{name}) ]; + + $options = '<div>' . $q->ul({id=>'rss_feed'}, + alert_list_options($q, @options) + ); + } elsif (keys %$areas == 4) { # Two-tier council |