aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Bristol.pm54
-rw-r--r--perllib/Open311/PopulateServiceList.pm7
2 files changed, 58 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bristol.pm b/perllib/FixMyStreet/Cobrand/Bristol.pm
new file mode 100644
index 000000000..ad4fe75f3
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Bristol.pm
@@ -0,0 +1,54 @@
+package FixMyStreet::Cobrand::Bristol;
+use parent 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_id { return 2561; }
+sub council_area { return 'Bristol'; }
+sub council_name { return 'Bristol County Council'; }
+sub council_url { return 'bristol'; }
+
+sub base_url {
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
+ return 'https://fixmystreet.bristol.gov.uk';
+}
+
+sub example_places {
+ return ( 'BS1 5TR', "Broad Quay" );
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ my $string = shift;
+
+ my $town = 'Bristol';
+
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ town => $town,
+ centre => '51.4526044866206,-2.7706173308649',
+ span => '0.202810508012753,0.60740886659825',
+ bounds => [ 51.3415749466466, -3.11785543094126, 51.5443854546593, -2.51044656434301 ],
+ };
+}
+
+sub pin_colour {
+ my ( $self, $p, $context ) = @_;
+ return 'grey' if $p->state eq 'not responsible';
+ return 'green' if $p->is_fixed || $p->is_closed;
+ return 'red' if $p->state eq 'confirmed';
+ return 'yellow';
+}
+
+sub contact_email {
+ my $self = shift;
+ return join( '@', 'customer.services', 'bristol.gov.uk' );
+}
+
+sub send_questionnaires {
+ return 0;
+}
+
+1;
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index b0ffe3806..949e2baa9 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -286,9 +286,10 @@ sub _delete_contacts_not_in_service_list {
}
);
- # for Warwickshire, which is mixed Open311 and email, don't delete the email
- # addresses
- if ($self->_current_body->name eq 'Warwickshire County Council') {
+ # for Warwickshire/Bristol, which are mixed Open311 and email, don't delete
+ # the email addresses
+ if ($self->_current_body->name eq 'Warwickshire County Council' ||
+ $self->_current_body->name eq 'Bristol City Council') {
$found_contacts = $found_contacts->search(
{
email => { -not_like => '%@%' }