aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/CrossSell.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Base.pm3
-rw-r--r--templates/web/default/contact/index.html2
-rw-r--r--templates/web/default/footer.html18
-rw-r--r--templates/web/default/header.html13
-rwxr-xr-xtemplates/web/default/reports/council.html2
-rw-r--r--templates/web/fixmystreet/contact/address.html (renamed from templates/web/default/contact/address.html)0
-rw-r--r--templates/web/fixmystreet/footer.html51
-rw-r--r--templates/web/fixmystreet/front/news.html (renamed from templates/web/default/front/news.html)0
-rw-r--r--templates/web/fixmystreet/header.html49
-rw-r--r--templates/web/fixmystreet/tracking_code.html (renamed from templates/web/default/tracking_code.html)0
12 files changed, 109 insertions, 34 deletions
diff --git a/perllib/CrossSell.pm b/perllib/CrossSell.pm
index 9235d0a03..4a0f31ea8 100644
--- a/perllib/CrossSell.pm
+++ b/perllib/CrossSell.pm
@@ -167,7 +167,7 @@ EOF
sub display_advert ($$;$%) {
my ($c, $email, $name, %data) = @_;
- return '' unless $c->cobrand->is_default;
+ return '' unless $c->cobrand->moniker eq 'fixmystreet';
#if (defined $data{council} && $data{council} eq '2326') {
# my ($out, $ad) = display_hfyc_cheltenham_advert($email, $name);
diff --git a/perllib/FixMyStreet/Cobrand.pm b/perllib/FixMyStreet/Cobrand.pm
index 6fe2a2bc8..ad21820d7 100644
--- a/perllib/FixMyStreet/Cobrand.pm
+++ b/perllib/FixMyStreet/Cobrand.pm
@@ -84,6 +84,9 @@ sub get_class_for_moniker {
return $avail if $moniker eq $avail->moniker;
}
+ # Special case for old blank cobrand entries in fixmystreet.com.
+ return 'FixMyStreet::Cobrand::FixMyStreet' if $moniker eq '';
+
# if none match then use the default
return 'FixMyStreet::Cobrand::Default';
}
diff --git a/perllib/FixMyStreet/Cobrand/Base.pm b/perllib/FixMyStreet/Cobrand/Base.pm
index 00b47d7da..42a891cb4 100644
--- a/perllib/FixMyStreet/Cobrand/Base.pm
+++ b/perllib/FixMyStreet/Cobrand/Base.pm
@@ -35,7 +35,6 @@ sub moniker {
my $class = ref( $_[0] ) || $_[0]; # deal with object or class
my ($last_part) = $class =~ m{::(\w+)$};
$last_part = lc($last_part);
- return '' if $last_part eq 'default';
return $last_part;
}
@@ -49,7 +48,7 @@ Returns true if this is the default cobrand, false otherwise.
sub is_default {
my $self = shift;
- return $self->moniker eq '';
+ return $self->moniker eq 'default';
}
=head2 path_to_web_templates
diff --git a/templates/web/default/contact/index.html b/templates/web/default/contact/index.html
index 50e8d3845..a644ed952 100644
--- a/templates/web/default/contact/index.html
+++ b/templates/web/default/contact/index.html
@@ -94,6 +94,6 @@
</form>
-[% INCLUDE 'contact/address.html' %]
+[% TRY %][% INCLUDE 'contact/address.html' %][% CATCH file %][% END %]
[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html
index 089eb1cb7..a58a3e696 100644
--- a/templates/web/default/footer.html
+++ b/templates/web/default/footer.html
@@ -15,30 +15,14 @@
%]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
</ul>
- <ul id="mysociety-nav" class="nav">
- <li><a id="mysociety-logo" href="http://www.mysociety.org/">mySociety</a></li>[%
- %]<li><a href="http://mysociety.org/donate/">Donate</a></li>[%
- %]<li><a href="http://www.mysociety.org/projects/">Our Sites</a></li>
- </ul>
-
</div>
</div></div></div><!-- wrappers -->
<div id="footer">
- <p><a href="/contact">[% loc("Contact FixMyStreet") | replace(' ', '&nbsp;') %]</a>
- <br>Mobile apps:
- <a href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">iPhone</a>,
- <a href="http://itunes.apple.com/gb/app/streetreport/id371891859">StreetReport (iPhone)</a>
- | <a href="https://market.android.com/details?id=com.android.fixmystreet">Android</a>
- | <a href="http://store.ovi.com/content/107557">Nokia</a>
- </p>
+ <p><a href="/contact">[% loc("Contact FixMyStreet") | replace(' ', '&nbsp;') %]</a></p>
- <p>[% loc('Are you from a <strong>council</strong>? Would you like better integration with FixMyStreet?') %]
- <a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">[% loc('Find out about FixMyStreet for councils') %]</a>.
- </p>
-
<p>[% loc('Are you a <strong>developer</strong>? Would you like to contribute to FixMyStreet?') %]
[% loc('Our code is open source and <a href="http://github.com/mysociety/fixmystreet">available on GitHub</a>.') %]
</p>
diff --git a/templates/web/default/header.html b/templates/web/default/header.html
index ff08116a9..e6362a449 100644
--- a/templates/web/default/header.html
+++ b/templates/web/default/header.html
@@ -12,27 +12,16 @@
<meta name="mobileoptimized" content="0">
<link rel="stylesheet" href="[% version('/css/core.css') %]">
- <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/base.css') %]">
- <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/layout.css') %]" media="(min-width:48em)">
- <!--[if (lt IE 9) & (!IEMobile)]>
- <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/layout.css') %]">
- <![endif]-->
[% INCLUDE 'common_header_tags.html' %]
- [% IF c.req.uri.host == 'osm.fixmystreet.com' %]
- <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
- [% END %]
-
- [% INCLUDE 'tracking_code.html' %]
-
</head>
<body>
<div id="wrapper"><div id="wrapper2"><div id="wrapper3">
[% IF NOT title AND NOT c.req.path %]<h1 id="header" role="banner">[% ELSE %]<div id="header" role="banner"><a href="/">[% END
- %]<img src="/cobrands/fixmystreet/fms-logo-flat.png" width=327 height=62 alt="[% loc('FixMyStreet') %]">
+ %][% loc('FixMyStreet') %]
[%- IF NOT title AND NOT c.req.path %]</h1>[% ELSE %]</a></div>[% END %]
<ul id="meta">
diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html
index 44f0040cb..797d34d6b 100755
--- a/templates/web/default/reports/council.html
+++ b/templates/web/default/reports/council.html
@@ -77,7 +77,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
[% INCLUDE 'reports/cobrand_stats.html' %]
-[% IF c.cobrand.moniker == '' %]
+[% IF c.cobrand.moniker == 'fixmystreet' %]
<p class="promo">
FixMyStreet is now available for local council websites.
<a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">Find&nbsp;out&nbsp;more</a>.
diff --git a/templates/web/default/contact/address.html b/templates/web/fixmystreet/contact/address.html
index b7ff37e5c..b7ff37e5c 100644
--- a/templates/web/default/contact/address.html
+++ b/templates/web/fixmystreet/contact/address.html
diff --git a/templates/web/fixmystreet/footer.html b/templates/web/fixmystreet/footer.html
new file mode 100644
index 000000000..089eb1cb7
--- /dev/null
+++ b/templates/web/fixmystreet/footer.html
@@ -0,0 +1,51 @@
+ </div><!-- #mysociety .container -->
+
+ <div id="navigation" class="container" role="navigation">
+ <div class="spacer"></div>
+ <ul id="site-nav" class="nav">
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END
+ %]>[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END
+ %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
+ %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END
+ %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
+ </ul>
+
+ <ul id="mysociety-nav" class="nav">
+ <li><a id="mysociety-logo" href="http://www.mysociety.org/">mySociety</a></li>[%
+ %]<li><a href="http://mysociety.org/donate/">Donate</a></li>[%
+ %]<li><a href="http://www.mysociety.org/projects/">Our Sites</a></li>
+ </ul>
+
+ </div>
+
+</div></div></div><!-- wrappers -->
+
+<div id="footer">
+
+ <p><a href="/contact">[% loc("Contact FixMyStreet") | replace(' ', '&nbsp;') %]</a>
+ <br>Mobile apps:
+ <a href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">iPhone</a>,
+ <a href="http://itunes.apple.com/gb/app/streetreport/id371891859">StreetReport (iPhone)</a>
+ | <a href="https://market.android.com/details?id=com.android.fixmystreet">Android</a>
+ | <a href="http://store.ovi.com/content/107557">Nokia</a>
+ </p>
+
+ <p>[% loc('Are you from a <strong>council</strong>? Would you like better integration with FixMyStreet?') %]
+ <a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">[% loc('Find out about FixMyStreet for councils') %]</a>.
+ </p>
+
+ <p>[% loc('Are you a <strong>developer</strong>? Would you like to contribute to FixMyStreet?') %]
+ [% loc('Our code is open source and <a href="http://github.com/mysociety/fixmystreet">available on GitHub</a>.') %]
+ </p>
+
+</div>
+
+[% INCLUDE 'debug_footer.html' %]
+
+</body>
+</html>
diff --git a/templates/web/default/front/news.html b/templates/web/fixmystreet/front/news.html
index 080034a28..080034a28 100644
--- a/templates/web/default/front/news.html
+++ b/templates/web/fixmystreet/front/news.html
diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html
new file mode 100644
index 000000000..ff08116a9
--- /dev/null
+++ b/templates/web/fixmystreet/header.html
@@ -0,0 +1,49 @@
+<!doctype html>
+<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if gt IE 8]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]-->
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="[% version('/css/core.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/base.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/layout.css') %]" media="(min-width:48em)">
+ <!--[if (lt IE 9) & (!IEMobile)]>
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/layout.css') %]">
+ <![endif]-->
+
+ [% INCLUDE 'common_header_tags.html' %]
+
+ [% IF c.req.uri.host == 'osm.fixmystreet.com' %]
+ <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
+ [% END %]
+
+ [% INCLUDE 'tracking_code.html' %]
+
+ </head>
+ <body>
+
+<div id="wrapper"><div id="wrapper2"><div id="wrapper3">
+
+ [% IF NOT title AND NOT c.req.path %]<h1 id="header" role="banner">[% ELSE %]<div id="header" role="banner"><a href="/">[% END
+ %]<img src="/cobrands/fixmystreet/fms-logo-flat.png" width=327 height=62 alt="[% loc('FixMyStreet') %]">
+ [%- IF NOT title AND NOT c.req.path %]</h1>[% ELSE %]</a></div>[% END %]
+
+ <ul id="meta">
+ [% IF c.user_exists %]
+ <li>[% tprintf(loc('Signed in as %s'), c.user.name || c.user.email) %]
+ <li class="last"><a href="/auth/sign_out">[% loc('Sign out') %]</a></li>
+ [% ELSE %]
+ <li>&nbsp;</li>
+ [% END %]
+ </ul>
+
+ <div id="mysociety" class="container" role="main">
+
+ [% INCLUDE 'debug_header.html' %]
diff --git a/templates/web/default/tracking_code.html b/templates/web/fixmystreet/tracking_code.html
index b506d41c1..b506d41c1 100644
--- a/templates/web/default/tracking_code.html
+++ b/templates/web/fixmystreet/tracking_code.html