aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-12-17 12:23:55 +0000
committerDave Whiteland <dave@mysociety.org>2012-12-17 12:23:55 +0000
commitff2ed807bbb7a8c7e21a74770a60965abe8f58e6 (patch)
treeebbd0e5d272bf96eab6a6c811322d83e71b44a45
parent8e812522a2922149f03306846ae50ad52afdd865 (diff)
make OCC play nicely as a two-tiered council, like Lichfield does
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index 8e1e2ce47..edc97b4de 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -14,6 +14,12 @@ sub base_url {
return 'http://fixmystreet.oxfordshire.gov.uk';
}
+# Different to councils parent due to this being a two-tier council. If we get
+# more, this can be genericised in the parent.
+sub problems_clause {
+ return { council => { like => '%2237%' } };
+}
+
sub path_to_web_templates {
my $self = shift;
return [
@@ -42,5 +48,16 @@ sub example_places {
return ( 'OX20 1SZ', 'Park St, Woodstock' );
}
+# If we ever link to a county problem report, needs to be to main FixMyStreet
+sub base_url_for_report {
+ my ( $self, $report ) = @_;
+ my %councils = map { $_ => 1 } @{$report->councils};
+ if ( $councils{2237} ) {
+ return $self->base_url;
+ } else {
+ return FixMyStreet->config('BASE_URL');
+ }
+}
+
1;