aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/EastHerts.pm
blob: 0e60c6b0898c25badbdaf82dca34353e9ae232e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package FixMyStreet::Cobrand::EastHerts;
use parent 'FixMyStreet::Cobrand::UKCouncils';

use strict;
use warnings;

sub council_area_id { return 2342; }
sub council_area { return 'East Hertfordshire'; }
sub council_name { return 'East Hertfordshire District Council'; }
sub council_url { return 'eastherts'; }

sub base_url {
    my $self = shift;
    return $self->next::method() if FixMyStreet->config('STAGING_SITE');
    return 'https://fixmystreet.eastherts.gov.uk';
}


sub enter_postcode_text {
    my ($self) = @_;
    return 'Enter an ' . $self->council_area . ' postcode, or street name and area';
}

sub example_places {
    return ( 'SG14 2AP', "Mangrove Road" );
}

sub disambiguate_location {
    my $self    = shift;
    my $string  = shift;

    return {
        %{ $self->SUPER::disambiguate_location() },
        town => 'Hertford',
        centre => '51.8650537133491,-0.00819715483544082',
        span   => '0.26293637547365,0.379186581552513',
        bounds => [ 51.7341800736161, -0.18359132013981, 51.9971164490897, 0.195595261412703 ],
    };
}

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( '@', 'enquiries', 'eastherts.gov.uk' );
}

1;