aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/IsleOfWight.pm70
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm2
2 files changed, 72 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm
new file mode 100644
index 000000000..336649971
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm
@@ -0,0 +1,70 @@
+package FixMyStreet::Cobrand::IsleOfWight;
+use parent 'FixMyStreet::Cobrand::Whitelabel';
+
+use strict;
+use warnings;
+
+sub council_area_id { 2636 }
+sub council_area { 'Isle of Wight' }
+sub council_name { 'Island Roads' }
+sub council_url { 'isleofwight' }
+sub all_reports_single_body { { name => "Isle of Wight Council" } }
+sub link_to_council_cobrand { "Island Roads" }
+
+sub enter_postcode_text {
+ my ($self) = @_;
+ return 'Enter an ' . $self->council_area . ' postcode, or street name and area';
+}
+
+sub on_map_default_status { 'open' }
+
+sub send_questionnaires { 0 }
+
+sub map_type { 'OSM' }
+
+sub disambiguate_location {
+ my $self = shift;
+ my $string = shift;
+
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ centre => '50.675761,-1.296571',
+ bounds => [ 50.574653, -1.591732, 50.767567, -1.062957 ],
+ };
+}
+
+sub updates_disallowed {
+ my ($self, $problem) = @_;
+
+ my $c = $self->{c};
+ return 0 if $c->user_exists && $c->user->id eq $problem->user->id;
+ return 1;
+}
+
+sub get_geocoder { 'OSM' }
+
+sub open311_get_update_munging {
+ my ($self, $comment) = @_;
+
+ # If we've received an update via Open311 that's closed
+ # or fixed the report, also close it to updates.
+ $comment->problem->set_extra_metadata(closed_updates => 1)
+ if !$comment->problem->is_open;
+}
+
+sub open311_config {
+ my ($self, $row, $h, $params) = @_;
+
+ my $extra = $row->get_extra_fields;
+ push @$extra,
+ { name => 'report_url',
+ value => $h->{url} },
+ { name => 'title',
+ value => $row->title },
+ { name => 'description',
+ value => $row->detail };
+
+ $row->set_extra_fields(@$extra);
+}
+
+1;
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 39f446549..1ffcc7b40 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -231,6 +231,8 @@ sub meta_line {
$body = "$body <img src='/cobrands/greenwich/favicon.png' alt=''>";
} elsif ($body eq 'Hounslow Borough Council') {
$body = 'Hounslow Highways';
+ } elsif ($body eq 'Isle of Wight Council') {
+ $body = 'Island Roads';
}
}
my $cobrand_always_view_body_user = $c->cobrand->call_hook("always_view_body_contribute_details");