aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Alert.pm5
-rw-r--r--web/css/cobrands/emptyhomes/emptyhomes.css14
-rwxr-xr-xweb/index.cgi13
3 files changed, 29 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Alert.pm b/perllib/FixMyStreet/Alert.pm
index 15981acc5..a78d820a3 100644
--- a/perllib/FixMyStreet/Alert.pm
+++ b/perllib/FixMyStreet/Alert.pm
@@ -188,7 +188,10 @@ sub email_alerts ($) {
$url = Cobrand::base_url_for_emails($alert->{cobrand}, $alert->{cobrand_data});
my ($site_restriction, $site_id) = Cobrand::site_restriction($alert->{cobrand}, $alert->{cobrand_data});
my $d = mySociety::Gaze::get_radius_containing_population($latitude, $longitude, 200000);
- $d = int($d*10+0.5)/10;
+ # Convert integer to GB locale string (with a ".")
+ mySociety::Locale::in_gb_locale {
+ $d = sprintf("%f", int($d*10+0.5)/10);
+ };
my $testing_email_clause = "and problem.email <> '$testing_email'" if $testing_email;
my %data = ( template => $template, data => '', alert_id => $alert->{id}, alert_email => $alert->{email}, lang => $alert->{lang}, cobrand => $alert->{cobrand}, cobrand_data => $alert->{cobrand_data} );
my $q = "select * from problem_find_nearby(?, ?, ?) as nearby, problem
diff --git a/web/css/cobrands/emptyhomes/emptyhomes.css b/web/css/cobrands/emptyhomes/emptyhomes.css
index 15afee568..61db27054 100644
--- a/web/css/cobrands/emptyhomes/emptyhomes.css
+++ b/web/css/cobrands/emptyhomes/emptyhomes.css
@@ -193,3 +193,17 @@ blockquote {
margin-top: 1px;
}
+#eha_advert {
+ clear: both;
+ width: 55%;
+ margin: 0 auto;
+ padding: 0.5em;
+ text-align: center;
+ background-color: #ffeecc;
+ border: solid 1px #ff9900;
+}
+
+#front_intro {
+ margin-bottom: 1em;
+}
+
diff --git a/web/index.cgi b/web/index.cgi
index c2482e26b..ef4b3eee1 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -202,8 +202,17 @@ EOF
$out .= '</a></li>';
}
$out .= '</ul>' if @$probs;
- $out .= '</div>';
- }
+ $out .= '</div>';
+ }
+
+ if ($q->{site} eq 'emptyhomes') {
+ $out .= <<EOF;
+<div id="eha_advert">
+Now is the best time to turn empty properties into empty homes... Don't miss it!
+<a href="http://www.emptyhomes.com/EHConference2011.html">Home Again: Empty Homes National Conference 2011</a>
+</div>
+EOF
+ }
return ($out, %params);
}