diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Northamptonshire.pm | 13 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 10 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 2 | ||||
-rw-r--r-- | t/cobrand/northamptonshire.t | 26 | ||||
-rw-r--r-- | web/cobrands/peterborough/base.scss | 14 | ||||
-rw-r--r-- | web/cobrands/tfl/_colours.scss | 3 | ||||
-rw-r--r-- | web/cobrands/tfl/base.scss | 4 |
8 files changed, 49 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c237355d3..7a500d688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Add lazy image loading on list items. - Improve Bing geocoder results. - Add option of checking passwords against Have I Been Pwned. + - Add aerial maps option to Bing maps. - Changes: - Mark user as active when sent an email alert. - Bugfixes: diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm index 791e2f83f..26c8706cc 100644 --- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm +++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm @@ -75,6 +75,19 @@ sub problems_on_map_restriction { return $self->problems_restriction($rs); } +sub problem_state_processed { + my ($self, $comment) = @_; + + my $state = $comment->problem_state || ''; + my $code = $comment->get_extra_metadata('external_status_code') || ''; + + if ( $state eq 'investigating' and $code eq 'further' ) { + $state = 'Under further investigation'; + } + + return $state; +} + 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/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index b217bf96c..68e267d00 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -265,16 +265,18 @@ sub meta_line { }; sub problem_state_processed { - my $self = shift; + my ( $self, $c ) = @_; return 'fixed - user' if $self->mark_fixed; return 'confirmed' if $self->mark_open; - return $self->problem_state; + my $cobrand_state = $c->cobrand->call_hook(problem_state_processed => $self); + + return $cobrand_state || $self->problem_state; } sub problem_state_display { my ( $self, $c ) = @_; - my $state = $self->problem_state_processed; + my $state = $self->problem_state_processed($c); return '' unless $state; my $cobrand_name = $c->cobrand->moniker; @@ -323,7 +325,7 @@ sub as_hashref { created => $self->created, }; - $out->{problem_state} = $self->problem_state_processed; + $out->{problem_state} = $self->problem_state_processed($c); $out->{photos} = [ map { $_->{url} } @{$self->photos} ] if !$cols || $cols->{photos}; diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index e8e840ef5..5c4407094 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -47,7 +47,7 @@ sub send { push @$extra, @$include if $include; if ($exclude) { $exclude = join('|', @$exclude); - @$extra = grep { $_->{name} !~ /$exclude/ } @$extra; + @$extra = grep { $_->{name} !~ /$exclude/i } @$extra; } my $id_field = $contact->id_field; diff --git a/t/cobrand/northamptonshire.t b/t/cobrand/northamptonshire.t index 57fe319a9..11b22bdb0 100644 --- a/t/cobrand/northamptonshire.t +++ b/t/cobrand/northamptonshire.t @@ -107,6 +107,32 @@ subtest 'check updates disallowed correctly' => sub { is $cobrand->updates_disallowed($report), 1; }; +subtest 'check further investigation state' => sub { + $comment->problem_state('investigating'); + $comment->update(); + + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ { northamptonshire => '.' } ], + MAPIT_URL => 'http://mapit.uk/', + }, sub { + $mech->get_ok('/report/' . $comment->problem_id); + }; + + $mech->content_lacks('Under further investigation'); + + $comment->set_extra_metadata('external_status_code' => 'further'); + $comment->update; + + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ { northamptonshire => '.' } ], + MAPIT_URL => 'http://mapit.uk/', + }, sub { + $mech->get_ok('/report/' . $comment->problem_id); + }; + + $mech->content_contains('Under further investigation'); +}; + subtest 'check pin colour / reference shown' => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => 'northamptonshire', diff --git a/web/cobrands/peterborough/base.scss b/web/cobrands/peterborough/base.scss index 32d883132..9039cfd87 100644 --- a/web/cobrands/peterborough/base.scss +++ b/web/cobrands/peterborough/base.scss @@ -78,20 +78,6 @@ h1, h2 { font-weight: 700; } -a, -.fake-link { - color: $link-color; - - &:visited { - color: $link-visited-color; - } - - &:hover, - &:active { - color: $link-hover-color; - } -} - .dz-clickable .dz-message u { color: $link-color; } diff --git a/web/cobrands/tfl/_colours.scss b/web/cobrands/tfl/_colours.scss index 1cffc3f55..b175dcd26 100644 --- a/web/cobrands/tfl/_colours.scss +++ b/web/cobrands/tfl/_colours.scss @@ -33,6 +33,7 @@ $primary_b: $johnston-black; $primary_text: $johnston-black; $link-color: $beck-blue; +$link-text-decoration: 'underline'; $link-hover-color: $blue-dark; $base_bg: $white; @@ -73,4 +74,4 @@ $header-top-border: false; background-color: $white; box-shadow: none; padding: 0.4em; -}
\ No newline at end of file +} diff --git a/web/cobrands/tfl/base.scss b/web/cobrands/tfl/base.scss index 43ac90612..2625596d5 100644 --- a/web/cobrands/tfl/base.scss +++ b/web/cobrands/tfl/base.scss @@ -55,10 +55,6 @@ h3 { line-height: 1.238095238em; //26px } -a, .fake-link { - text-decoration: underline; -} - .btn--primary, .btn, .green-btn { |