aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-07-07 17:08:01 +0100
committerMatthew Somerville <matthew@mysociety.org>2014-07-08 17:59:17 +0100
commiteed7e093af42c443f81c22ad31de3baf4f8e9fec (patch)
treeffbdb3d65bae025352fda577c7167ae5763a0fa5 /perllib
parentba8d2c4ba6f6c0216d618e77d368b640a2b92d1e (diff)
Tidy up cobrand template inheritance.
Most cobrands can just inherit from the Default function, with only those needing an exception specified.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Barnet.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/EmptyHomes.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyBarangay.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/FixaMinGata.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/Hart.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/LichfieldDC.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/Reading.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/SeeSomething.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/Southampton.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Stevenage.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm5
14 files changed, 20 insertions, 77 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm
index 768ca9efb..df8757009 100644
--- a/perllib/FixMyStreet/Cobrand/Barnet.pm
+++ b/perllib/FixMyStreet/Cobrand/Barnet.pm
@@ -9,14 +9,6 @@ sub council_area { return 'Barnet'; }
sub council_name { return 'Barnet Council'; }
sub council_url { return 'barnet'; }
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub disambiguate_location {
my $self = shift;
return {
diff --git a/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm b/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm
index d96e7bc96..df4d428e8 100644
--- a/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm
+++ b/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm
@@ -4,14 +4,6 @@ use base 'FixMyStreet::Cobrand::Default';
use strict;
use warnings;
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub country {
return 'CL';
}
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index f648225ae..47d4e238a 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -14,14 +14,6 @@ sub base_url {
return 'https://fix.bromley.gov.uk';
}
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
diff --git a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm
index 47ea023d9..b87a1cf24 100644
--- a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm
+++ b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm
@@ -8,6 +8,11 @@ use FixMyStreet;
use mySociety::Locale;
use Carp;
+sub path_to_web_templates {
+ my $self = shift;
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+}
+
=item
Return the base url for this cobranded site
diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
index c7535f856..194556e72 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm
@@ -4,14 +4,6 @@ use base 'FixMyStreet::Cobrand::Default';
use strict;
use warnings;
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub country {
return 'PH';
}
diff --git a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
index 37c97282e..dc4b15ed0 100644
--- a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
+++ b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm
@@ -17,14 +17,6 @@ sub site_title {
return 'FixaMinGata';
}
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub country {
return 'SE';
}
diff --git a/perllib/FixMyStreet/Cobrand/Hart.pm b/perllib/FixMyStreet/Cobrand/Hart.pm
index cab834b69..adccfce67 100644
--- a/perllib/FixMyStreet/Cobrand/Hart.pm
+++ b/perllib/FixMyStreet/Cobrand/Hart.pm
@@ -16,14 +16,6 @@ sub problems_clause {
return { bodies_str => { like => '%2333%' } };
}
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub disambiguate_location {
my $self = shift;
my $string = shift;
diff --git a/perllib/FixMyStreet/Cobrand/LichfieldDC.pm b/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
index 6a534fc18..a2eb1a859 100644
--- a/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
+++ b/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
@@ -16,6 +16,11 @@ sub problems_clause {
return { bodies_str => { like => '%2434%' } };
}
+sub path_to_web_templates {
+ my $self = shift;
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+}
+
# FIXME - need to double check this is all correct
sub disambiguate_location {
my $self = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index 33611b219..186c9c142 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -21,14 +21,6 @@ sub problems_clause {
return { bodies_str => { like => '%2237%' } };
}
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub enter_postcode_text {
my ($self) = @_;
return 'Enter an Oxfordshire postcode, or street name and area';
diff --git a/perllib/FixMyStreet/Cobrand/Reading.pm b/perllib/FixMyStreet/Cobrand/Reading.pm
index 4cd3f82e2..462006532 100644
--- a/perllib/FixMyStreet/Cobrand/Reading.pm
+++ b/perllib/FixMyStreet/Cobrand/Reading.pm
@@ -11,6 +11,11 @@ sub council_area { return 'Reading'; }
sub council_name { return 'Reading City Council'; }
sub council_url { return 'reading'; }
+sub path_to_web_templates {
+ my $self = shift;
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+}
+
sub disambiguate_location {
my $self = shift;
return {
diff --git a/perllib/FixMyStreet/Cobrand/SeeSomething.pm b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
index 88d5f6b78..e5e937267 100644
--- a/perllib/FixMyStreet/Cobrand/SeeSomething.pm
+++ b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
@@ -22,14 +22,6 @@ sub problems_clause {
return { bodies_str => { IN => $self->council_id } };
}
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub area_check {
my ( $self, $params, $context ) = @_;
diff --git a/perllib/FixMyStreet/Cobrand/Southampton.pm b/perllib/FixMyStreet/Cobrand/Southampton.pm
index 4e068a8c3..cebe1a07e 100644
--- a/perllib/FixMyStreet/Cobrand/Southampton.pm
+++ b/perllib/FixMyStreet/Cobrand/Southampton.pm
@@ -9,6 +9,11 @@ sub council_area { return 'Southampton'; }
sub council_name { return 'Southampton City Council'; }
sub council_url { return 'southampton'; }
+sub path_to_web_templates {
+ my $self = shift;
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
+}
+
sub disambiguate_location {
my $self = shift;
return {
diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm
index 560baba37..1de44a50d 100644
--- a/perllib/FixMyStreet/Cobrand/Stevenage.pm
+++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm
@@ -10,14 +10,6 @@ sub council_name { return 'Stevenage Council'; }
sub council_url { return 'stevenage'; }
sub is_two_tier { return 1; }
-sub path_to_web_templates {
- my $self = shift;
- return [
- FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
- FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
- ];
-}
-
sub disambiguate_location {
my $self = shift;
return {
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index 4c94fb34d..786b6038c 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -4,11 +4,6 @@ use base 'FixMyStreet::Cobrand::Default';
use mySociety::MaPit;
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 { [ 'DIS', 'LBO', 'MTD', 'UTA', 'CTY', 'COI', 'LGD' ] }
sub area_types_children { $mySociety::VotingArea::council_child_types }