diff options
61 files changed, 350 insertions, 534 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..778212e22 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: https://www.mysociety.org/donate/ diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 156c81065..6a6040865 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -202,9 +202,7 @@ sub report_form_ajax : Path('ajax') : Args(0) { my @list_of_names = map { $_->name } values %{$c->stash->{bodies}}; my %display_names = map { - my $name = $_->get_cobrand_handler && $_->get_cobrand_handler->can('council_name') - ? $_->get_cobrand_handler->council_name - : $_->name; + my $name = $_->cobrand_name; ( $_->name ne $name ) ? ( $_->name => $name ) : (); } values %{$c->stash->{bodies}}; my $contribute_as = {}; diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index fc5176a07..9b33b42b4 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -287,12 +287,12 @@ sub rss_ward : Path('/rss/reports') : Args(2) { if ($c->stash->{ward}) { # Problems sent to a council, restricted to a ward $c->stash->{type} = 'ward_problems'; - $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->name, WARD => $c->stash->{ward}{name} }; + $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->cobrand_name, WARD => $c->stash->{ward}{name} }; $c->stash->{db_params} = [ $c->stash->{body}->id, $c->stash->{ward}->{id} ]; } else { # Problems sent to a council $c->stash->{type} = 'council_problems'; - $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->name }; + $c->stash->{title_params} = { COUNCIL => $c->stash->{body}->cobrand_name }; $c->stash->{db_params} = [ $c->stash->{body}->id ]; } diff --git a/perllib/FixMyStreet/Cobrand/BathNES.pm b/perllib/FixMyStreet/Cobrand/BathNES.pm index e26e846c3..d726c671e 100644 --- a/perllib/FixMyStreet/Cobrand/BathNES.pm +++ b/perllib/FixMyStreet/Cobrand/BathNES.pm @@ -17,27 +17,12 @@ sub council_area { return 'Bath and North East Somerset'; } sub council_name { return 'Bath and North East Somerset Council'; } sub council_url { return 'bathnes'; } -sub contact_email { - my $self = shift; - return join( '@', 'councilconnect_rejections', 'bathnes.gov.uk' ); -} - sub admin_user_domain { 'bathnes.gov.uk' } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fix.bathnes.gov.uk'; -} - sub map_type { 'BathNES' } sub on_map_default_status { 'open' } -sub example_places { - return ( 'BA1 1JQ', "Lansdown Grove" ); -} - sub get_geocoder { return 'OSM'; # default of Bing gives poor results, let's try overriding. } diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index c89fd9895..727382ec0 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -8,19 +8,11 @@ sub council_area_id { 2494 } sub council_area { 'Bexley' } sub council_name { 'London Borough of Bexley' } sub council_url { 'bexley' } -sub example_places { ( 'DA6 7AT', "Chieveley Road" ) } sub get_geocoder { 'OSM' } sub enable_category_groups { 1 } sub suggest_duplicates { 1 } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - # uncoverable statement - return 'https://fix.bexley.gov.uk'; -} - sub disambiguate_location { my $self = shift; my $string = shift; @@ -34,11 +26,6 @@ sub disambiguate_location { sub on_map_default_status { 'open' } -sub contact_email { - my $self = shift; - return join( '@', 'customer.services', $self->council_url . '.gov.uk' ); -} - sub open311_munge_update_params { my ($self, $params, $comment, $body) = @_; diff --git a/perllib/FixMyStreet/Cobrand/Borsetshire.pm b/perllib/FixMyStreet/Cobrand/Borsetshire.pm index 44a4a9162..a99d2e7b4 100644 --- a/perllib/FixMyStreet/Cobrand/Borsetshire.pm +++ b/perllib/FixMyStreet/Cobrand/Borsetshire.pm @@ -9,10 +9,6 @@ sub council_area { return 'Borsetshire'; } sub council_name { return 'Borsetshire County Council'; } sub council_url { return 'demo'; } -sub example_places { - return ( 'BS36 2NS', 'Coalpit Heath' ); -} - sub pin_colour { my ( $self, $p, $context ) = @_; return 'grey' if $p->is_closed; diff --git a/perllib/FixMyStreet/Cobrand/Bristol.pm b/perllib/FixMyStreet/Cobrand/Bristol.pm index fa2d3fabb..177e2172b 100644 --- a/perllib/FixMyStreet/Cobrand/Bristol.pm +++ b/perllib/FixMyStreet/Cobrand/Bristol.pm @@ -9,16 +9,6 @@ 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 map_type { 'Bristol'; } @@ -50,11 +40,6 @@ sub pin_colour { return 'yellow'; } -sub contact_email { - my $self = shift; - return join( '@', 'customer.services', 'bristol.gov.uk' ); -} - sub send_questionnaires { return 0; } diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm index 986836b2f..ce7c0971f 100644 --- a/perllib/FixMyStreet/Cobrand/Bromley.pm +++ b/perllib/FixMyStreet/Cobrand/Bromley.pm @@ -33,12 +33,6 @@ sub report_new_munge_before_insert { $report->subcategory($report->get_extra_field_value('service_sub_code')); } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fix.bromley.gov.uk'; -} - sub problems_on_map_restriction { my ($self, $rs) = @_; return $rs if FixMyStreet->staging_flag('skip_checks'); @@ -87,10 +81,6 @@ sub get_geocoder { return 'OSM'; # default of Bing gives poor results, let's try overriding. } -sub example_places { - return ( 'BR1 3UH', 'Glebe Rd, Bromley' ); -} - sub map_type { 'Bromley'; } @@ -121,12 +111,6 @@ sub process_open311_extras { $self->SUPER::process_open311_extras( @_, [ 'first_name', 'last_name' ] ); } -sub contact_email { - my $self = shift; - return join( '@', 'info', 'bromley.gov.uk' ); -} -sub contact_name { 'Bromley Council (do not reply)'; } - sub abuse_reports_only { 1; } sub reports_per_page { return 20; } diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm index 6a6da22b6..486e9603d 100644 --- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm +++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm @@ -1,5 +1,5 @@ package FixMyStreet::Cobrand::Buckinghamshire; -use parent 'FixMyStreet::Cobrand::UKCouncils'; +use parent 'FixMyStreet::Cobrand::Whitelabel'; use strict; use warnings; @@ -12,16 +12,6 @@ sub council_area { return 'Buckinghamshire'; } sub council_name { return 'Buckinghamshire County Council'; } sub council_url { return 'buckinghamshire'; } -sub example_places { - return ( 'HP19 7QF', "Walton Road" ); -} - -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fixmystreet.buckscc.gov.uk'; -} - sub disambiguate_location { my $self = shift; my $string = shift; @@ -53,11 +43,6 @@ sub pin_colour { sub admin_user_domain { 'buckscc.gov.uk' } -sub contact_email { - my $self = shift; - return join( '@', 'fixmystreetbs', 'email.buckscc.gov.uk' ); -} - sub send_questionnaires { return 0; } diff --git a/perllib/FixMyStreet/Cobrand/EastHerts.pm b/perllib/FixMyStreet/Cobrand/EastHerts.pm index 0e60c6b08..806f9cc3c 100644 --- a/perllib/FixMyStreet/Cobrand/EastHerts.pm +++ b/perllib/FixMyStreet/Cobrand/EastHerts.pm @@ -9,22 +9,11 @@ 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; @@ -46,9 +35,4 @@ sub pin_colour { return 'yellow'; } -sub contact_email { - my $self = shift; - return join( '@', 'enquiries', 'eastherts.gov.uk' ); -} - 1; diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index fb454f495..e01f3e23b 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -39,6 +39,15 @@ sub restriction { return {}; } +sub munge_category_list { + my ($self, $options, $contacts, $extras) = @_; + + # No TfL Traffic Lights category in Hounslow + my %bodies = map { $_->body->name => 1 } @$contacts; + return unless $bodies{'Hounslow Borough Council'}; + @$options = grep { ($_->{category} || $_->category) !~ /^Traffic lights$/i } @$options; +} + sub title_list { my $self = shift; my $areas = shift; diff --git a/perllib/FixMyStreet/Cobrand/Greenwich.pm b/perllib/FixMyStreet/Cobrand/Greenwich.pm index 2aaa5d776..d39bd5dd2 100644 --- a/perllib/FixMyStreet/Cobrand/Greenwich.pm +++ b/perllib/FixMyStreet/Cobrand/Greenwich.pm @@ -5,20 +5,10 @@ use strict; use warnings; sub council_area_id { return 2493; } -sub council_area { return 'Greenwich'; } +sub council_area { return 'Royal Borough of Greenwich'; } sub council_name { return 'Royal Borough of Greenwich'; } sub council_url { return 'greenwich'; } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fix.royalgreenwich.gov.uk'; -} - -sub example_places { - return ( 'SE18 6HQ', "Woolwich Road" ); -} - sub enter_postcode_text { my ($self) = @_; return 'Enter a Royal Greenwich postcode, or street name and area'; @@ -50,11 +40,6 @@ sub pin_colour { return 'yellow'; } -sub contact_email { - my $self = shift; - return join( '@', 'fixmystreet', 'royalgreenwich.gov.uk' ); -} - sub reports_per_page { return 20; } sub open311_config { diff --git a/perllib/FixMyStreet/Cobrand/Hart.pm b/perllib/FixMyStreet/Cobrand/Hart.pm index 3ff2a2a19..24a358ab8 100644 --- a/perllib/FixMyStreet/Cobrand/Hart.pm +++ b/perllib/FixMyStreet/Cobrand/Hart.pm @@ -26,10 +26,6 @@ sub disambiguate_location { }; } -sub example_places { - return ( 'GU51 4JX', 'Primrose Drive' ); -} - sub categories_restriction { my ($self, $rs) = @_; return $rs->search( { category => { '!=' => 'Graffiti on bridges/subways' } } ); @@ -43,12 +39,6 @@ sub ask_ever_reported { return 0; } -sub contact_email { - my $self = shift; - return join( '@', 'info', 'hart.gov.uk' ); -} -sub contact_name { 'Hart District Council (do not reply)'; } - sub default_map_zoom { 3 } sub reports_per_page { return 20; } diff --git a/perllib/FixMyStreet/Cobrand/Hounslow.pm b/perllib/FixMyStreet/Cobrand/Hounslow.pm index 491384847..1628715c6 100644 --- a/perllib/FixMyStreet/Cobrand/Hounslow.pm +++ b/perllib/FixMyStreet/Cobrand/Hounslow.pm @@ -8,16 +8,9 @@ sub council_area_id { 2483 } sub council_area { 'Hounslow' } sub council_name { 'Hounslow Highways' } sub council_url { 'hounslow' } -sub example_places { ( 'TW3 1SN', "Depot Road" ) } sub map_type { 'Hounslow' } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fms.hounslowhighways.org'; -} - sub enter_postcode_text { my ($self) = @_; return "Enter a Hounslow street name and area, or postcode"; @@ -52,11 +45,6 @@ sub get_geocoder { sub on_map_default_status { 'open' } -sub contact_email { - my $self = shift; - return join( '@', 'enquiries', $self->council_url . 'highways.org' ); -} - sub send_questionnaires { 0 } sub enable_category_groups { 1 } diff --git a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm index 2506772b3..3b731b273 100644 --- a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm +++ b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm @@ -1,5 +1,5 @@ package FixMyStreet::Cobrand::Lincolnshire; -use parent 'FixMyStreet::Cobrand::UKCouncils'; +use parent 'FixMyStreet::Cobrand::Whitelabel'; use strict; use warnings; @@ -29,23 +29,6 @@ sub enter_postcode_text { return 'Enter a Lincolnshire postcode, street name and area, or check an existing report number'; } - -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fixmystreet.lincolnshire.gov.uk'; -} - -sub contact_email { - my $self = shift; - return join( '@', 'confirm_support', 'lincolnshire.gov.uk' ); -} - - -sub example_places { - return ( 'LN1 1YL', 'Orchard Street, Lincoln' ); -} - sub disambiguate_location { my $self = shift; my $string = shift; diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm index 683dc059c..3d5d4b6f2 100644 --- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm +++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm @@ -12,16 +12,8 @@ sub council_area { 'Northamptonshire' } sub council_name { 'Northamptonshire County Council' } sub council_url { 'northamptonshire' } -sub example_places { ( 'NN1 1NS', "Bridge Street" ) } - sub enter_postcode_text { 'Enter a Northamptonshire postcode, street name and area, or check an existing report number' } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fixmystreet.northamptonshire.gov.uk'; -} - sub disambiguate_location { my $self = shift; my $string = shift; @@ -51,11 +43,6 @@ sub problems_on_map_restriction { return $self->problems_restriction($rs); } -sub contact_email { - my $self = shift; - return join( '@', 'highways', $self->council_url . '.gov.uk' ); -} - sub privacy_policy_url { 'https://www3.northamptonshire.gov.uk/councilservices/council-and-democracy/transparency/information-policies/privacy-notice/place/Pages/street-doctor.aspx' } diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm index 845536bb1..72a56f46c 100644 --- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm +++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm @@ -37,12 +37,6 @@ sub is_council_with_case_management { return FixMyStreet->config('STAGING_SITE'); } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'https://fixmystreet.oxfordshire.gov.uk'; -} - sub enter_postcode_text { my ($self) = @_; return 'Enter an Oxfordshire postcode, or street name and area'; @@ -60,10 +54,6 @@ sub disambiguate_location { }; } -sub example_places { - return ( 'OX20 1SZ', 'Park St, Woodstock' ); -} - # don't send questionnaires to people who used the OCC cobrand to report their problem sub send_questionnaires { return 0; } @@ -156,11 +146,6 @@ sub should_skip_sending_update { sub on_map_default_status { return 'open'; } -sub contact_email { - my $self = shift; - return join( '@', 'highway.enquiries', 'oxfordshire.gov.uk' ); -} - sub admin_user_domain { 'oxfordshire.gov.uk' } sub traffic_management_options { diff --git a/perllib/FixMyStreet/Cobrand/Rutland.pm b/perllib/FixMyStreet/Cobrand/Rutland.pm index af635ac59..407d43d14 100644 --- a/perllib/FixMyStreet/Cobrand/Rutland.pm +++ b/perllib/FixMyStreet/Cobrand/Rutland.pm @@ -35,10 +35,6 @@ sub open311_config { $params->{multi_photos} = 1; } -sub example_places { - return ( 'LE15 6HP', 'High Street', 'Oakham' ); -} - sub disambiguate_location { my $self = shift; my $string = shift; diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm index 28734b14b..9b0e91016 100644 --- a/perllib/FixMyStreet/Cobrand/Stevenage.pm +++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm @@ -10,12 +10,6 @@ sub council_name { return 'Stevenage Council'; } sub council_url { return 'stevenage'; } sub is_two_tier { return 1; } -sub base_url { - my $self = shift; - return $self->next::method() if FixMyStreet->config('STAGING_SITE'); - return 'http://fixmystreet.stevenage.gov.uk'; -} - sub disambiguate_location { my $self = shift; return { @@ -27,18 +21,9 @@ sub disambiguate_location { }; } -sub example_places { - return [ 'SG1 1HN', 'Lyton Way' ]; -} - sub default_map_zoom { return 3; } sub users_can_hide { return 1; } -sub contact_email { - my $self = shift; - return join( '@', 'csc', 'stevenage.gov.uk' ); -} - 1; diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm index da0356664..fde5f465a 100644 --- a/perllib/FixMyStreet/Cobrand/UK.pm +++ b/perllib/FixMyStreet/Cobrand/UK.pm @@ -140,6 +140,13 @@ sub find_closest { sub reports_body_check { my ( $self, $c, $code ) = @_; + # Deal with Bexley name not starting with short name + if ($code =~ /bexley/i) { + my $body = $c->model('DB::Body')->search( { name => { -like => "%$code%" } } )->single; + $c->stash->{body} = $body; + return $body; + } + # Manual misspelling redirect if ($code =~ /^rhondda cynon taff$/i) { my $url = $c->uri_for( '/reports/Rhondda+Cynon+Taf' ); diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index c21ed6401..f17593095 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -110,7 +110,11 @@ sub users_restriction { sub base_url { my $self = shift; - my $base_url = FixMyStreet->config('BASE_URL'); + + my $base_url = $self->feature('base_url'); + return $base_url if $base_url; + + $base_url = FixMyStreet->config('BASE_URL'); my $u = $self->council_url; if ( $base_url !~ /$u/ ) { $base_url =~ s{(https?://)(?!www\.)}{$1$u.}g; @@ -119,6 +123,11 @@ sub base_url { return $base_url; } +sub example_places { + my $self = shift; + return $self->feature('example_places') || $self->next::method(); +} + sub enter_postcode_text { my ($self) = @_; return 'Enter a ' . $self->council_area . ' postcode, or street name and area'; @@ -325,6 +334,16 @@ sub lookup_site_code { return $site_code; } +sub contact_name { + my $self = shift; + return $self->feature('contact_name') || $self->next::method(); +} + +sub contact_email { + my $self = shift; + return $self->feature('contact_email') || $self->next::method(); +} + sub extra_contact_validation { my $self = shift; my $c = shift; diff --git a/perllib/FixMyStreet/Cobrand/Warwickshire.pm b/perllib/FixMyStreet/Cobrand/Warwickshire.pm index c301450bc..ff28bc8b3 100644 --- a/perllib/FixMyStreet/Cobrand/Warwickshire.pm +++ b/perllib/FixMyStreet/Cobrand/Warwickshire.pm @@ -22,16 +22,6 @@ sub disambiguate_location { }; } -sub example_places { - return [ 'CV34 4RL', 'Stratford Rd' ]; -} - -sub contact_email { - my $self = shift; - return join( '@', 'fmstest', 'warwickshire.gov.uk' ); -} -sub contact_name { 'Warwickshire County Council (do not reply)'; } - sub send_questionnaires { 0 } sub open311_contact_meta_override { diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index 9424eaf03..7251bc863 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -215,6 +215,22 @@ sub get_cobrand_handler { return FixMyStreet::Cobrand->body_handler($self->areas); } +=item + +If get_cobrand_handler returns a cobrand, and that cobrand +has a council_name, use it in preference to the body name. + +=cut + +sub cobrand_name { + my $self = shift; + my $handler = $self->get_cobrand_handler; + if ($handler && $handler->can('council_name')) { + return $handler->council_name; + } + return $self->name; +} + sub calculate_average { my ($self, $threshold) = @_; $threshold ||= 0; diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 5d0253ef4..39f446549 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -229,6 +229,8 @@ sub meta_line { $body = "$body <img src='/cobrands/bromley/favicon.png' alt=''>"; } elsif ($body eq 'Royal Borough of Greenwich') { $body = "$body <img src='/cobrands/greenwich/favicon.png' alt=''>"; + } elsif ($body eq 'Hounslow Borough Council') { + $body = 'Hounslow Highways'; } } my $cobrand_always_view_body_user = $c->cobrand->call_hook("always_view_body_contribute_details"); diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index dc45091ee..c1608b35d 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -755,7 +755,7 @@ sub defect_types { # Note: this only makes sense when called on a problem that has been sent! sub can_display_external_id { my $self = shift; - if ($self->external_id && $self->send_method_used && $self->to_body_named('Oxfordshire|Lincolnshire')) { + if ($self->external_id && $self->to_body_named('Oxfordshire|Lincolnshire')) { return 1; } return 0; diff --git a/t/cobrand/bexley.t b/t/cobrand/bexley.t index e6f400e3d..2f74ac03a 100644 --- a/t/cobrand/bexley.t +++ b/t/cobrand/bexley.t @@ -12,10 +12,18 @@ $ukc->mock('lookup_site_code', sub { return "Road ID"; }); -my $cobrand = FixMyStreet::Cobrand::Bexley->new; -like $cobrand->contact_email, qr/bexley/; -is $cobrand->on_map_default_status, 'open'; -is_deeply $cobrand->disambiguate_location->{bounds}, [ 51.408484, 0.074653, 51.515542, 0.2234676 ]; +FixMyStreet::override_config { + COBRAND_FEATURES => { + contact_email => { + bexley => 'foo@bexley', + } + }, +}, sub { + my $cobrand = FixMyStreet::Cobrand::Bexley->new; + like $cobrand->contact_email, qr/bexley/; + is $cobrand->on_map_default_status, 'open'; + is_deeply $cobrand->disambiguate_location->{bounds}, [ 51.408484, 0.074653, 51.515542, 0.2234676 ]; +}; my $mech = FixMyStreet::TestMech->new; diff --git a/t/cobrand/hounslow.t b/t/cobrand/hounslow.t index 5d9f022e7..8fac848b1 100644 --- a/t/cobrand/hounslow.t +++ b/t/cobrand/hounslow.t @@ -3,6 +3,20 @@ use FixMyStreet::TestMech; ok( my $mech = FixMyStreet::TestMech->new, 'Created mech object' ); my $hounslow_id = $mech->create_body_ok(2483, 'Hounslow Borough Council')->id; +$mech->create_contact_ok( + body_id => $hounslow_id, + category => 'Potholes', + email => 'pothole@example.org', +); + +$mech->create_user_ok('staff@example.org', from_body => $hounslow_id); + +my $tfl = $mech->create_body_ok( 2483, 'TfL'); +$mech->create_contact_ok( + body_id => $tfl->id, + category => 'Traffic lights', + email => 'tfl@example.org', +); $mech->create_problems_for_body(1, $hounslow_id, 'An old problem made before Hounslow FMS launched', { confirmed => '2018-12-25 09:00', @@ -11,7 +25,8 @@ $mech->create_problems_for_body(1, $hounslow_id, 'An old problem made before Hou $mech->create_problems_for_body(1, $hounslow_id, 'A brand new problem made on the Hounslow site', { cobrand => 'hounslow' }); -$mech->create_problems_for_body(1, $hounslow_id, 'A brand new problem made on fixmystreet.com', { +my ($report) = $mech->create_problems_for_body(1, $hounslow_id, 'A brand new problem made on fixmystreet.com', { + external_id => 'ABC123', cobrand => 'fixmystreet' }); @@ -41,4 +56,26 @@ subtest "it does not show old reports on Hounslow" => sub { }; }; +subtest "does not show TfL traffic lights category" => sub { + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.uk/', + ALLOWED_COBRANDS => 'fixmystreet', + }, sub { + my $json = $mech->get_ok_json('/report/new/ajax?latitude=51.482286&longitude=-0.328163'); + is $json->{by_category}{"Traffic lights"}, undef; + }; +}; + +subtest "Shows external ID on report page to staff users only" => sub { + FixMyStreet::override_config { + ALLOWED_COBRANDS => 'hounslow', + }, sub { + $mech->get_ok('/report/' . $report->id); + $mech->content_lacks('ABC123'); + $mech->log_in_ok('staff@example.org'); + $mech->get_ok('/report/' . $report->id); + $mech->content_contains('ABC123'); + }; +}; + done_testing(); diff --git a/templates/email/hounslow/_council_reference.html b/templates/email/hounslow/_council_reference.html index 56944f954..3b886a51e 100644 --- a/templates/email/hounslow/_council_reference.html +++ b/templates/email/hounslow/_council_reference.html @@ -1,4 +1,4 @@ [% IF problem.external_id ~%] <p style="[% p_style %]">The report's reference number is <strong>[% problem.external_id %]</strong>. - Please quote this if you need to contact the council about this report.</p> + Please quote this if you need to contact Hounslow Highways about this report.</p> [%~ END %] diff --git a/templates/email/hounslow/_council_reference.txt b/templates/email/hounslow/_council_reference.txt index 3dd3f1e9f..ebd7d4588 100644 --- a/templates/email/hounslow/_council_reference.txt +++ b/templates/email/hounslow/_council_reference.txt @@ -1,2 +1,2 @@ [% IF problem.external_id %]The report's reference number is [% problem.external_id %]. Please quote this if -you need to contact the council about this report.[% END %] +you need to contact Hounslow Highways about this report.[% END %] diff --git a/templates/email/hounslow/_council_reference_alert_update.html b/templates/email/hounslow/_council_reference_alert_update.html index 56944f954..3b886a51e 100644 --- a/templates/email/hounslow/_council_reference_alert_update.html +++ b/templates/email/hounslow/_council_reference_alert_update.html @@ -1,4 +1,4 @@ [% IF problem.external_id ~%] <p style="[% p_style %]">The report's reference number is <strong>[% problem.external_id %]</strong>. - Please quote this if you need to contact the council about this report.</p> + Please quote this if you need to contact Hounslow Highways about this report.</p> [%~ END %] diff --git a/templates/email/hounslow/_council_reference_alert_update.txt b/templates/email/hounslow/_council_reference_alert_update.txt index 3dd3f1e9f..ebd7d4588 100644 --- a/templates/email/hounslow/_council_reference_alert_update.txt +++ b/templates/email/hounslow/_council_reference_alert_update.txt @@ -1,2 +1,2 @@ [% IF problem.external_id %]The report's reference number is [% problem.external_id %]. Please quote this if -you need to contact the council about this report.[% END %] +you need to contact Hounslow Highways about this report.[% END %] diff --git a/templates/web/base/footer.html b/templates/web/base/footer.html index e2bdbb01a..e2bdbb01a 100755..100644 --- a/templates/web/base/footer.html +++ b/templates/web/base/footer.html diff --git a/templates/web/base/main_nav_items.html b/templates/web/base/main_nav_items.html index 75fdecd9d..4b031cbaa 100644 --- a/templates/web/base/main_nav_items.html +++ b/templates/web/base/main_nav_items.html @@ -27,8 +27,8 @@ END; reports_uri = '/reports'; - IF body_name; - body_name = body_name | uri; + IF c.cobrand.council_area; + body_name = c.cobrand.council_area | uri; reports_uri = "${reports_uri}/${body_name}"; END; diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index 1016c5c47..95fc9d751 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -25,7 +25,7 @@ <option value="another_user">[% loc('Another user') %]</option> [% END %] [% IF js || can_contribute_as_body %] - <option value="body" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? 'selected' : '' %]>[% c.user.from_body.get_cobrand_handler ? c.user.from_body.get_cobrand_handler.council_name : c.user.from_body.name %]</option> + <option value="body" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? 'selected' : '' %]>[% c.user.from_body.cobrand_name %]</option> [% END %] </select> [% END %] diff --git a/templates/web/base/reports/_rss.html b/templates/web/base/reports/_rss.html index fdb833315..567be92ea 100644 --- a/templates/web/base/reports/_rss.html +++ b/templates/web/base/reports/_rss.html @@ -1,8 +1,9 @@ <div class="shadow-wrap"> <ul id="key-tools"> <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% - IF c.cobrand.moniker == 'bromley' AND thing == 'council'; - 'Get updates of reports in Bromley'; + SET monikers = ['bromley','hounslow']; + IF monikers.grep(c.cobrand.moniker).size AND thing == 'council'; + 'Get updates of reports in ' _ c.cobrand.moniker.ucfirst; ELSIF c.cobrand.moniker == 'bromley'; 'Get updates of reports in this ward'; ELSIF c.cobrand.is_council; diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html index 8be72d632..02791ba3b 100755 --- a/templates/web/base/reports/body.html +++ b/templates/web/base/reports/body.html @@ -1,9 +1,14 @@ +[% SET body_name = body.name %] +[% IF c.cobrand.moniker == 'hounslow' %] + [% SET body_name = 'Hounslow Highways' %] +[% END %] + [% IF ward %] - [% name = "$ward.name, $body.name" + [% name = "$ward.name, $body_name" thing = loc('ward') %] [% ELSE %] - [% name = body.name + [% name = body_name thing = loc('council') %] [% END %] @@ -41,15 +46,15 @@ <h1 id="reports_heading"> [% ward.name %] </h1> - <a href="[% body_url %]">[% body.name %]</a> + <a href="[% body_url %]">[% body_name %]</a> [% ELSIF wards %] <h1 id="reports_heading"> [% FOREACH w IN wards %][% w.name %][% IF NOT loop.last %], [% END %][% END %] </h1> - <a href="[% body_url %]">[% body.name %]</a> + <a href="[% body_url %]">[% body_name %]</a> [% ELSE %] <h1 id="reports_heading"> - [% body.name %] + [% body_name %] </h1> [% END %] diff --git a/templates/web/bexley/main_nav_items.html b/templates/web/bexley/main_nav_items.html index 44edd68a8..9522238f4 100644 --- a/templates/web/bexley/main_nav_items.html +++ b/templates/web/bexley/main_nav_items.html @@ -16,8 +16,8 @@ END; reports_uri = '/reports'; - IF body_name; - body_name = body_name | uri; + IF c.cobrand.council_area; + body_name = c.cobrand.council_area | uri; reports_uri = "${reports_uri}/${body_name}"; END; diff --git a/templates/web/bristol/footer.html b/templates/web/bristol/footer.html deleted file mode 100644 index 794dbe457..000000000 --- a/templates/web/bristol/footer.html +++ /dev/null @@ -1,23 +0,0 @@ - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area %] - </div> - </div> - </div> <!-- .wrapper --> - - [% IF pagefooter %] - <div class="bristol_footer"> - <footer role="contentinfo" class="clearfix"> - [% INCLUDE 'front/footer-marketing.html' %] - </footer> - </div> - [% END %] - - [% INCLUDE 'common_footer_tags.html' %] - -</body> -</html> diff --git a/templates/web/bristol/footer_extra.html b/templates/web/bristol/footer_extra.html new file mode 100644 index 000000000..ea586e26d --- /dev/null +++ b/templates/web/bristol/footer_extra.html @@ -0,0 +1,5 @@ +<div class="bristol_footer"> + <footer role="contentinfo" class="clearfix"> + [% INCLUDE 'front/footer-marketing.html' %] + </footer> +</div> diff --git a/templates/web/bromley/footer.html b/templates/web/bromley/footer.html index 5ac94ba83..914ba3ace 100644 --- a/templates/web/bromley/footer.html +++ b/templates/web/bromley/footer.html @@ -9,7 +9,7 @@ <div class="nav-wrapper"> <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area hide_privacy_link=1 %] + [% INCLUDE "main_nav.html" hide_privacy_link=1 %] </div> </div> </div> <!-- .wrapper --> diff --git a/templates/web/buckinghamshire/footer.html b/templates/web/buckinghamshire/footer.html deleted file mode 100644 index 81553e00e..000000000 --- a/templates/web/buckinghamshire/footer.html +++ /dev/null @@ -1,23 +0,0 @@ - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area %] - </div> - </div> - </div> <!-- .wrapper --> - - [% IF pagefooter %] - <div class="bucks_footer"> - <footer role="contentinfo" class="clearfix"> - [% INCLUDE 'front/footer-marketing.html' %] - </footer> - </div> - [% END %] - - [% INCLUDE 'common_footer_tags.html' %] - -</body> -</html> diff --git a/templates/web/buckinghamshire/front/footer-marketing.html b/templates/web/buckinghamshire/front/footer-marketing.html deleted file mode 100644 index e69de29bb..000000000 --- a/templates/web/buckinghamshire/front/footer-marketing.html +++ /dev/null diff --git a/templates/web/eastherts/footer.html b/templates/web/eastherts/footer.html deleted file mode 100644 index e8a54e462..000000000 --- a/templates/web/eastherts/footer.html +++ /dev/null @@ -1,54 +0,0 @@ - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area %] - </div> - </div> - </div> <!-- .wrapper --> - - [% IF pagefooter %] - <div class="footer clearfix"> - <div class="container"> - <div class="footer__left"><img src="https://www.eastherts.gov.uk/image/29958/EastHertsLogo-Footer/original.png" width="250" height="75" alt="EastHertsLogo-Footer" title="EastHertsLogo-Footer" class="footer__logo" /> - <div class="footer__socialmedia"> - - <a href="https://www.facebook.com" rel="external" title="Facebook"><img src="https://www.eastherts.gov.uk/image/29956/Facebook/original.png" width="40" height="40" alt="Facebook" title="Facebook" /> - </a> - - <a href="https://www.twitter.com" rel="external" title="Twitter"><img src="https://www.eastherts.gov.uk/image/29959/Twitter/original.png" width="40" height="40" alt="Twitter" title="Twitter" /> - </a><img src="https://www.eastherts.gov.uk/image/29957/RSS/original.png" width="40" height="40" alt="RSS" title="RSS" /> - </div> - </div> - <div class="footer__right"> - <div class="footer__navigation"> - <ul> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34224/Site-map" class="footer__navlink">Site map</a> - </li> - <li class="footer__navitem"><a href="/article/34226/Terms--Conditions" class="footer__navlink">Terms & Conditions</a> - </li> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34230/Privacy--Cookies" class="footer__navlink">Privacy & Cookies</a> - </li> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34378/Privacy-Data-Protection-and-Fraud-Prevention" class="footer__navlink">Privacy, Data Protection and Fraud Prevention</a> - </li> - <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34376/Comments-Compliments-and-Complaints" class="footer__navlink" accesskey="7">Comments, Compliments and Complaints</a> - </li> - </ul> - </div> - <div class="footer__copyright"> - <p>© 2017 mySociety</p> - </div> - <div class="footer__goss"> - <a href="https://www.fixmystreet.com/pro/">Powered by FixMyStreet</a> - </div> - </div> - </div> - </div> - [% END %] - - [% INCLUDE 'common_footer_tags.html' %] - -</body> -</html> diff --git a/templates/web/eastherts/footer_extra.html b/templates/web/eastherts/footer_extra.html new file mode 100644 index 000000000..de0a9fab0 --- /dev/null +++ b/templates/web/eastherts/footer_extra.html @@ -0,0 +1,36 @@ +<div class="footer clearfix"> + <div class="container"> + <div class="footer__left"><img src="https://www.eastherts.gov.uk/image/29958/EastHertsLogo-Footer/original.png" width="250" height="75" alt="EastHertsLogo-Footer" title="EastHertsLogo-Footer" class="footer__logo" /> + <div class="footer__socialmedia"> + + <a href="https://www.facebook.com" rel="external" title="Facebook"><img src="https://www.eastherts.gov.uk/image/29956/Facebook/original.png" width="40" height="40" alt="Facebook" title="Facebook" /> + </a> + + <a href="https://www.twitter.com" rel="external" title="Twitter"><img src="https://www.eastherts.gov.uk/image/29959/Twitter/original.png" width="40" height="40" alt="Twitter" title="Twitter" /> + </a><img src="https://www.eastherts.gov.uk/image/29957/RSS/original.png" width="40" height="40" alt="RSS" title="RSS" /> + </div> + </div> + <div class="footer__right"> + <div class="footer__navigation"> + <ul> + <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34224/Site-map" class="footer__navlink">Site map</a> + </li> + <li class="footer__navitem"><a href="/article/34226/Terms--Conditions" class="footer__navlink">Terms & Conditions</a> + </li> + <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34230/Privacy--Cookies" class="footer__navlink">Privacy & Cookies</a> + </li> + <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34378/Privacy-Data-Protection-and-Fraud-Prevention" class="footer__navlink">Privacy, Data Protection and Fraud Prevention</a> + </li> + <li class="footer__navitem"><a href="https://www.eastherts.gov.uk/article/34376/Comments-Compliments-and-Complaints" class="footer__navlink" accesskey="7">Comments, Compliments and Complaints</a> + </li> + </ul> + </div> + <div class="footer__copyright"> + <p>© 2017 mySociety</p> + </div> + <div class="footer__goss"> + <a href="https://www.fixmystreet.com/pro/">Powered by FixMyStreet</a> + </div> + </div> + </div> +</div> diff --git a/templates/web/greenwich/footer.html b/templates/web/greenwich/footer.html deleted file mode 100644 index 7cc4f185c..000000000 --- a/templates/web/greenwich/footer.html +++ /dev/null @@ -1,20 +0,0 @@ - [% IF pagefooter %] - <footer role="contentinfo"> - [% INCLUDE 'front/footer-marketing.html' %] - </footer> - [% END %] - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_name %] - </div> - </div> - </div> <!-- .wrapper --> - - [% INCLUDE 'common_footer_tags.html' %] - -</body> -</html> diff --git a/templates/web/greenwich/header_logo.html b/templates/web/greenwich/header_logo.html index cfe485af1..a38e166a9 100644 --- a/templates/web/greenwich/header_logo.html +++ b/templates/web/greenwich/header_logo.html @@ -15,4 +15,4 @@ <li><a href="/">FixMyStreet</a></li> </ul> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_name hide_privacy_link=1 ul_id="fms-menu-desktop" ul_class="" omit_wrapper=1 %] + [% INCLUDE "main_nav.html" hide_privacy_link=1 ul_id="fms-menu-desktop" ul_class="" omit_wrapper=1 %] diff --git a/templates/web/hart/footer.html b/templates/web/hart/footer.html index 5a53fb978..15ed6611c 100644 --- a/templates/web/hart/footer.html +++ b/templates/web/hart/footer.html @@ -6,7 +6,7 @@ <div class="nav-wrapper clearfix"> <div class="container container--hart"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area ul_class="nav-menu nav-menu--first" hide_privacy_link=1 %] + [% INCLUDE "main_nav.html" ul_class="nav-menu nav-menu--first" hide_privacy_link=1 %] </div> <div class="container"> <div id="main-nav--hart" role="navigation"> @@ -31,76 +31,9 @@ </li> </ul> </div> - <div class="sign-in"> - [% IF c.user_exists %] - <p> - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - <a href="/auth/sign_out">[% loc('sign out') %]</a> - </p> - [% END %] - </div> </div> </div> - <footer id="hart-footer"> - <div id="footer-inner" class="container"> - <div id="footer-row-1" class="clearfix row"> - <p class="desk-only"> - <strong>©</strong> - <a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer" class="hart">Hart District Council</a> - <a href="http://www.gov.uk/" title="GOV.UK">GOV.UK</a> - </p> - <ul id="footer-nav"> - <li> <a href="http://www.hart.gov.uk/Accessibility">Accessibility</a> </li> - <li class="mob-only"> <a href="http://www.gov.uk/" title="GOV.UK">GOV.UK</a> </li> - <li> <a href="http://www.hart.gov.uk/privacy">Privacy</a> </li> - <li class="mob-only"> <a href="http://www3.basingstoke.gov.uk/ccmwa/chat/a6f6143d-407f-4f99-b673-6feb98b54815">Web Chat</a> </li> - <li class="mob-only"> <a href="https://www.hart.gov.uk/contact-us">Contact us</a> </li> - <li class="mob-only"> <a href="https://www.hart.gov.uk/feedback">Feedback</a> </li> - <li class="mob-only bottom"> <a href="https://www.hart.gov.uk/user/login?current=node/1">Login</a> </li> - <li class="mob-only bottom"> <a href="https://www.hart.gov.uk/user/register">Register</a> </li> - </ul> - </div> - <div id="footer-row-2" class="clearfix row"> - <ul id="footer-images"> - <li> - <a href="https://www.facebook.com/HartDistrictCouncil"> - <img alt="Facebook" src="/cobrands/hart/facebook-logo.png" style="width: 50px; height: 50px;"> - </a> - </li> - <li> - <a href="https://twitter.com/HartCouncil"> - <img alt="Twitter" src="/cobrands/hart/twitter-logo.png" style="width: 50px; height: 50px;"> - </a> - </li> - <li> - <a href="https://www.youtube.com/channel/UCtkLOTkot4Z24Mr9C4I3t-A"> - <img alt="YouTube" src="/cobrands/hart/youtube-logo.png" style="width: 50px; height: 50px;"> - </a> - </li> - <li> - <a href="https://www.instagram.com/hartcouncil/"> - <img alt="Instagram" src="/cobrands/hart/instagram-logo.png" style="width: 50px; height: 50px;"> - </a> - </li> - <li class="web-chat"> - <a href="http://www3.basingstoke.gov.uk/ccmwa/chat/a6f6143d-407f-4f99-b673-6feb98b54815"> - <span class="desk-only">Web Chat</span> - <img alt="Web chat" src="/cobrands/hart/chat.png" style="height: 50px; width: 50px;"> - </a> - </li> - </ul> - </div> - <div id="footer-row-3" class="clearfix row"> - <p class="mob-only"> - <strong>©</strong> - <a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer" class="hart">Hart District Council</a> - </p> - <a href="https://www.fixmystreet.com/pro/">Powered by <img src="/cobrands/hart/fms-logo.png" alt="FixMyStreet" style="height:20px;"></a> - </div> - </div> - </footer> - [% INCLUDE 'common_footer_tags.html' %] </div> diff --git a/templates/web/hart/footer_extra.html b/templates/web/hart/footer_extra.html new file mode 100644 index 000000000..5e9db575f --- /dev/null +++ b/templates/web/hart/footer_extra.html @@ -0,0 +1,58 @@ +<footer id="hart-footer"> + <div id="footer-inner" class="container"> + <div id="footer-row-1" class="clearfix row"> + <p class="desk-only"> + <strong>©</strong> + <a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer" class="hart">Hart District Council</a> + <a href="http://www.gov.uk/" title="GOV.UK">GOV.UK</a> + </p> + <ul id="footer-nav"> + <li> <a href="http://www.hart.gov.uk/Accessibility">Accessibility</a> </li> + <li class="mob-only"> <a href="http://www.gov.uk/" title="GOV.UK">GOV.UK</a> </li> + <li> <a href="http://www.hart.gov.uk/privacy">Privacy</a> </li> + <li class="mob-only"> <a href="http://www3.basingstoke.gov.uk/ccmwa/chat/a6f6143d-407f-4f99-b673-6feb98b54815">Web Chat</a> </li> + <li class="mob-only"> <a href="https://www.hart.gov.uk/contact-us">Contact us</a> </li> + <li class="mob-only"> <a href="https://www.hart.gov.uk/feedback">Feedback</a> </li> + <li class="mob-only bottom"> <a href="https://www.hart.gov.uk/user/login?current=node/1">Login</a> </li> + <li class="mob-only bottom"> <a href="https://www.hart.gov.uk/user/register">Register</a> </li> + </ul> + </div> + <div id="footer-row-2" class="clearfix row"> + <ul id="footer-images"> + <li> + <a href="https://www.facebook.com/HartDistrictCouncil"> + <img alt="Facebook" src="/cobrands/hart/facebook-logo.png" style="width: 50px; height: 50px;"> + </a> + </li> + <li> + <a href="https://twitter.com/HartCouncil"> + <img alt="Twitter" src="/cobrands/hart/twitter-logo.png" style="width: 50px; height: 50px;"> + </a> + </li> + <li> + <a href="https://www.youtube.com/channel/UCtkLOTkot4Z24Mr9C4I3t-A"> + <img alt="YouTube" src="/cobrands/hart/youtube-logo.png" style="width: 50px; height: 50px;"> + </a> + </li> + <li> + <a href="https://www.instagram.com/hartcouncil/"> + <img alt="Instagram" src="/cobrands/hart/instagram-logo.png" style="width: 50px; height: 50px;"> + </a> + </li> + <li class="web-chat"> + <a href="http://www3.basingstoke.gov.uk/ccmwa/chat/a6f6143d-407f-4f99-b673-6feb98b54815"> + <span class="desk-only">Web Chat</span> + <img alt="Web chat" src="/cobrands/hart/chat.png" style="height: 50px; width: 50px;"> + </a> + </li> + </ul> + </div> + <div id="footer-row-3" class="clearfix row"> + <p class="mob-only"> + <strong>©</strong> + <a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer" class="hart">Hart District Council</a> + </p> + <a href="https://www.fixmystreet.com/pro/">Powered by <img src="/cobrands/hart/fms-logo.png" alt="FixMyStreet" style="height:20px;"></a> + </div> + </div> +</footer> diff --git a/templates/web/hounslow/main_nav_items.html b/templates/web/hounslow/main_nav_items.html index f333e08f3..053ca39e6 100644 --- a/templates/web/hounslow/main_nav_items.html +++ b/templates/web/hounslow/main_nav_items.html @@ -27,8 +27,8 @@ END; reports_uri = '/reports'; - IF body_name; - body_name = body_name | uri; + IF c.cobrand.council_area; + body_name = c.cobrand.council_area | uri; reports_uri = "${reports_uri}/${body_name}"; END; diff --git a/templates/web/hounslow/report/_council_sent_info.html b/templates/web/hounslow/report/_council_sent_info.html new file mode 100644 index 000000000..921f17f5f --- /dev/null +++ b/templates/web/hounslow/report/_council_sent_info.html @@ -0,0 +1,12 @@ +[% SET can_display_external_id = problem.external_id AND c.user_exists AND c.user.belongs_to_body(problem.bodies_str) %] +[% SET duration_clause = problem.duration_string(c) %] +[% IF duration_clause || can_display_external_id %] + <p class="council_sent_info"> + [% duration_clause %] + [%- IF can_display_external_id %] + [%- external_ref_clause = tprintf('Reference: %s', problem.external_id) %] + [%- IF duration_clause %]. [% END %] + <strong>[% external_ref_clause %].</strong> + [%- END %] + </p> +[% END %] diff --git a/templates/web/lincolnshire/footer.html b/templates/web/lincolnshire/footer.html deleted file mode 100644 index 69ab0b51e..000000000 --- a/templates/web/lincolnshire/footer.html +++ /dev/null @@ -1,23 +0,0 @@ - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area %] - </div> - </div> - </div> <!-- .wrapper --> - - [% IF pagefooter %] - <div> - <footer role="contentinfo"> - [% INCLUDE 'front/footer-marketing.html' %] - </footer> - </div> - [% END %] - - [% INCLUDE 'common_footer_tags.html' %] - -</body> -</html> diff --git a/templates/web/lincolnshire/front/footer-marketing.html b/templates/web/lincolnshire/front/footer-marketing.html deleted file mode 100644 index e69de29bb..000000000 --- a/templates/web/lincolnshire/front/footer-marketing.html +++ /dev/null diff --git a/templates/web/oxfordshire/footer.html b/templates/web/oxfordshire/footer.html index c9c02bb5d..c96c21d00 100644 --- a/templates/web/oxfordshire/footer.html +++ b/templates/web/oxfordshire/footer.html @@ -4,27 +4,11 @@ <div class="nav-wrapper"> <div class="container"> - <div id="main-nav" role="navigation"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area omit_wrapper=1 hide_privacy_link=1 %] - </div> + [% INCLUDE "main_nav.html" hide_privacy_link=1 %] </div> </div> </div> <!-- .wrapper --> - <footer class="occlss-page-footer" id="occlss-footer"> - <div class="occlss-wrapper occlss-page-footer__wraper"> - <div class="occlss-layout occlss-layout--gutter-s"> - <div class="occlss-layout__col s-cms-content-footer"> - <h4>Oxfordshire County Council</h4> - <p>County Hall, New Road, Oxford, OX1 1ND</p> - <p><a href="/privacy">Privacy and cookies</a></p> - </div> - </div> - </div> - </footer> - -</div> <!-- oxford-wrapper --> - [% INCLUDE 'common_footer_tags.html' %] </body> diff --git a/templates/web/oxfordshire/footer_extra.html b/templates/web/oxfordshire/footer_extra.html new file mode 100644 index 000000000..e8830fc95 --- /dev/null +++ b/templates/web/oxfordshire/footer_extra.html @@ -0,0 +1,13 @@ + <footer class="occlss-page-footer" id="occlss-footer"> + <div class="occlss-wrapper occlss-page-footer__wraper"> + <div class="occlss-layout occlss-layout--gutter-s"> + <div class="occlss-layout__col s-cms-content-footer"> + <h4>Oxfordshire County Council</h4> + <p>County Hall, New Road, Oxford, OX1 1ND</p> + <p><a href="/privacy">Privacy and cookies</a></p> + </div> + </div> + </div> + </footer> + +</div> <!-- oxford-wrapper --> diff --git a/templates/web/oxfordshire/main_nav_items.html b/templates/web/oxfordshire/main_nav_items.html index 6c45bd785..a57dd1aad 100644 --- a/templates/web/oxfordshire/main_nav_items.html +++ b/templates/web/oxfordshire/main_nav_items.html @@ -19,8 +19,8 @@ END; reports_uri = '/reports'; - IF body_name; - body_name = body_name | uri; + IF c.cobrand.council_area; + body_name = c.cobrand.council_area | uri; reports_uri = "${reports_uri}/${body_name}"; END; diff --git a/templates/web/rutland/front/footer-marketing.html b/templates/web/rutland/front/footer-marketing.html index f6418e54d..f6418e54d 100755..100644 --- a/templates/web/rutland/front/footer-marketing.html +++ b/templates/web/rutland/front/footer-marketing.html diff --git a/templates/web/stevenage/footer.html b/templates/web/stevenage/footer.html index 149ad171b..bf7608899 100644 --- a/templates/web/stevenage/footer.html +++ b/templates/web/stevenage/footer.html @@ -64,7 +64,7 @@ <div class="nav-wrapper"> <div class="container"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area hide_privacy_link=1 %] + [% INCLUDE "main_nav.html" hide_privacy_link=1 %] </div> </div> </div> diff --git a/templates/web/warwickshire/footer.html b/templates/web/warwickshire/footer.html deleted file mode 100644 index 6f4007781..000000000 --- a/templates/web/warwickshire/footer.html +++ /dev/null @@ -1,57 +0,0 @@ - </div>[%# close div.content %] - </div>[%# close div#mysociety %] - </div>[%# close div#wrapper.container.wrapper %] - - <footer> - <div class="container"> - <div class="row"> - <div class="span3"> - <aside class="widget widget_text" id="text-7"> - <div class="textwidget"> - <div style="text-align:center;padding-top:5px;"> - <img alt="" src="//www.warwickshire.gov.uk/wp-content/uploads/2014/08/WCC+logo.png" style="width:auto !important;"> - </div> - </div> - </aside> - </div> - <div class="span3"> - <aside class="widget widget_text" id="text-3"> - <div class="textwidget"> - <p><a href="//www.warwickshire.gov.uk/accessibility">Accessibility</a></p> - <p><a href="//www.warwickshire.gov.uk/help">Help using the website</a></p> - <p><a href="//www.warwickshire.gov.uk/disclaimer">Privacy and disclaimer</a></p> - <p><a href="//www.warwickshire.gov.uk/contactus">Contact us</a></p> - <p><a href="//www.warwickshire.gov.uk/az">A-Z of services</a></p> - </div> - </aside> - </div> - <div class="span2"> - <aside class="widget widget_text" id="text-4"> - <div class="textwidget"> - <p><a href="//www.warwickshire.gov.uk/socialnetworking">Social media</a></p> - <p><a href="//www.warwickshire.gov.uk/?page_id=976766">Services for...</a></p> - <p><a href="//www.warwickshire.gov.uk/customerservice">Customer service and complaints</a></p> - </div> - </aside> - </div> - <div class="span2"> - <aside class="widget widget_text" id="text-13"> - <div class="textwidget"> - <a href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"><img src="https://www.warwickshire.gov.uk/wp-content/uploads/2016/05/keep-me-posted-white-on-trans-155x39.png"></a> - </div> - </aside> - </div> - </div> - <div class="row"> - <div class="span4"></div> - <div class="span4" style="text-align:center;"> - <p>© Warwickshire County Council</p> - </div> - <div class="span4"></div> - </div> - </div> - </footer> - - [% INCLUDE 'common_footer_tags.html' %] - </body> -</html> diff --git a/templates/web/warwickshire/footer_extra.html b/templates/web/warwickshire/footer_extra.html new file mode 100644 index 000000000..a002676b8 --- /dev/null +++ b/templates/web/warwickshire/footer_extra.html @@ -0,0 +1,49 @@ +<footer> + <div class="container"> + <div class="row"> + <div class="span3"> + <aside class="widget widget_text" id="text-7"> + <div class="textwidget"> + <div style="text-align:center;padding-top:5px;"> + <img alt="" src="//www.warwickshire.gov.uk/wp-content/uploads/2014/08/WCC+logo.png" style="width:auto !important;"> + </div> + </div> + </aside> + </div> + <div class="span3"> + <aside class="widget widget_text" id="text-3"> + <div class="textwidget"> + <p><a href="//www.warwickshire.gov.uk/accessibility">Accessibility</a></p> + <p><a href="//www.warwickshire.gov.uk/help">Help using the website</a></p> + <p><a href="//www.warwickshire.gov.uk/disclaimer">Privacy and disclaimer</a></p> + <p><a href="//www.warwickshire.gov.uk/contactus">Contact us</a></p> + <p><a href="//www.warwickshire.gov.uk/az">A-Z of services</a></p> + </div> + </aside> + </div> + <div class="span2"> + <aside class="widget widget_text" id="text-4"> + <div class="textwidget"> + <p><a href="//www.warwickshire.gov.uk/socialnetworking">Social media</a></p> + <p><a href="//www.warwickshire.gov.uk/?page_id=976766">Services for...</a></p> + <p><a href="//www.warwickshire.gov.uk/customerservice">Customer service and complaints</a></p> + </div> + </aside> + </div> + <div class="span2"> + <aside class="widget widget_text" id="text-13"> + <div class="textwidget"> + <a href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"><img src="https://www.warwickshire.gov.uk/wp-content/uploads/2016/05/keep-me-posted-white-on-trans-155x39.png"></a> + </div> + </aside> + </div> + </div> + <div class="row"> + <div class="span4"></div> + <div class="span4" style="text-align:center;"> + <p>© Warwickshire County Council</p> + </div> + <div class="span4"></div> + </div> + </div> +</footer> diff --git a/templates/web/warwickshire/header.html b/templates/web/warwickshire/header.html index 5470d401a..08e849947 100644 --- a/templates/web/warwickshire/header.html +++ b/templates/web/warwickshire/header.html @@ -46,7 +46,7 @@ [% INCLUDE 'warwickshire_masthead.html' %] - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area hide_all_reports_link=1 ul_class='container' %] + [% INCLUDE "main_nav.html" hide_all_reports_link=1 ul_class='container' %] <div id="wrapper" class="container wrapper"> <div id="mysociety"> diff --git a/web/cobrands/northamptonshire/assets.js b/web/cobrands/northamptonshire/assets.js index cae4c26a5..fe726a1a8 100644 --- a/web/cobrands/northamptonshire/assets.js +++ b/web/cobrands/northamptonshire/assets.js @@ -291,7 +291,24 @@ var layers = [ "Signal Head Failure", "Request Timing Review", "Damaged Control box", - "Signal Failure/Damaged - Toucan/Pelican", + "Signal Failure/Damaged - Toucan/Pelican" + ], + "item_name": "signal or crossing", + "layer_name": "Midblock", + "layer": 223, + "version": "223.2-" +}, +{ + "categories": [ + "Damaged/Exposed Wiring / Vandalised", + "Lamp/Bulb Failure", + "Signal Failure", + "Signal Failure all out", + "Signal Stuck", + "Signal Head Failure", + "Request Timing Review", + "Damaged Control box", + "Signal Failure/Damaged - Toucan/Pelican" ], "item_name": "signal or crossing", "layer_name": "TL Junction", @@ -300,7 +317,7 @@ var layers = [ }, { "categories": [ - "Fallen Tree", + "Fallen Tree" ], "layer_name": "Tree", "layer": is_live ? 307 : 228, @@ -431,7 +448,7 @@ fixmystreet.assets.add(northants_road_defaults, { asset_item: 'speed hump', asset_type: "area", asset_category: [ - "Damaged Speed Humps", + "Damaged Speed Humps" ] }); @@ -454,7 +471,7 @@ fixmystreet.assets.add(northants_road_defaults, { asset_item: 'pedestrian barrier', asset_type: 'area', asset_category: [ - "Pedestrian Barriers - Damaged / Missing", + "Pedestrian Barriers - Damaged / Missing" ] }); @@ -501,7 +518,7 @@ fixmystreet.assets.add(northants_road_defaults, { "Icy Road", "Missed published Gritted Route", "Restricted Visibility / Overgrown / Overhanging", - "Restricted Visibility", + "Restricted Visibility" ] }); |