diff options
author | pezholio <pezholio@gmail.com> | 2017-01-18 17:05:10 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-02-15 13:35:57 +0000 |
commit | 8e6f6a1818b4f998d48f157387d2314bb8c86f8a (patch) | |
tree | 29a0a89f65016cd0fc4900ea7491da67ddd2389a /templates | |
parent | 9efe4d14d1415e2fa060891b8be8ffec8b237911 (diff) |
[Oxfordshire] Old report archiving script
This script can be used for the bulk closure of old reports that haven't been
updated in a long time.
Reports that haven't been updated in a *really* long time (since 2014, by
default) are simply closed, and those that haven't been updated since 2015 (by
default) are closed and an email explaining the closure is sent to the report
creator.
This script can be used for other cobrands, but they'll need an
archive.{txt,html} template in order for the emails to be sent.
For mysociety/fixmystreetforcouncils#51
Diffstat (limited to 'templates')
-rw-r--r-- | templates/email/oxfordshire/archive.html | 58 | ||||
-rw-r--r-- | templates/email/oxfordshire/archive.txt | 28 |
2 files changed, 86 insertions, 0 deletions
diff --git a/templates/email/oxfordshire/archive.html b/templates/email/oxfordshire/archive.html new file mode 100644 index 000000000..ed48456a2 --- /dev/null +++ b/templates/email/oxfordshire/archive.html @@ -0,0 +1,58 @@ +[% + +email_summary = "Your reports on " _ site_name; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">Your [% site_name %] reports on FixMyStreet</h1> + <p style="[% p_style %]"> + Hello [% user.name %], + </p> + <p style="[% p_style %]"> + FixMyStreet is being updated in Oxfordshire to + improve how problems get fixed. + </p> + <p style="[% p_style %]"> + As part of these updates, we are closing old reports that appear to be + resolved but remain open in the system. + </p> + <p style="[% p_style %]"> + We noticed that you have [% report_count %] old [% nget('report', 'reports', report_count) %] on the system, + which we've listed below. + </p> + <p style="[% p_style %]"> + If your report is no longer an issue, you don't need to do anything. + </p> + <p style="[% p_style %]"> + If you believe that your report is still a problem, you can reopen it by + clicking the 'reopen' button by a report. + </p> + + [% FOR report IN reports %] + <div style="[% list_item_style %]"> + [% IF report.photo %] + <a href="[% cobrand.base_url_for_report( report ) %]/report/[% report.id %]"> + <img style="[% list_item_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt=""> + </a> + [% END %] + <h2 style="[% list_item_h2_style %]"> + [%~ report.title | html ~%] + </h2> + <p style="[% list_item_p_style %]">[% report.detail | html %]</p> + <p style="[% list_item_date_style %]"> + Reported [% report.time_ago %] ago. + </p> + <p> + <a style="[% button_style %]" href="[% cobrand.base_url_for_report( report ) %][% report.tokenised_url( user, { reopen => 'true' } ) %]#update_form">Reopen report</a> + </p> + </div> + [% END %] + +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/oxfordshire/archive.txt b/templates/email/oxfordshire/archive.txt new file mode 100644 index 000000000..6ecf5b02f --- /dev/null +++ b/templates/email/oxfordshire/archive.txt @@ -0,0 +1,28 @@ +Subject: Your reports on [% site_name %] + +Hello [% user.name %], + +FixMyStreet is being updated in Oxfordshire to improve how problems get fixed. + +As part of these updates, we are closing old reports that appear to be resolved but remain open in the system. + +We noticed that you have [% report_count %] old [% nget('report', 'reports', report_count) %] on the system, which we've listed below. + +If your report is no longer an issue, you don't need to do anything. + +If you believe that your report is still a problem, you can reopen it by clicking or copying and pasting +the link marked 'Reopen?' by a report. + +[% FOR report IN reports %] + +[% report.title %] + +Reported [% report.time_ago %] ago. + +Reopen? [% cobrand.base_url_for_report( report ) %][% report.tokenised_url( user, { reopen => 'true' } ) %]#update_form + +---- + +[% END %] + +The mySociety team and Oxfordshire County Council |