aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Base.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm5
4 files changed, 13 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 0adf66ee9..3096f2f72 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -153,8 +153,7 @@ sub setup_request {
my $cobrand = $c->cobrand;
# append the cobrand templates to the include path
- $c->stash->{additional_template_paths} = $cobrand->path_to_web_templates
- unless $cobrand->is_default;
+ $c->stash->{additional_template_paths} = $cobrand->path_to_web_templates;
# work out which language to use
my $lang_override = $c->get_override('lang');
@@ -421,7 +420,7 @@ call), use this method.
sub render_fragment {
my ($c, $template, $vars) = @_;
$vars->{additional_template_paths} = $c->cobrand->path_to_web_templates
- if $vars && !$c->cobrand->is_default;
+ if $vars;
$c->view('Web')->render($c, $template, $vars);
}
diff --git a/perllib/FixMyStreet/Cobrand/Base.pm b/perllib/FixMyStreet/Cobrand/Base.pm
index fada33b78..4a95294d6 100644
--- a/perllib/FixMyStreet/Cobrand/Base.pm
+++ b/perllib/FixMyStreet/Cobrand/Base.pm
@@ -62,7 +62,7 @@ Returns the path to the templates for this cobrand - by default
sub path_to_web_templates {
my $self = shift;
- return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+ return [ FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify ];
}
1;
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 8ff5e3656..03777ac51 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -8,6 +8,11 @@ use Carp;
use mySociety::MaPit;
use FixMyStreet::Geocode::OSM;
+sub path_to_web_templates {
+ my $self = shift;
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+}
+
sub country {
return 'NO';
}
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index 1c4c22fa6..174f2579c 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -3,6 +3,11 @@ use base 'FixMyStreet::Cobrand::Default';
use mySociety::VotingArea;
+sub path_to_web_templates {
+ my $self = shift;
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+}
+
sub country { return 'GB'; }
sub area_types { return qw(DIS LBO MTD UTA CTY COI); }
sub area_types_children { return @$mySociety::VotingArea::council_child_types }