Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.html #4935

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions perllib/FixMyStreet/Cobrand/Bexley/Waste.pm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ sub bin_services_for_address {
if ( my $id = $frequency_types{fortnightly} ) {
$id = 'Wk-' . $id;
my $links = $self->{c}->cobrand->feature('waste_calendar_links');
$self->{c}->stash->{calendar_link} = $links->{$id};
$self->{c}->stash->{calendar_link} = [
{ href => $links->{$id},
text => 'View and download collection calendar',
}
];
}

@site_services_filtered = $self->_remove_service_if_assisted_exists(@site_services_filtered);
Expand Down Expand Up @@ -546,7 +550,7 @@ sub image_for_unit {
return '/i/waste-containers/bexley/' . $images->{$service_id};
}

sub bin_day_format { '%A, %-d~~~ %B %Y' }
sub bin_day_format { '%A %-d %B %Y' }

# TODO This logic is copypasted across multiple files; get it into one place
my %irregulars = ( 1 => 'st', 2 => 'nd', 3 => 'rd', 11 => 'th', 12 => 'th', 13 => 'th');
Expand All @@ -571,6 +575,10 @@ For:
HTML

return {
'CW-SACK' => {
name => 'Clinical Waste Sack(s)',
description => 'Clinical waste',
},
'FO-140' => {
name => 'Communal Food Bin',
description => 'Food waste',
Expand Down Expand Up @@ -750,7 +758,7 @@ HTML
description => 'Non-recyclable waste',
},
'RES-SACK' => {
name => 'Rubbish collection',
name => 'Black Sack(s)',
description => 'Non-recyclable waste',
},
};
Expand Down
2 changes: 1 addition & 1 deletion perllib/FixMyStreet/Script/Alerts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ sub _send_aggregated_alert(%) {
if (@template_data) {
my %template_data = %data;
$template_data{data} = [@template_data];
$template_data{template} = 'templated_email_alert-update';
$template_data{private_email} = 1;
trigger_alert_sending($alert_by, $token, %template_data);
};

Expand Down
43 changes: 18 additions & 25 deletions t/app/controller/waste_bexley.t
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,9 @@ FixMyStreet::override_config {
%defaults,
},
{ id => 6,
service_id => 'MDR-SACK',
service_name => 'Clear Sack(s)',
service_description => 'For:
<ul>
<li>paper and cardboard</li>
<li>plastic bottles</li>
<li>glass bottles and jars</li>
<li>food and drinks cans</li>
</ul>
',
service_id => 'RES-CHAM',
service_name => 'Communal Refuse Bin(s)',
service_description => 'Non-recyclable waste',
round_schedule => 'RND-6 Wed Wk 2',
round => 'RND-6',
report_allowed => 1,
Expand Down Expand Up @@ -346,17 +339,17 @@ FixMyStreet::override_config {
my $mech = shift;

$mech->content_contains('Communal Food Bin');
$mech->content_contains('Tuesday, 30th April 2024');
$mech->content_contains('Tuesday 30 April 2024');
$mech->content_lacks('Brown Caddy');
$mech->content_lacks('Green Recycling Bin');
$mech->content_lacks('Black Recycling Box');
$mech->content_contains('Clear Sack(s)');
$mech->content_contains('Wednesday, 1st May 2024');
$mech->content_contains('Communal Refuse Bin(s)');
$mech->content_contains('Wednesday 1 May 2024');
$mech->content_lacks('Blue Lidded Wheelie Bin');
$mech->content_contains('Blue Recycling Box');
$mech->content_contains('Monday, 1st April 2024');
$mech->content_contains('Monday 1 April 2024');
$mech->content_contains('Green Recycling Box');
$mech->content_contains('Monday, 1st April 2024');
$mech->content_contains('Monday 1 April 2024');
}

subtest 'Checking calendar' => sub {
Expand All @@ -374,7 +367,7 @@ FixMyStreet::override_config {
$i++ if /DTSTART;VALUE=DATE:20240401/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240401/ && /SUMMARY:Green Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240402/ && /SUMMARY:Communal Food Bin/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Communal Refuse Bin\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Green Recycling Box/;

Expand All @@ -386,16 +379,16 @@ FixMyStreet::override_config {
$i++ if /DTSTART;VALUE=DATE:20240415/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240415/ && /SUMMARY:Green Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240416/ && /SUMMARY:Communal Food Bin/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Communal Refuse Bin\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Green Recycling Box/;

$i++ if /DTSTART;VALUE=DATE:20240501/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240501/ && /SUMMARY:Communal Refuse Bin\(s\)/;

$i++ if /DTSTART;VALUE=DATE:20240506/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240506/ && /SUMMARY:Green Recycling Box/;

$i++ if /DTSTART;VALUE=DATE:20240515/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240515/ && /SUMMARY:Communal Refuse Bin\(s\)/;
}
is $i, $expected_num, 'Correct events in the calendar';
};
Expand All @@ -409,7 +402,7 @@ FixMyStreet::override_config {
"Your rotation schedule is Week $test->{link}",
'Correct rotation schedule displayed',
);
$mech->content_contains('<li><a target="_blank" href="PDF '. $test->{link} . '">Download PDF waste calendar', 'PDF link ' . $test->{link} . ' shown');
$mech->content_contains('<li><a target="_blank" href="PDF '. $test->{link} . '">View and download collection calendar', 'PDF link ' . $test->{link} . ' shown');
}
};

Expand Down Expand Up @@ -440,7 +433,7 @@ FixMyStreet::override_config {
subtest 'Making a missed collection report' => sub {
$mech->get_ok('/waste/10001/report');
$mech->submit_form_ok(
{ with_fields => { extra_detail => 'Front boundary of property', 'service-MDR-SACK' => 1 } },
{ with_fields => { extra_detail => 'Front boundary of property', 'service-RES-CHAM' => 1 } },
'Selecting missed collection for clear sacks');
$mech->submit_form_ok(
{ with_fields => { name => 'John Doe', phone => '44 07 111 111 111', email => 'test@example.com' } },
Expand All @@ -456,16 +449,16 @@ FixMyStreet::override_config {
ok $report->confirmed;
is $report->state, 'confirmed';
is $report->get_extra_field_value('uprn'), '10001', 'UPRN is correct';
is $report->get_extra_field_value('service_item_name'), 'MDR-SACK', 'Service item name is correct';
is $report->get_extra_field_value('service_item_name'), 'RES-CHAM', 'Service item name is correct';
is $report->get_extra_field_value('assisted_yn'), 'No', 'Assisted collection is correct';
is $report->get_extra_field_value('location_of_containers'), 'Front boundary of property', 'Location of containers is correct';
};

subtest 'Missed collection reports are made against the parent property' => sub {
$mech->get_ok('/waste/10002/report');
$mech->submit_form_ok(
{ with_fields => { extra_detail => 'Rear of property', 'service-MDR-SACK' => 1 } },
'Selecting missed collection for blue recycling box');
{ with_fields => { extra_detail => 'Rear of property', 'service-RES-CHAM' => 1 } },
'Selecting missed collection for communal refuse bin');
$mech->submit_form_ok(
{ with_fields => { name => 'John Doe', phone => '44 07 111 111 111', email => 'test@example.com' } },
'Submitting contact details');
Expand Down Expand Up @@ -610,7 +603,7 @@ sub _site_collections {
},
{ SiteServiceID => 6,
ServiceItemDescription => 'Service 6',
ServiceItemName => 'MDR-SACK', # Clear Sack(s)
ServiceItemName => 'RES-CHAM', # Residual Chamberlain

NextCollectionDate => '2024-05-01T00:00:00',
SiteServiceValidFrom => '2024-03-31T00:59:59',
Expand Down
4 changes: 3 additions & 1 deletion templates/email/default/_email_comment_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[% IF report.category == 'Bulky collection' AND (row.item_problem_state == 'closed' OR row.item_problem_state == 'fixed - council' OR row.item_problem_state == 'unable to fix') %]
[% INCLUDE 'waste/_bulky_email_comment_end.html' %]
[% ELSE %]
[% email_sanitize_html(update) | replace('<p>', '<p style="' _ list_item_p_style _ '">') %]
[% email_sanitize_html(update, private_email ? "item_private_email_text" : undef) | replace('<p>', '<p style="' _ list_item_p_style _ '">') %]
[% IF NOT private_email %]
<p class="user-name" style="[% list_item_date_style %]">
[%~ IF update.item_anonymous %]
[%~ loc('Posted anonymously') -%]
Expand All @@ -17,6 +18,7 @@
[%~ END %]
[% '(' _ cobrand.prettify_dt(update.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%]
</p>
[% END %]
[% END %]
</div>
[% END %]
4 changes: 3 additions & 1 deletion templates/email/default/_email_comment_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
[% IF report.category == 'Bulky collection' AND (row.item_problem_state == 'closed' OR row.item_problem_state == 'fixed - council' OR row.item_problem_state == 'unable to fix') -%]
[% INCLUDE 'waste/_bulky_email_comment_end.txt' -%]
[% ELSE -%]
[% IF NOT private_email -%]
[% row.item_name _ ' : ' IF row.item_name AND NOT row.item_anonymous -%]
[% END -%]
[% '(' _ cobrand.prettify_dt(row.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%]
[% email_sanitize_text(row) -%]
[% email_sanitize_text(row, private_email ? "item_private_email_text" : undef) -%]
[% END %]

------
Expand Down
31 changes: 0 additions & 31 deletions templates/email/default/templated_email_alert-update.html

This file was deleted.

29 changes: 0 additions & 29 deletions templates/email/default/templated_email_alert-update.txt

This file was deleted.

14 changes: 14 additions & 0 deletions templates/email/default/waste/other-reported.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@

<th style="[% td_style %][% primary_column_style %]" id="primary_column">
[% start_padded_box | safe %]
[% IF report.category == 'Request new container' %]
<h1 style="[% h1_style %]">Your request has been&nbsp;logged</h1>
[% ELSE %]
<h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
[% END %]

[% IF cobrand.moniker == 'sutton' %]
<p style="[% p_style %]">Thank you for contacting the London Borough of Sutton.</p>
[% END %]

[% INCLUDE '_council_reference.html' problem=report %]

Expand All @@ -24,6 +32,12 @@ <h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
[% cobrand.wasteworks_config.request_timeframe %]
for this order to be processed. We thank you for your patience and
understanding in advance.</p>
<p style="[% p_style %]">If you have requested a bin, box or caddy to be collected as part of the request:</p>
<ul>
<li>Please keep any bin, box or caddy accessible in your front garden or driveway, ready to be exchanged.</li>
<li>It must be visible from the public highway, so delivery drivers can see it.</li>
<li>We will not be able to exchange a bin, box or caddy if the old bin is not available, and you may not receive your replacement.</li>
</ul>
[% END %]
[% ELSE %]

Expand Down
12 changes: 10 additions & 2 deletions templates/email/default/waste/other-reported.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ Your report to [% report.body %] has been logged.

[% ELSIF cobrand.moniker == 'sutton' %]

[% IF report.category == 'Request new container' %]
[% IF report.category == 'Request new container' %]
Due to the current high demand, please allow up to
[% cobrand.wasteworks_config.request_timeframe %] for this
order to be processed. We thank you for your patience and understanding in
advance.
[% END %]

If you have requested a bin, box or caddy to be collected as part of the request:

* Please keep any bin, box or caddy accessible in your front garden or driveway, ready to be exchanged.

* It must be visible from the public highway, so delivery drivers can see it.

* We will not be able to exchange a bin, box or caddy if the old bin is not available, and you may not receive your replacement.
[% END %]

[% ELSE %]

Expand Down
2 changes: 1 addition & 1 deletion templates/email/kingston/alert-update.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Subject: New [% site_name %] updates on report, reference RBK-[% report.id %]
Subject: Update on report, reference RBK-[% report.id %]

The following updates have been left on this report:

Expand Down
2 changes: 1 addition & 1 deletion templates/email/sutton/alert-update.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Subject: New [% site_name %] updates on report, reference LBS-[% report.id %]
Subject: Update on report, reference LBS-[% report.id %]

The following updates have been left on this report:

Expand Down
37 changes: 9 additions & 28 deletions templates/web/base/open311/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,31 @@

<h1>FixMyStreet support for Open311</h1>

<p>FixMyStreet supports Open311 both as a <a href="#client">client</a> (sending
<p>FixMyStreet supports Open311 both as a <a href="about/open311-api-info">client</a> (sending
reports made on the site to an external service via the Open311 protocol), and
partly as a <a href="#server">server</a> (returning reports made on the site when
queried via the Open311 protocol).</p>

<dl id="client">

<dt>What is Open311?</dt>

<dd>
<p>In a nutshell, it's an international open standard that allows services to
'talk to' council systems.</p>
<p>As channels of communication diversify, it has become more and more
important that council systems can recognise and accept reports from a variety
of sources. For example, reports may come in via Twitter, SMS, email, services
like FixMyStreet, and the council's own website.</p>
</dd>

<dt>Where can I find out more?</dt>

<dd>
<p>Open311 isn't as widely known as it deserves to be, so we wrote a
<a href="http://www.mysociety.org/2013/01/10/open311-introduced/">short
series of blog posts</a> to explain the basics. And you can find out lots more at
<a href="http://open311.org/">open311.org</a>.</p>
<p>In a nutshell, it’s a free, international technology, known as an open standard, that allows civic reporting services and systems to ‘talk to’ each other.</p>
<p>Open311 isn't as widely known as it deserves to be, so we wrote a <a href="https://www.mysociety.org/2013/01/10/open311-introduced/">short series of blog posts</a> to explain the basics. </p>
</dd>

<dt>Why does it matter?</dt>

<dd>
<p>If you oversee problem reports at a council, you will of course be concerned
about future-proofing your communication channels in an easy and economical way
&ndash; Open311 gives you that assurance.</p>
</dd>

[% IF c.cobrand.moniker == 'fixmystreet' %]
<p>You may be interested to know about <a
href="https://www.fixmystreet.com/pro/">FixMyStreet
Pro</a>, our hosted service which sits seamlessly on your council
website.</p>

<p>We can integrate it with any council back-end system, but if you use
Open311, we charge less. That's how much we believe it's the sane way forward
for council problem-reporting systems.</p>
[% END %]
<dt>Integrating with FixMyStreet using Open311</dt>
<dd>
<p>Open311 enables any authority to receive reports from FixMyStreet.com and the app directly into a backend system instead of via email. It will also allow you to close/update reports on FixMyStreet.com or the app when work is completed.
<p><a href="/about/open311-api-info">Find out more about connecting to FixMyStreet using Open311</a></p>
</dd>

<dt>Any questions?</dt>

Expand Down
2 changes: 2 additions & 0 deletions templates/web/base/report/_council_sent_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
[%- ELSE %]
[%- tprintf(loc('FixMyStreet ref:&nbsp;%s'), problem.id) %].
[%- END -%]
[%- ELSIF problem.cobrand_data == 'waste' %]
[%- tprintf('WasteWorks ref:&nbsp;%s', problem.id) %].
[%- ELSE %]
[%- tprintf(loc('FixMyStreet ref:&nbsp;%s'), problem.id) %].
[%- END %]
Expand Down