aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-12-04 17:13:41 +0000
committerDave Whiteland <dave@mysociety.org>2012-12-04 17:13:41 +0000
commit868b2e0144a58d122d4dfdea8dbd394150b2ca51 (patch)
tree3c97648709a25365148fd5f4131aa823455e00bf
parent07a9acb3a5a822c292c09520cd7f862b6be497bb (diff)
add Oxfordshire Cobrand module
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm46
1 files changed, 46 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
new file mode 100644
index 000000000..a117741f5
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -0,0 +1,46 @@
+package FixMyStreet::Cobrand::Oxfordshire;
+use base 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_id { return 2237; }
+sub council_area { return 'Oxfordshire'; }
+sub council_name { return 'Oxfordshire Council'; }
+sub council_url { return 'oxfordshire'; }
+
+sub base_url {
+ return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ return 'https://fixmystreet.oxfordshire.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 enter_postcode_text {
+ my ($self) = @_;
+ return 'Enter an Oxfordshire postcode, or street name and area';
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ my $string = shift;
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ centre => '51.765765,-1.322324',
+ span => '0.154963,0.24347', # NB span is not correct
+ bounds => [ 51.459413, -1.719500, 52.168471, -0.870066 ],
+ };
+}
+
+sub example_places {
+ return ( 'OX20 1SZ', 'Park St, Woodstock' );
+}
+
+1;
+