diff options
author | Dave Arter <davea@mysociety.org> | 2015-12-14 13:04:59 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-03-29 17:49:37 +0100 |
commit | ecb7e0ff7f75344d313c152a47790b32cbcf32b4 (patch) | |
tree | 9c84541e92a5c6e8ecb5e9d5171d0932962a47ac /perllib/FixMyStreet/Cobrand | |
parent | dedeb93becf9fc5b6cdb05972f3fcd7064678164 (diff) |
[Angus] Cobrand module, templates & design
This adds a cobrand for Angus Council that fits in with their
existing styling on angus.gov.uk
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Angus.pm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Angus.pm b/perllib/FixMyStreet/Cobrand/Angus.pm new file mode 100644 index 000000000..36d888744 --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Angus.pm @@ -0,0 +1,49 @@ +package FixMyStreet::Cobrand::Angus; +use parent 'FixMyStreet::Cobrand::UKCouncils'; + +use strict; +use warnings; + +sub council_id { return 2550; } +sub council_area { return 'Angus'; } +sub council_name { return 'Angus Council'; } +sub council_url { return 'angus'; } + +sub enter_postcode_text { + my ($self) = @_; + return 'Enter an Angus postcode, or street name and area'; +} + +sub example_places { + return ( 'DD8 3AP', "Canmore Street" ); +} + +sub default_show_name { 0 } + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + return { + %{ $self->SUPER::disambiguate_location() }, + town => 'Angus', + centre => '56.7240845983561,-2.91774391131183', + span => '0.525195055746977,0.985870680170788', + bounds => [ 56.4616875530489, -3.40703662677109, 56.9868826087959, -2.4211659466003 ], + }; +} + +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( '@', 'accessline', 'angus.gov.uk' ); +} + +1; |