aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-12-07 11:20:29 +0000
committerStruan Donald <struan@exo.org.uk>2012-12-07 11:20:29 +0000
commita6c47f2a2056ebada0b47ebb600eec13c504f1fa (patch)
treeaa8392c1f360eb5694c63816e07b3807de67863c /perllib/FixMyStreet
parent32af4e21192ad50eaf6c2e650ce3830235445b5c (diff)
add cobrand module and templates for see something say something
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/SeeSomething.pm83
1 files changed, 83 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/SeeSomething.pm b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
new file mode 100644
index 000000000..05be040f8
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/SeeSomething.pm
@@ -0,0 +1,83 @@
+package FixMyStreet::Cobrand::SeeSomething;
+use parent 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_id { return [ 2520, 2522, 2514, 2546, 2519, 2538, 2535 ]; }
+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_restriction {
+ my $self = shift;
+ return { council => { IN => $self->council_id } };
+}
+
+sub problems_clause {
+ my $self = shift;
+ return { council => { 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 council_check {
+ my ( $self, $params, $context ) = @_;
+
+ my $councils = $params->{all_councils};
+ my $council_match = grep { $councils->{$_} } @{ $self->council_id };
+
+ if ($council_match) {
+ return 1;
+ }
+
+ return ( 0, "Not in covered area" );
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ my $string = shift;
+
+ my $town = 'West Midlands';
+
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ town => $town,
+ centre => '52.4803101685267,-2.2708272758854',
+ span => '1.4002794815887,2.06340043925997',
+ bounds => [ 51.8259444771676, -3.23554082684068, 53.2262239587563, -1.17214038758071 ],
+ };
+}
+
+sub example_places {
+ return ( 'ST5 6PJ', 'Cemetery Rd, Silverdale' );
+}
+
+sub send_questionnaires {
+ return 0;
+}
+
+sub ask_ever_reported {
+ return 0;
+}
+
+sub report_sent_confirmation_email { 1; }
+
+sub report_check_for_errors { return (); }
+
+sub never_confirm_reports { 1; }
+
+sub allow_anonymous_reports { 1; }
+
+sub anonymous_account { return { name => 'anon user', email => 'anon@example.com' }; }
+
+1;
+