aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-12-20 11:18:54 +0000
committerStruan Donald <struan@exo.org.uk>2012-12-20 11:18:54 +0000
commitaa091c2ec037defdb1600b6e3296eff107dca8fa (patch)
tree84a2c16b51abbbef85d60ea64ed471facf5ea067
parent2425f3bc42072b8765f64fba8d00704e8685f0f3 (diff)
move site title into cobrand class so we can override it easily
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/SeeSomething.pm1
-rw-r--r--templates/web/fixmystreet/header.html4
4 files changed, 12 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index a7e1e8a3a..ef966a8a8 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -95,7 +95,7 @@ sub load_problem_or_display_error : Private {
if ( !$c->user || $c->user->id != $problem->user->id ) {
$c->detach(
'/page_error_403_access_denied',
- [ _('That report cannot be viewed on FixMyStreet.') ] #
+ [ sprintf(_('That report cannot be viewed on %s.'), $c->cobrand->site_title) ] #
);
}
}
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 7fbe0b518..34f9d0b1d 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -144,6 +144,14 @@ Can be specified in template.
sub enter_postcode_text { }
+=head2 site_title
+
+The name of the site
+
+=cut
+
+sub site_title { return 'FixMyStreet'; }
+
=head2 set_lang_and_domain
my $set_lang = $cobrand->set_lang_and_domain( $lang, $unicode, $dir )
diff --git a/perllib/FixMyStreet/Cobrand/SeeSomething.pm b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
index f05a2059a..629a5ee50 100644
--- a/perllib/FixMyStreet/Cobrand/SeeSomething.pm
+++ b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
@@ -9,6 +9,7 @@ sub council_area { return 'West Midlands'; }
sub council_name { return 'See Something Say Something'; }
sub council_url { return 'seesomething'; }
sub area_types { [ 'MTD' ] }
+sub site_title { return 'See Something, Say Something'; }
sub site_restriction {
diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html
index f9c146bc0..b691373b2 100644
--- a/templates/web/fixmystreet/header.html
+++ b/templates/web/fixmystreet/header.html
@@ -22,7 +22,7 @@
<script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
<script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script>
- [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'FixMyStreet' %]
+ [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = c.cobrand.site_title %]
[% extra_js %]
[% IF c.req.uri.host == 'osm.fixmystreet.com' %]
@@ -38,7 +38,7 @@
<div class="table-cell">
<header id="site-header" role="banner">
<div class="container">
- <a href="/" id="site-logo">FixMyStreet</a>
+ <a href="/" id="site-logo">[% c.cobrand.site_title | html %]</a>
<a href="#main-nav" id="nav-link">Main Navigation</a>
</div>
</header>