aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm1
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm61
-rw-r--r--perllib/FixMyStreet/App/Controller/Tokens.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Angus.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm25
-rw-r--r--perllib/FixMyStreet/Cobrand/EastSussex.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Greenwich.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Harrogate.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Stevenage.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm58
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm7
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm27
-rw-r--r--perllib/FixMyStreet/Map.pm4
-rw-r--r--t/app/controller/report_new.t45
-rw-r--r--templates/email/default/problem-confirm.txt5
-rw-r--r--templates/web/base/maps/noscript_map.html2
-rw-r--r--templates/web/base/report/_item.html23
-rw-r--r--templates/web/base/report/_main.html3
-rw-r--r--templates/web/base/report/_report_meta_info.html2
-rw-r--r--templates/web/base/tokens/confirm_problem.html17
-rw-r--r--templates/web/fixmystreet.com/report/_report_meta_info.html5
-rw-r--r--templates/web/hart/tokens/confirm_problem.html19
-rw-r--r--templates/web/oxfordshire/reports/_list-entry.html1
25 files changed, 251 insertions, 79 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index b8f038ce3..f8ea84d08 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -195,6 +195,7 @@ sub display_location : Private {
colour => $colour,
id => $p->id,
title => $p->title_safe,
+ problem => $p,
}
} @$on_map_all, @$around_map;
}
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index c4a2162a8..e81dc719f 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -143,22 +143,11 @@ sub report_new_ajax : Path('mobile') : Args(0) {
$c->forward('save_user_and_report');
my $report = $c->stash->{report};
- my $data = $c->stash->{token_data} || {};
- my $token = $c->model("DB::Token")->create( {
- scope => 'problem',
- data => {
- %$data,
- id => $report->id
- }
- } );
if ( $report->confirmed ) {
$c->forward( 'create_reporter_alert' );
$c->stash->{ json_response } = { success => 1, report => $report->id };
} else {
- $c->stash->{token_url} = $c->uri_for_email( '/P', $token->token );
- $c->send_email( 'problem-confirm.txt', {
- to => [ $report->name ? [ $report->user->email, $report->name ] : $report->user->email ],
- } );
+ $c->forward( 'send_problem_confirm_email' );
$c->stash->{ json_response } = { success => 1 };
}
@@ -1021,6 +1010,31 @@ sub tokenize_user : Private {
if $c->get_param('oauth_need_email') && $c->session->{oauth}{twitter_id};
}
+sub send_problem_confirm_email : Private {
+ my ( $self, $c ) = @_;
+ my $data = $c->stash->{token_data} || {};
+ my $report = $c->stash->{report};
+ my $token = $c->model("DB::Token")->create( {
+ scope => 'problem',
+ data => {
+ %$data,
+ id => $report->id
+ }
+ } );
+
+ my $template = 'problem-confirm.txt';
+ $template = 'problem-confirm-not-sending.txt' unless $report->bodies_str;
+
+ $c->stash->{token_url} = $c->uri_for_email( '/P', $token->token );
+ if ($c->cobrand->can('problem_confirm_email_extras')) {
+ $c->cobrand->problem_confirm_email_extras($report);
+ }
+
+ $c->send_email( $template, {
+ to => [ $report->name ? [ $report->user->email, $report->name ] : $report->user->email ],
+ } );
+}
+
=head2 save_user_and_report
Save the user and the report.
@@ -1178,30 +1192,13 @@ sub redirect_or_confirm_creation : Private {
return 1;
}
- my $template = 'problem-confirm.txt';
- $template = 'problem-confirm-not-sending.txt' unless $report->bodies_str;
-
- # otherwise create a confirm token and email it to them.
- my $data = $c->stash->{token_data} || {};
- my $token = $c->model("DB::Token")->create( {
- scope => 'problem',
- data => {
- %$data,
- id => $report->id
- }
- } );
- $c->stash->{token_url} = $c->uri_for_email( '/P', $token->token );
- if ($c->cobrand->can('problem_confirm_email_extras')) {
- $c->cobrand->problem_confirm_email_extras($report);
- }
- $c->send_email( $template, {
- to => [ $report->name ? [ $report->user->email, $report->name ] : $report->user->email ],
- } );
+ # otherwise email a confirm token to them.
+ $c->forward( 'send_problem_confirm_email' );
# tell user that they've been sent an email
$c->stash->{template} = 'email_sent.html';
$c->stash->{email_type} = 'problem';
- $c->log->info($report->user->id . ' created ' . $report->id . ', email sent, ' . ($data->{password} ? 'password set' : 'password not set'));
+ $c->log->info($report->user->id . ' created ' . $report->id . ', email sent, ' . ($c->stash->{token_data}->{password} ? 'password set' : 'password not set'));
}
sub create_reporter_alert : Private {
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm
index 38f344250..da017c57f 100644
--- a/perllib/FixMyStreet/App/Controller/Tokens.pm
+++ b/perllib/FixMyStreet/App/Controller/Tokens.pm
@@ -32,7 +32,7 @@ sub confirm_problem : Path('/P') {
$c->stash->{report} = {
id => 123,
title => 'Title of Report',
- bodies_str => 'True',
+ bodies_str => '1',
url => '/report/123',
service => $c->get_param('service'),
};
@@ -195,7 +195,7 @@ sub confirm_update : Path('/C') {
$c->stash->{problem} = {
id => 123,
title => 'Title of Report',
- bodies_str => 'True',
+ bodies_str => '1',
url => '/report/123',
};
return;
diff --git a/perllib/FixMyStreet/Cobrand/Angus.pm b/perllib/FixMyStreet/Cobrand/Angus.pm
index 23d0d2c58..0361c2d11 100644
--- a/perllib/FixMyStreet/Cobrand/Angus.pm
+++ b/perllib/FixMyStreet/Cobrand/Angus.pm
@@ -10,7 +10,8 @@ sub council_name { return 'Angus Council'; }
sub council_url { return 'angus'; }
sub base_url {
- return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
return 'https://fix.angus.gov.uk';
}
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index c9f9a98be..2d0cb86f1 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -10,7 +10,8 @@ sub council_name { return 'Bromley Council'; }
sub council_url { return 'bromley'; }
sub base_url {
- return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
return 'https://fix.bromley.gov.uk';
}
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 65c97f38b..36313cf63 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -74,6 +74,18 @@ sub problems {
return $self->problems_restriction($self->{c}->model('DB::Problem'));
}
+=head1 problems_on_map
+
+Returns a ResultSet of Problems to be shown on the /around map, potentially
+restricted to a subset if we're on a cobrand that only wants some of the data.
+
+=cut
+
+sub problems_on_map {
+ my $self = shift;
+ return $self->problems_on_map_restriction($self->{c}->model('DB::Problem'));
+}
+
=head1 updates
Returns a ResultSet of Comments, potentially restricted to a subset if we're on
@@ -115,6 +127,19 @@ sub categories_restriction {
return $rs;
}
+
+=head1 problems_on_map_restriction
+
+Used to restricts reports shown on the /around map in a cobrand in a particular way. Do
+nothing by default.
+
+=cut
+
+sub problems_on_map_restriction {
+ my ($self, $rs) = @_;
+ return $rs;
+}
+
sub site_key { return 0; }
=head2 restriction
diff --git a/perllib/FixMyStreet/Cobrand/EastSussex.pm b/perllib/FixMyStreet/Cobrand/EastSussex.pm
index 2ba3a4f70..80a86706a 100644
--- a/perllib/FixMyStreet/Cobrand/EastSussex.pm
+++ b/perllib/FixMyStreet/Cobrand/EastSussex.pm
@@ -113,6 +113,8 @@ sub reports_per_page { return 20; }
sub pin_colour {
my ( $self, $p, $context ) = @_;
+ return 'grey' unless $self->owns_problem( $p );
+
# TODO refactor to a Moo(se)? lazy attribute
my $open_states = $self->{open_states} ||= $p->open_states;
diff --git a/perllib/FixMyStreet/Cobrand/Greenwich.pm b/perllib/FixMyStreet/Cobrand/Greenwich.pm
index d23e62138..7777079a9 100644
--- a/perllib/FixMyStreet/Cobrand/Greenwich.pm
+++ b/perllib/FixMyStreet/Cobrand/Greenwich.pm
@@ -10,7 +10,8 @@ sub council_name { return 'Royal Borough of Greenwich'; }
sub council_url { return 'greenwich'; }
sub base_url {
- return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
return 'https://fix.royalgreenwich.gov.uk';
}
diff --git a/perllib/FixMyStreet/Cobrand/Harrogate.pm b/perllib/FixMyStreet/Cobrand/Harrogate.pm
index 519521867..8f4a6e2ea 100644
--- a/perllib/FixMyStreet/Cobrand/Harrogate.pm
+++ b/perllib/FixMyStreet/Cobrand/Harrogate.pm
@@ -12,7 +12,8 @@ sub council_url { return 'harrogate'; }
sub is_two_tier { return 1; } # with North Yorkshire CC 2235
sub base_url {
- return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
return 'http://fix.harrogate.gov.uk';
}
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index 39fe95405..d127f5e13 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -11,7 +11,8 @@ sub council_url { return 'oxfordshire'; }
sub is_two_tier { return 1; }
sub base_url {
- return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
return 'https://fixmystreet.oxfordshire.gov.uk';
}
@@ -97,6 +98,7 @@ sub reports_ordering {
sub pin_colour {
my ( $self, $p, $context ) = @_;
+ return 'grey' unless $self->owns_problem( $p );
return 'grey' if $p->state eq 'not responsible';
return 'green' if $p->is_fixed || $p->is_closed;
return 'red' if $p->state eq 'confirmed';
diff --git a/perllib/FixMyStreet/Cobrand/Stevenage.pm b/perllib/FixMyStreet/Cobrand/Stevenage.pm
index 1f90e0498..2c305d326 100644
--- a/perllib/FixMyStreet/Cobrand/Stevenage.pm
+++ b/perllib/FixMyStreet/Cobrand/Stevenage.pm
@@ -11,7 +11,8 @@ sub council_url { return 'stevenage'; }
sub is_two_tier { return 1; }
sub base_url {
- return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ my $self = shift;
+ return $self->next::method() if FixMyStreet->config('STAGING_SITE');
return 'http://fixmystreet.stevenage.gov.uk';
}
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index 0eff48b00..e60b673b4 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -336,5 +336,61 @@ sub report_check_for_errors {
return %errors;
}
-1;
+=head2 get_body_handler_for_problem
+
+Returns a cobrand for the body that a problem was logged against.
+
+ my $handler = $cobrand->get_body_handler_for_problem($row);
+ my $handler = $cobrand_class->get_body_handler_for_problem($row);
+
+If the UK council in bodies_str has a FMS.com cobrand then an instance of that
+cobrand class is returned, otherwise the default FixMyStreet cobrand is used.
+
+=cut
+
+sub get_body_handler_for_problem {
+ my ($self, $row) = @_;
+
+ my @bodies = values %{$row->bodies};
+ my %areas = map { %{$_->areas} } @bodies;
+
+ foreach my $avail ( FixMyStreet::Cobrand->available_cobrand_classes ) {
+ my $class = FixMyStreet::Cobrand->get_class_for_moniker($avail->{moniker});
+ my $cobrand = $class->new({});
+ next unless $cobrand->can('council_id');
+ return $cobrand if $areas{$cobrand->council_id};
+ }
+ return ref $self ? $self : $self->new;
+}
+
+=head2 link_to_council_cobrand
+
+If a problem was sent to a UK council who has a FMS cobrand and the report is
+currently being viewed on a different cobrand, then link the council's name to
+that problem on the council's cobrand.
+
+=cut
+
+sub link_to_council_cobrand {
+ my ( $self, $problem ) = @_;
+ # If the report was sent to a cobrand that we're not currently on,
+ # include a link to view it on the responsible cobrand.
+ # This only occurs if the report was sent to a single body and we're not already
+ # using the body name as a link to all problem reports.
+ my $handler = $self->get_body_handler_for_problem($problem);
+ $self->{c}->log->debug( sprintf "bodies: %s areas: %s self: %s handler: %s", $problem->bodies_str, $problem->areas, $self->moniker, $handler->moniker );
+ my $bodies_str_ids = $problem->bodies_str_ids;
+ if ( !mySociety::Config::get('AREA_LINKS_FROM_PROBLEMS') &&
+ scalar(@$bodies_str_ids) == 1 && $handler->is_council &&
+ $handler->moniker ne $self->{c}->cobrand->moniker
+ ) {
+ my $url = sprintf("%s%s", $handler->base_url, $problem->url);
+ return sprintf("<a href='%s'>%s</a>", $url, $problem->body( $self->{c} ));
+ } else {
+ return $problem->body( $self->{c} );
+ }
+}
+
+
+1;
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index 6bf70e091..6e98f4ae0 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -129,6 +129,13 @@ sub owns_problem {
return $areas{$self->council_id} ? 1 : undef;
}
+# If the council is two-tier then show pins for the other council as grey
+sub pin_colour {
+ my ( $self, $p, $context ) = @_;
+ return 'grey' if $self->is_two_tier && !$self->owns_problem( $p );
+ return $self->next::method($p, $context);
+}
+
# If we ever link to a county problem report, needs to be to main FixMyStreet
sub base_url_for_report {
my ( $self, $report ) = @_;
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index a2167032a..bc72cf9da 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -658,7 +658,12 @@ sub can_display_external_id {
sub duration_string {
my ( $problem, $c ) = @_;
- my $body = $problem->body( $c );
+ my $body;
+ if ( $c->cobrand->can('link_to_council_cobrand') ) {
+ $body = $c->cobrand->link_to_council_cobrand($problem);
+ } else {
+ $body = $problem->body( $c );
+ }
return sprintf(_('Sent to %s %s later'), $body,
Utils::prettify_duration($problem->whensent->epoch - $problem->confirmed->epoch, 'minute')
);
@@ -868,4 +873,24 @@ sub get_time_spent {
return $admin_logs ? $admin_logs->get_column('sum_time_spent') : 0;
}
+=head2 get_cobrand_logged
+
+Get a cobrand object for the cobrand the problem was logged for.
+
+e.g. if a problem was logged at www.fixmystreet.com, this will be a
+FixMyStreet::Cobrand::FixMyStreet object.
+
+=cut
+
+has get_cobrand_logged => (
+ is => 'ro',
+ lazy => 1,
+ default => sub {
+ my $self = shift;
+ my $cobrand_class = FixMyStreet::Cobrand->get_class_for_moniker( $self->cobrand );
+ return $cobrand_class->new;
+ },
+);
+
+
1;
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index 6d641331f..b8b128611 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -100,9 +100,9 @@ sub _map_features {
my $around_limit = $c->cobrand->on_map_list_limit || undef;
my @around_args = ( $min_lat, $max_lat, $min_lon, $max_lon, $interval );
- my $around_map = $c->cobrand->problems->around_map( @around_args, undef, $category, $states );
+ my $around_map = $c->cobrand->problems_on_map->around_map( @around_args, undef, $category, $states );
my $around_map_list = $around_limit
- ? $c->cobrand->problems->around_map( @around_args, $around_limit, $category, $states )
+ ? $c->cobrand->problems_on_map->around_map( @around_args, $around_limit, $category, $states )
: $around_map;
my $dist = FixMyStreet::Gaze::get_radius_containing_population( $lat, $lon );
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index ba550193e..9b10de2bf 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -1320,6 +1320,13 @@ subtest "test Hart" => sub {
ok $email, "got an email";
like $email->body, qr/to confirm that you want to send your/i, "confirm the problem";
+ # does it reference the fact that this report hasn't been sent to Hart?
+ if ( $test->{national} ) {
+ like $email->body, qr/Hart Council is not responsible for this type/i, "mentions report hasn't gone to Hart";
+ } else {
+ unlike $email->body, qr/Hart Council is not responsible for this type/i, "doesn't mention report hasn't gone to Hart";
+ }
+
my ($url) = $email->body =~ m{(http://\S+)};
ok $url, "extracted confirm url '$url'";
@@ -1542,6 +1549,44 @@ subtest "unresponsive body handling works" => sub {
like $email->body, qr/despite not being sent/i, "correct email sent";
$user->problems->delete;
+ $mech->clear_emails_ok;
+
+ # Make sure the same behaviour occurs for reports from the mobile app
+ $mech->log_out_ok;
+ $mech->post_ok( '/report/new/mobile', {
+ title => "Test Report at café",
+ detail => 'Test report details.',
+ photo1 => '',
+ name => 'Joe Bloggs',
+ email => $test_email,
+ may_show_name => '1',
+ phone => '07903 123 456',
+ category => 'Trees',
+ service => 'iOS',
+ lat => 55.9,
+ lon => -3.2,
+ pc => '',
+ used_map => '1',
+ submit_register => '1',
+ password_register => '',
+ });
+ my $res = $mech->response;
+ ok $res->header('Content-Type') =~ m{^application/json\b}, 'response should be json';
+
+ $user = FixMyStreet::App->model('DB::User')->find( { email => $test_email } );
+ ok $user, "test user does exist";
+
+ $report = $user->problems->first;
+ ok $report, "Found the report";
+ is $report->bodies_str, undef, "Report not going anywhere";
+
+ $email = $mech->get_email;
+ ok $email, "got an email";
+ like $email->body, qr/despite not being sent/i, "correct email sent";
+
+ $user->problems->delete;
+ $mech->clear_emails_ok;
+
$contact1->body->update( { send_method => $old_send } );
# And test per-category refusing
diff --git a/templates/email/default/problem-confirm.txt b/templates/email/default/problem-confirm.txt
index ab4870bb1..de671a284 100644
--- a/templates/email/default/problem-confirm.txt
+++ b/templates/email/default/problem-confirm.txt
@@ -10,7 +10,10 @@ website:
If your email program does not let you click on this link, copy and paste it
into your web browser and press return.
-
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+Please note that [% c.cobrand.council_name %] is not responsible for this type
+of problem, so it will instead be sent to [% report.body %].
+[% END %]
Your problem had the title:
[% report.title %]
diff --git a/templates/web/base/maps/noscript_map.html b/templates/web/base/maps/noscript_map.html
index bce562a59..f35f152e8 100644
--- a/templates/web/base/maps/noscript_map.html
+++ b/templates/web/base/maps/noscript_map.html
@@ -54,7 +54,7 @@
[% BLOCK pin %]
[% IF pin.id %]
-<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]">
+<a title="[% pin.title | html %]" href="[% c.cobrand.base_url_for_report( pin.problem ) %][% pin.problem.url %]">
[%- END -%]
<img border="0" class="pin" src="[% start %][% c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png' %]"
alt="[% loc('Problem') %]" style="top:[% pin.py - 64 %]px; left:[% pin.px - 24 %]px; position: absolute;">
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index 704dfd29c..5894c5d81 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -1,5 +1,5 @@
<li class="item-list__item item-list--reports__item [% item_extra_class %]">
-<a href="[% c.uri_for('/report', problem.id ) %]">
+<a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">
[% IF problem.photo %]
<img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
[% END %]
@@ -14,15 +14,18 @@
[%- IF problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %],
[% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %]
[%- END %]
- [% IF include_sentinfo %]
- [% IF problem.bodies_str_ids.size > 1 %] [% loc('(sent to both)') %]
- [% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %]
+ [% IF include_sentinfo %]
+ [% IF c.cobrand.is_council && !c.cobrand.owns_problem( problem ) %]
+ (sent to [% problem.body %])
+ [% ELSIF problem.bodies_str_ids.size > 1 %] [% loc('(sent to both)') %]
+ [% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %]
+ [% END %]
[% END %]
- [% END %]
- [% IF NOT no_fixed AND problem.is_fixed %]
- [% loc('(fixed)') %]
- [% ELSIF NOT no_fixed AND problem.is_closed %]
- [% loc('(closed)') %]
- [% END %]</small>
+ [% IF NOT no_fixed AND problem.is_fixed %]
+ [% loc('(fixed)') %]
+ [% ELSIF NOT no_fixed AND problem.is_closed %]
+ [% loc('(closed)') %]
+ [% END %]
+ </small>
</a>
</li>
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html
index 4821b3fa0..1eb6f809e 100644
--- a/templates/web/base/report/_main.html
+++ b/templates/web/base/report/_main.html
@@ -32,8 +32,7 @@
</label>
</div>
<p class="report_meta_info">
- [% problem.meta_line(c) | html %]
- [%- IF !problem.used_map %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %]
+ [% INCLUDE 'report/_report_meta_info.html' %]
</p>
[% INCLUDE 'report/_main_sent_info.html' %]
diff --git a/templates/web/base/report/_report_meta_info.html b/templates/web/base/report/_report_meta_info.html
new file mode 100644
index 000000000..da7339c81
--- /dev/null
+++ b/templates/web/base/report/_report_meta_info.html
@@ -0,0 +1,2 @@
+[% problem.meta_line(c) | html %]
+[%- IF !problem.used_map %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %]
diff --git a/templates/web/base/tokens/confirm_problem.html b/templates/web/base/tokens/confirm_problem.html
index 5892d0f9e..a4573b5e6 100644
--- a/templates/web/base/tokens/confirm_problem.html
+++ b/templates/web/base/tokens/confirm_problem.html
@@ -5,8 +5,21 @@
<h1><a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">[% report.title %]</a></h1>
[% IF c.cobrand.is_council %]
- <h2>Your issue is on its way to the council.</h2>
- <p>Your reference for this report is [% report.id %], please quote it in any enquiries.</p>
+ [% IF c.cobrand.owns_problem( report ) %]
+ <h2>Your issue is on its way to the council.</h2>
+ <p>Your reference for this report is [% report.id %], please quote it in any enquiries.</p>
+ [% ELSE %]
+ <h2>Thank you for your report.</h2>
+ <p>
+ We don&rsquo;t handle this type of problem, so have passed it on to:
+ </p>
+ <p>
+ <b>[% report.body %]</b>
+ </p>
+ <p>
+ You can follow this problem on <a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">FixMyStreet.com</a>.
+ </p>
+ [% END %]
[% ELSE %]
<h2>[% loc('Thank you for reporting this issue!') %]</h2>
diff --git a/templates/web/fixmystreet.com/report/_report_meta_info.html b/templates/web/fixmystreet.com/report/_report_meta_info.html
new file mode 100644
index 000000000..da0912a3f
--- /dev/null
+++ b/templates/web/fixmystreet.com/report/_report_meta_info.html
@@ -0,0 +1,5 @@
+[% problem.meta_line(c) | html %]
+[% IF c.cobrand.moniker != problem.get_cobrand_logged.moniker AND problem.get_cobrand_logged.is_council %]
+ using <a href="https://www.fixmystreet.com/about/council">FixMyStreet for Councils</a>
+[% END %]
+[%- IF !problem.used_map %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %]
diff --git a/templates/web/hart/tokens/confirm_problem.html b/templates/web/hart/tokens/confirm_problem.html
deleted file mode 100644
index 68223e92b..000000000
--- a/templates/web/hart/tokens/confirm_problem.html
+++ /dev/null
@@ -1,19 +0,0 @@
-[% INCLUDE 'header.html', title = loc('Confirmation') %]
-
-<h1>[% loc('Confirmation') %]</h1>
-
-<p class="confirmed">
-Thank you. You have successfully confirmed your report
-[% IF c.cobrand.owns_problem( report ) %]
-and this will now be investigated by the council.
-You can <a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]">view the report on this site</a>.
-[% ELSE %]
-and this has now been passed on to [%# TODO make this generic %] <b>Hampshire County Council</b> to investigate.
-Note that Hart District Council is not responsible for this type of problem. However you can continue to view your report on the <a href="[% c.cobrand.base_url_for_report( report ) %][% report.url %]"><i>fixmystreet.com</i> website</a>.
-[% END %]
-</p>
-
-<p>Your reference for this report is [% report.id %], please quote it in any enquiries.
-</p>
-
-[% INCLUDE 'footer.html' %]
diff --git a/templates/web/oxfordshire/reports/_list-entry.html b/templates/web/oxfordshire/reports/_list-entry.html
index 43d3d6265..76b135665 100644
--- a/templates/web/oxfordshire/reports/_list-entry.html
+++ b/templates/web/oxfordshire/reports/_list-entry.html
@@ -1,4 +1,5 @@
[% INCLUDE 'report/_item.html'
no_fixed = 1
+ include_sentinfo = 1
item_extra_class = 'item-list__item--with-pin ' _ c.cobrand.pin_colour(problem)
%]