aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2009-12-15 16:53:54 +0000
committermatthew <matthew>2009-12-15 16:53:54 +0000
commitf9003bb4e69db1224d901b2c7081861be378e90d (patch)
tree0cbffc49dc99a5732d8a3238086b3c738eda3cf2
parent3212b5b45e4e38f01c4078e90dfae314574055ab (diff)
Make footer a template so can have on/off-ness. Have smaller map.
-rw-r--r--perllib/Page.pm14
-rw-r--r--templates/website/cobrands/barnet/barnet-footer10
-rw-r--r--web/cobrands/barnet/css/basic.css7
-rw-r--r--web/cobrands/barnet/css/layout.css23
4 files changed, 41 insertions, 13 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 729ef718e..cab731faa 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.225 2009-12-15 15:53:41 matthew Exp $
+# $Id: Page.pm,v 1.226 2009-12-15 16:53:54 matthew Exp $
#
package Page;
@@ -316,11 +316,9 @@ sub footer {
$js = ''; # Don't use fileupload JS at the moment
if ($q->{site} ne 'fixmystreet') {
- (my $file = __FILE__) =~ s{/[^/]*?$}{};
- my $template = template($q, %params);
- open FP, $file . template_root($q) . $template . '-footer';
- my $html = join('', <FP>);
- close FP;
+ my $template = template($q, %params) . '-footer';
+ my $template_root = template_root($q);
+ my $html = template_include($template, $q, $template_root, %params);
my $lang = $mySociety::Locale::lang;
if ($q->{site} eq 'emptyhomes' && $lang eq 'cy') {
$html =~ s/25 Walter Road<br>Swansea/25 Heol Walter<br>Abertawe/;
@@ -414,7 +412,7 @@ sub display_map {
$params{pre} ||= '';
$params{post} ||= '';
my $mid_point = 254;
- if ($q->{site} eq 'scambs') { # Map is c. 380px wide
+ if ($q->{site} eq 'barnet') { # Map is c. 380px wide
$mid_point = 189;
}
my $px = defined($params{px}) ? $mid_point - $params{px} : 0;
@@ -638,7 +636,7 @@ sub os_to_px_with_adjust {
my $y_tile = $in_y || int($y);
my $px = Page::os_to_px($easting, $x_tile);
my $py = Page::os_to_px($northing, $y_tile, 1);
- if ($q->{site} eq 'scambs') { # Map is 380px
+ if ($q->{site} eq 'barnet') { # Map is 380px
if ($py > 380) {
$y_tile--;
$py = Page::os_to_px($northing, $y_tile, 1);
diff --git a/templates/website/cobrands/barnet/barnet-footer b/templates/website/cobrands/barnet/barnet-footer
index ba7d5de9d..2d6892aa5 100644
--- a/templates/website/cobrands/barnet/barnet-footer
+++ b/templates/website/cobrands/barnet/barnet-footer
@@ -9,11 +9,11 @@
<ul>
<li class="section"><a href="/">FixMyStreet</a>
<ul>
- <li class="section"><a href="/">Report a problem</a></li>
- <li class="section"><a href="/reports/Barnet">All reports</a></li>
- <li class="section"><a href="/alert">Local alerts</a></li>
- <li class="section"><a href="/faq">Help</a></li>
- <li class="section"><a href="/contact">Contact</a>
+ <li class="section">{{ ($ENV{REQUEST_URI} eq '/') ? '<strong>Report a problem</strong>' : '<a href="/">Report a problem</a>' }}</li>
+ <li class="section">{{ ($ENV{REQUEST_URI} eq '/reports/Barnet') ? '<strong>All reports</strong>' : '<a href="/reports/Barnet">All reports</a>' }}</li>
+ <li class="section">{{ ($ENV{REQUEST_URI} eq '/alert') ? '<strong>Local alerts</strong>' : '<a href="/alert">Local alerts</a>' }}</li>
+ <li class="section">{{ ($ENV{REQUEST_URI} eq '/faq') ? '<strong>Help</strong>' : '<a href="/faq">Help</a>' }}</li>
+ <li class="section">{{ ($ENV{REQUEST_URI} eq '/contact') ? '<strong>Contact</strong>' : '<a href="/contact">Contact</a>' }}</li>
</ul>
</ul>
</div> <!-- end navigation -->
diff --git a/web/cobrands/barnet/css/basic.css b/web/cobrands/barnet/css/basic.css
index 972628e17..c7ba123df 100644
--- a/web/cobrands/barnet/css/basic.css
+++ b/web/cobrands/barnet/css/basic.css
@@ -61,3 +61,10 @@ blockquote {
padding: 0;
margin: 0 10px;
}
+
+/* FixMyStreet additions */
+
+select, input, textarea {
+ font-size: 99%;
+}
+
diff --git a/web/cobrands/barnet/css/layout.css b/web/cobrands/barnet/css/layout.css
index 193b5c2aa..b66f957b6 100644
--- a/web/cobrands/barnet/css/layout.css
+++ b/web/cobrands/barnet/css/layout.css
@@ -1,3 +1,26 @@
+/* FixMyStreet additions */
+/* Smaller map */
+#map_box {
+ width: 380px;
+}
+#map, #drag {
+ width: 378px;
+ height: 378px;
+}
+#watermark {
+ background: url("/i/mojwatermark-378.png");
+ height: 84px;
+ width: 171px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+
+p#fixed, p#unknown {
+ margin-right: 400px;
+ width: auto;
+}
+
/*=========FROM CUSTOM=========*/
.cl {clear: both;}