diff options
Diffstat (limited to 'templates/email')
76 files changed, 949 insertions, 216 deletions
diff --git a/templates/email/bromley/_email_color_overrides.html b/templates/email/bromley/_email_color_overrides.html new file mode 100644 index 000000000..effe82046 --- /dev/null +++ b/templates/email/bromley/_email_color_overrides.html @@ -0,0 +1,19 @@ +[% + +color_bromley_green = '#009D57' +color_bromley_blue = '#5b7893' +color_bromley_blue_pale = '#ADC3D8' + +body_background_color = color_bromley_blue +body_text_color = color_bromley_blue_pale + +header_background_color = color_bromley_green +header_text_color = color_white + +button_background_color = color_bromley_green +button_text_color = color_white + +logo_width = "94" # pixel measurement, but without 'px' suffix +logo_height = "50" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/email/bromley/questionnaire.txt b/templates/email/bromley/questionnaire.txt index 5c0bd2957..fa80ab105 100644 --- a/templates/email/bromley/questionnaire.txt +++ b/templates/email/bromley/questionnaire.txt @@ -1,6 +1,6 @@ -Subject: Questionnaire about your report: '[% title %]' +Subject: Questionnaire about your report: '[% report.title %]' -Hello [% name %], +Hello [% report.name %], [% created %] ago, you reported a problem, the details of which are at the end of this email. To keep the site @@ -16,7 +16,7 @@ mailbox, please do not reply. Your report was as follows: -[% title %] +[% report.title %] -[% detail %] +[% report.detail %] diff --git a/templates/email/default/_email_bottom.html b/templates/email/default/_email_bottom.html new file mode 100644 index 000000000..5f5fdd2b0 --- /dev/null +++ b/templates/email/default/_email_bottom.html @@ -0,0 +1,17 @@ + </tr> + <tr> + <th colspan="[% email_columns %]" style="[% td_style %][% hint_style %]" class="hint"> + [% IF email_footer %] + [% email_footer %] + [% ELSE %] + This email was sent automatically, from an unmonitored email account. Please do not reply to it. + [% END %] + </th> + </tr> + </table> + </th> + <th></th> + </tr> + </table> +</body> +</html> diff --git a/templates/email/default/_email_comment_list.html b/templates/email/default/_email_comment_list.html new file mode 100644 index 000000000..4fc469b6d --- /dev/null +++ b/templates/email/default/_email_comment_list.html @@ -0,0 +1,14 @@ +[% FOR update IN data %] + <div style="[% list_item_style %]"> + [% IF update.item_photo %] + <a href="[% problem_url %]"> + <img style="[% list_item_photo_style %]" src="[% inline_image(update.get_first_image_fp) %]" alt=""> + </a> + [% END %] + <p style="[% list_item_p_style %]">“[% update.item_text | html %]”</p> + <p style="[% list_item_date_style %]"> + [% update.item_name | html IF update.item_name AND NOT update.item_anonymous -%] + [% '(' _ cobrand.prettify_dt(update.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%] + </p> + </div> +[% END %] diff --git a/templates/email/default/_email_comment_list.txt b/templates/email/default/_email_comment_list.txt new file mode 100644 index 000000000..dbf00640f --- /dev/null +++ b/templates/email/default/_email_comment_list.txt @@ -0,0 +1,8 @@ +[% FOR row IN data -%] +[% row.item_name _ ' : ' IF row.item_name AND NOT row.item_anonymous -%] +[% '(' _ cobrand.prettify_dt(row.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%] +[% row.item_text %] + +------ + +[% END %] diff --git a/templates/email/default/_email_report_list.html b/templates/email/default/_email_report_list.html new file mode 100644 index 000000000..5f7f67864 --- /dev/null +++ b/templates/email/default/_email_report_list.html @@ -0,0 +1,19 @@ +[% FOR report IN data %] +<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 %]"> + <a href="[% cobrand.base_url_for_report( report ) %]/report/[% report.id %]"> + [%~ report.title | html ~%] + </a> + </h2> + <p style="[% list_item_p_style %]">[% report.detail | html %]</p> + <p style="[% list_item_date_style %]"> + [% cobrand.prettify_dt( report.confirmed ) %]. + [% report.nearest %] + </p> +</div> +[% END %] diff --git a/templates/email/default/_email_report_list.txt b/templates/email/default/_email_report_list.txt new file mode 100644 index 000000000..3128e2f06 --- /dev/null +++ b/templates/email/default/_email_report_list.txt @@ -0,0 +1,8 @@ +[% FOR report IN data -%] +[% cobrand.base_url_for_report(report) %]/report/[% report.id %] - [% report.title %] + +[% report.nearest ~%] + +------ + +[% END %] diff --git a/templates/email/default/_email_settings.html b/templates/email/default/_email_settings.html new file mode 100644 index 000000000..73f140743 --- /dev/null +++ b/templates/email/default/_email_settings.html @@ -0,0 +1,108 @@ +[% + +# The default colours. + +color_blue = "#0F87C5" +color_blue_darker = "#00527C" +color_blue_pale = "#D6E2EB" +color_grey = "#D2D2D2" +color_gunmetal = "#42494C" +color_gunmetal_light = "#81959D" +color_yellow = "#FDD008" +color_red_dark = "#ce2626" +color_green_dark = "#39a515" +color_black = "#000000" +color_white = "#ffffff" + +link_text_color = color_blue +link_hover_text_color = color_blue_darker + +body_background_color = color_gunmetal +body_font_family = "Helvetica, Arial, sans-serif" +body_text_color = color_gunmetal_light + +header_background_color = color_yellow +header_text_color = color_black +header_padding = "15px 20px" # a full CSS padding property (eg: top/right/bottom/left) + +logo_width = "192" # pixel measurement, but without 'px' suffix +logo_height = "35" # pixel measurement, but without 'px' suffix +logo_font_size = "24px" + +primary_column_background_color = color_white +primary_column_text_color = color_black +secondary_column_background_color = color_blue_pale +secondary_column_text_color = color_black +column_divider_color = color_grey +column_padding = "20" # a single CSS pixel measurement without the "px" suffix + +preview_photo_border = "1px solid rgba(0,0,0,0.1)" +list_item_border_bottom = "1px solid $color_grey" + +button_border_radius = "4px" # a full CSS border-radius property +button_background_color = color_yellow +button_background_color_fixed = color_green_dark +button_background_color_notfixed = color_red_dark +button_text_color = color_black +button_text_color_fixed = color_white +button_text_color_notfixed = color_white +button_font_weight = "bold" + +%] + +[% # Handy point at which your cobrand can override any of those default colours before the rest of the settings are constructed. %] +[% TRY %][% PROCESS '_email_color_overrides.html' %][% CATCH file %][% END %] + +[% + +# Variables used inside the email templates. + +table_reset = 'cellspacing="0" cellpadding="0" border="0" width="100%"' +wrapper_table = 'cellspacing="0" cellpadding="5" border="0" width="100%"' + +link_style = "color: $link_text_color;" +link_hover_style = "text-decoration: none; color: $link_hover_text_color;" + +td_style = "font-family: $body_font_family; font-size: 16px; line-height: 21px; font-weight: normal; text-align: left;" + +body_style = "margin: 0; background: $body_background_color;" +wrapper_style = "$td_style background: $body_background_color;" + +hint_style = "padding: ${ column_padding }px 0; color: $body_text_color; font-size: 12px; line-height: 18px;" +header_style = "padding: $header_padding; background: $header_background_color; color: $header_text_color;" + +only_column_style = "padding: ${ column_padding }px; vertical-align: top; background-color: $primary_column_background_color; color: $primary_column_text_color;" +primary_column_style = "vertical-align: top; width: 50%; background-color: $primary_column_background_color; color: $primary_column_text_color;" +secondary_column_style = "vertical-align: top; width: 50%; background-color: $secondary_column_background_color; color: $secondary_column_text_color; border-left: 1px solid $column_divider_color;" + +# Use these to add padding inside primary and secondary columns. +start_padded_box = '<table cellspacing="0" cellpadding="' _ column_padding _ '" border="0" width="100%"><tr><th style="' _ td_style _ '">' +end_padded_box = '</th></tr></table>' + +logo_style = "font-size: $logo_font_size; line-height: ${ logo_height }px; vertical-align: middle;" +h1_style = "margin: 0 0 20px 0; font-size: 28px; line-height: 30px;" +h2_style = "margin: 0 0 20px 0; font-size: 21px; line-height: 24px;" +p_style = "margin: 0 0 0.8em 0;" +secondary_p_style = "font-size: 14px; line-height: 20px; $p_style" +preview_photo_style = "display: block; margin: 0 0 1em 1em; border: $preview_photo_border;" +map_image_style = "display: block; width: 100%; height: auto;" + +list_item_style = "padding-bottom: 20px; margin-bottom: 20px; border-bottom: $list_item_border_bottom;" +list_item_h2_style = "margin: 0 0 16px 0; font-size: 21px; line-height: 24px;" +list_item_p_style = "margin: 0 0 16px 0;" +list_item_date_style = "font-size: 14px; line-height: 20px; margin: 0; color: $color_gunmetal_light;" +list_item_photo_style = "float: right; margin: 0 0 1em 1em; border: none;" + +contact_meta_style = "padding: 15px ${ column_padding }px; vertical-align: top; background-color: $secondary_column_background_color; border-bottom: 1px solid $column_divider_color;" +contact_th_style = "vertical-align: top; padding: 0.4em 1em 0 0; white-space: nowrap; text-align: left;" +contact_td_style = "vertical-align: top; padding: 0.4em 0 0.4em 0; width: 100%;" + +# The below is so the buttons work okay in Outlook: https://litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design +button_style = "display: inline-block; border: 10px solid $button_background_color; border-width: 10px 15px; border-radius: $button_border_radius; background-color: $button_background_color; color: $button_text_color; font-size: 18px; line-height: 21px; font-weight: $button_font_weight; text-decoration: underline;" +fixed_button_style = "$button_style border-color: $button_background_color_fixed; background-color: $button_background_color_fixed; color: $button_text_color_fixed; margin: 0 0.2em;" +notfixed_button_style = "$button_style border-color: $button_background_color_notfixed; background-color: $button_background_color_notfixed; color: $button_text_color_notfixed; margin: 0 0.2em;" + +%] + +[% # Handy point at which your cobrand can override any of the constructed variables before they are sent to the templates. %] +[% TRY %][% PROCESS '_email_setting_overrides.html' %][% CATCH file %][% END %] diff --git a/templates/email/default/_email_top.html b/templates/email/default/_email_top.html new file mode 100644 index 000000000..c599142b7 --- /dev/null +++ b/templates/email/default/_email_top.html @@ -0,0 +1,64 @@ +[% + # The cobrand might come to us a variety of ways + # Alert sets cobrand directly, questionnaire/submit have it in report, otherwise web + cobrand = cobrand.moniker OR report.cobrand OR c.cobrand.moniker; + + IF cobrand == 'fixmystreet'; + SET img_dir = 'fixmystreet.com'; + ELSE; + SET img_dir = cobrand; + END -%] +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <style type="text/css"> + [% # Styles here will be applied by everything except Gmail.com %] + a { [% link_style %] } + a:hover { [% link_hover_style %] } + + body, table, td, th { + font-family: [% body_font_family %] !important; + } + + [% # 550px = 5+5+5+520+5+5+5 %] + @media only screen and (max-width: 549px) { + #main { + min-width: 0 !important; + } + } + + @media only screen and (max-width: 500px) { + #main table, #main tr, #main th { + display: block !important; + } + + #primary_column, + #secondary_column { + width: auto !important; + } + } + </style> +</head> +<body style="[% body_style %]"> + <table [% wrapper_table %] style="[% wrapper_style %]"> + <tr> + <th></th> + <th width="620" style="[% td_style %] min-width: 520px;" id="main"> + <table [% table_reset %]> + <tr> + <th colspan="[% email_columns %]" style="[% td_style %][% hint_style %]" class="hint"> + [% email_summary %] + </th> + </tr> + <tr> + <th colspan="[% email_columns %]" style="[% td_style %][% header_style %]"> + [%~ IF file_exists("web/cobrands/${ img_dir }/images/email-logo.gif") ~%] + <img src="[% inline_image('web/cobrands/' _ img_dir _ '/images/email-logo.gif') %]" width="[% logo_width %]" height="[% logo_height %]" alt="[% site_name %]" style="[% logo_style %]"/> + [%~ ELSE ~%] + <span style="[% logo_style %]">[% site_name %]</span> + [% END %] + </th> + </tr> + <tr> diff --git a/templates/email/default/alert-confirm.html b/templates/email/default/alert-confirm.html new file mode 100644 index 000000000..9abfea644 --- /dev/null +++ b/templates/email/default/alert-confirm.html @@ -0,0 +1,21 @@ +[% + +email_summary = "You need to confirm your " _ site_name _ " alert settings before we can send you alerts."; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">Please confirm your email alert settings</h1> + <p style="[% p_style %]">Please click on the link below to confirm that you want to receive email alerts within your chosen area.</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% token_url %]">Yes, send me alerts</a> + </p> + <p style="[% p_style %]">If you no longer wish to subscribe to alerts in this area, just ignore this email.</p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-problem-area.html b/templates/email/default/alert-problem-area.html new file mode 100644 index 000000000..a18933519 --- /dev/null +++ b/templates/email/default/alert-problem-area.html @@ -0,0 +1,19 @@ +[% + +email_summary = "New reports in " _ area_name; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">New reports in [% area_name %]</h1> + [% INCLUDE '_email_report_list.html' %] + + <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about new reports in this area</a></p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-problem-area.txt b/templates/email/default/alert-problem-area.txt index 548befe2f..7bf013cda 100644 --- a/templates/email/default/alert-problem-area.txt +++ b/templates/email/default/alert-problem-area.txt @@ -3,7 +3,7 @@ Subject: New [% site_name %] reports in [% area_name %] The following new [% site_name %] reports have been added in the [% area_name %] area: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/default/alert-problem-council.html b/templates/email/default/alert-problem-council.html new file mode 100644 index 000000000..867182e09 --- /dev/null +++ b/templates/email/default/alert-problem-council.html @@ -0,0 +1,19 @@ +[% + +email_summary = "New reports to ${ area_name }"; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">New reports to [% area_name %]</h1> + [% INCLUDE '_email_report_list.html' %] + + <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about new reports to this area</a></p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-problem-council.txt b/templates/email/default/alert-problem-council.txt index abb704870..ecf671e69 100644 --- a/templates/email/default/alert-problem-council.txt +++ b/templates/email/default/alert-problem-council.txt @@ -3,7 +3,7 @@ Subject: New [% site_name %] reports to [% area_name %] The following new [% site_name %] reports have been sent to [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/default/alert-problem-nearby.html b/templates/email/default/alert-problem-nearby.html new file mode 100644 index 000000000..78af4cd84 --- /dev/null +++ b/templates/email/default/alert-problem-nearby.html @@ -0,0 +1,19 @@ +[% + +email_summary = "New reports within your area"; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">New reports within your area</h1> + [% INCLUDE '_email_report_list.html' %] + + <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about new reports in this area</a></p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-problem-nearby.txt b/templates/email/default/alert-problem-nearby.txt index 1a4f713e8..fdffca5b5 100644 --- a/templates/email/default/alert-problem-nearby.txt +++ b/templates/email/default/alert-problem-nearby.txt @@ -3,7 +3,7 @@ Subject: New reports on [% site_name %] The following [% site_name %] reports have been made within the area you specified: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/default/alert-problem-ward.html b/templates/email/default/alert-problem-ward.html new file mode 100644 index 000000000..459bd173c --- /dev/null +++ b/templates/email/default/alert-problem-ward.html @@ -0,0 +1,19 @@ +[% + +email_summary = "New reports to " _ area_name _ " within " _ ward_name; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">New reports to [% area_name %] within [% ward_name %]</h1> + [% INCLUDE '_email_report_list.html' %] + + <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about new reports in this area</a></p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-problem-ward.txt b/templates/email/default/alert-problem-ward.txt index e757a2963..edbed6087 100644 --- a/templates/email/default/alert-problem-ward.txt +++ b/templates/email/default/alert-problem-ward.txt @@ -3,7 +3,7 @@ Subject: New [% site_name %] reports to [% area_name %] within [% ward_name %] The following new [% site_name %] reports have been sent to [% area_name %] within [% ward_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/default/alert-problem.html b/templates/email/default/alert-problem.html new file mode 100644 index 000000000..bff65e57a --- /dev/null +++ b/templates/email/default/alert-problem.html @@ -0,0 +1,19 @@ +[% + +email_summary = "New reports on " _ site_name; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">New reports on [% site_name %]</h1> + [% INCLUDE '_email_report_list.html' %] + + <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about new [% site_name %] reports</a></p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-problem.txt b/templates/email/default/alert-problem.txt index 7163ee7bf..87ae1f037 100644 --- a/templates/email/default/alert-problem.txt +++ b/templates/email/default/alert-problem.txt @@ -2,7 +2,7 @@ Subject: New reports on [% site_name %] The following new reports have been added to [% site_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/default/alert-update.html b/templates/email/default/alert-update.html new file mode 100644 index 000000000..0a8aadab7 --- /dev/null +++ b/templates/email/default/alert-update.html @@ -0,0 +1,31 @@ +[% + +title = title | html; +email_summary = "New updates on “" _ title _ "”"; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">New updates on <a href="[% problem_url %]">[% title %]</a></h1> + [% INCLUDE '_email_comment_list.html' %] + <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about this report</a></p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% title | html %]</h2> + <p style="[% secondary_p_style %]">[% detail | html %]</p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt index 7722d2c1f..3bf9e4377 100644 --- a/templates/email/default/alert-update.txt +++ b/templates/email/default/alert-update.txt @@ -5,11 +5,12 @@ You asked us to send you an email every time an update was made to the The following updates have been left on this report: -[% data %] +[% INCLUDE '_email_comment_list.txt' %] [% state_message %] If you would like to view or reply to these updates, please visit the following URL: + [% problem_url %] This email was sent automatically, from an unmonitored email account - so diff --git a/templates/email/default/change_email.html b/templates/email/default/change_email.html new file mode 100644 index 000000000..965741eed --- /dev/null +++ b/templates/email/default/change_email.html @@ -0,0 +1,22 @@ +[% + +email_summary = "Click this link to change your " _ site_name _ " email address"; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">Change your [% site_name %] email address</h1> + <p style="[% p_style %]">Please click on the link below to confirm you wish to update your +email address on [% site_name %].</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% c.uri_for_action( 'auth/token', token ) %]">Change my email address</a> + </p> + <p style="[% p_style %]">If you no longer wish to change your email address, just ignore this email.</p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/change_email.txt b/templates/email/default/change_email.txt index 0c5aeac14..8db6b105e 100644 --- a/templates/email/default/change_email.txt +++ b/templates/email/default/change_email.txt @@ -1,7 +1,7 @@ -Subject: Updating your [% INCLUDE 'site-name.txt' | trim %] email address +Subject: Updating your [% site_name %] email address Please click on the link below to confirm you wish to update your -email address on [% INCLUDE 'site-name.txt' | trim %]. +email address on [% site_name %]. [% c.uri_for_action( 'auth/token', token ) %] diff --git a/templates/email/default/contact.html b/templates/email/default/contact.html new file mode 100644 index 000000000..81f9cb080 --- /dev/null +++ b/templates/email/default/contact.html @@ -0,0 +1,45 @@ +[% + +subject_html = subject | html; +name = form_name | html; +email_summary = "“" _ subject_html _ "” – Message from " _ name _ " on " _ host; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% contact_meta_style %]"> + <table [% table_reset %]> + <tr> + <th style="[% contact_th_style %]">From</th> + <td style="[% contact_td_style %]">[% name %] <<a href="mailto:[% em | html %]">[% em | html %]</a>></td> + </tr> + <tr> + <th style="[% contact_th_style %]">IP address</th> + <td style="[% contact_td_style %]">[% ip %]</td> + </tr> + <tr> + <th style="[% contact_th_style %]">To</th> + <td style="[% contact_td_style %]">[% host %] administrators</td> + </tr> + </table> +</th> +</tr> + +<tr> +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">[% subject | html %]</h1> + <p style="[% p_style %]">[% message | html %]</p> + [% IF complaint %] + <p style="[% secondary_p_style %]"> + [% complaint | html %] + - <a href="[% problem_url %]">Report</a> + - <a href="[% admin_url %]">Admin</a> + </p> + [% END %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/contact.txt b/templates/email/default/contact.txt index 59a778ad5..6e1fd5ac9 100644 --- a/templates/email/default/contact.txt +++ b/templates/email/default/contact.txt @@ -2,4 +2,8 @@ Subject: FMS message: [% subject %] [% message %] +[% IF complaint %] +[ [% complaint %] - [% problem_url %] - [% admin_url %] ] +[% END %] + [ Sent by contact.cgi on [% host %]. IP address [% ip %] ] diff --git a/templates/email/default/login.html b/templates/email/default/login.html new file mode 100644 index 000000000..b22838d4e --- /dev/null +++ b/templates/email/default/login.html @@ -0,0 +1,22 @@ +[% + +email_summary = "Click this link to confirm your email address and log into " _ site_name; +email_columns = 1; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]">Thanks for using [% site_name %]</h1> + <p style="[% p_style %]">Please click on the link below to confirm your email address and log into [% site_name %].</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% c.uri_for_action( 'auth/token', token ) %]">Yes, this is my address</a> + </p> + <p style="[% p_style %]">Once you’ve done this, you’ll be able to view and manage all reports and +updates you’ve made from the “Your account” menu on [% site_name %].</p> +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/login.txt b/templates/email/default/login.txt index 360eb8512..9a57c4fd9 100644 --- a/templates/email/default/login.txt +++ b/templates/email/default/login.txt @@ -1,11 +1,11 @@ -Subject: Your [% INCLUDE 'site-name.txt' | trim %] account details +Subject: Your [% site_name %] account details Please click on the link below to confirm your email address. [% c.uri_for_action( 'auth/token', token ) %] Once you've done this, you'll be able to view and manage all reports and -updates you've made on [% INCLUDE 'site-name.txt' | trim %]. +updates you've made on [% site_name %]. [% INCLUDE 'signature.txt' %] diff --git a/templates/email/default/problem-confirm-not-sending.html b/templates/email/default/problem-confirm-not-sending.html new file mode 100644 index 000000000..6b60afbcf --- /dev/null +++ b/templates/email/default/problem-confirm-not-sending.html @@ -0,0 +1,36 @@ +[% + +email_summary = "You need to confirm your " _ site_name _ " report before it can be made public."; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">Please confirm your report</h1> + <p style="[% p_style %]">Please click on the link below to confirm that you want your report to appear +on [% site_name %], despite not being sent to the +council.</p> + <p style="[% p_style %]">Your report will also appear on the [% site_name %] website.</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% token_url %]">Yes, publish my report</a> + </p> + <p style="[% p_style %]">If you no longer wish to publish this report, please take no further action.</p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF report.photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/problem-confirm-not-sending.txt b/templates/email/default/problem-confirm-not-sending.txt index 2443805bb..d27b47677 100644 --- a/templates/email/default/problem-confirm-not-sending.txt +++ b/templates/email/default/problem-confirm-not-sending.txt @@ -1,10 +1,9 @@ -Subject: Confirm your report on [% INCLUDE 'site-name.txt' | trim %] +Subject: Confirm your report on [% site_name %] Hello [% report.name %], Please click on the link below to confirm that you want your report to appear -on [% INCLUDE 'site-name.txt' | trim %], despite not being sent to the -council: +on [% site_name %], despite not being sent to the council: [% token_url %] @@ -22,7 +21,7 @@ And details: If you no longer wish your report to be displayed on the site, please take no further action. -Thank you for supporting [% INCLUDE 'site-name.txt' | trim %]. +Thank you for supporting [% site_name %]. diff --git a/templates/email/default/problem-confirm.html b/templates/email/default/problem-confirm.html new file mode 100644 index 000000000..cfb199df6 --- /dev/null +++ b/templates/email/default/problem-confirm.html @@ -0,0 +1,39 @@ +[% + +email_summary = "You need to confirm your " _ site_name _ " report before it can be sent to ${ report.body }."; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">Please confirm your report</h1> + <p style="[% p_style %]">Please click on the link below to confirm that you want to send your report to [% report.body %]. +[% 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 %] + </p> + <p style="[% p_style %]">Your report will also appear on the [% site_name %] website.</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% token_url %]">Yes, send my report</a> + </p> + <p style="[% p_style %]">If you no longer wish to send this report, please take no further action.</p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF report.photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/problem-confirm.txt b/templates/email/default/problem-confirm.txt index de671a284..9d0767671 100644 --- a/templates/email/default/problem-confirm.txt +++ b/templates/email/default/problem-confirm.txt @@ -1,9 +1,9 @@ -Subject: Confirm your report on [% INCLUDE 'site-name.txt' | trim %] +Subject: Confirm your report on [% site_name %] Hello [% report.name %], Please click on the link below to confirm that you want to send your report to -[% report.body %]. Note that your report will also appear on the [% INCLUDE 'site-name.txt' | trim %] +[% report.body %]. Note that your report will also appear on the [% site_name %] website: [% token_url %] @@ -24,7 +24,7 @@ And details: If you no longer wish to send this report, please take no further action. -Thank you for submitting a report through [% INCLUDE 'site-name.txt' | trim %]. +Thank you for submitting a report through [% site_name %]. diff --git a/templates/email/default/problem-moderated.html b/templates/email/default/problem-moderated.html new file mode 100644 index 000000000..b3dd2d353 --- /dev/null +++ b/templates/email/default/problem-moderated.html @@ -0,0 +1,38 @@ +[% + +email_summary = "Your report on " _ site_name _ " has been moderated."; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">Your report has been moderated</h1> +[% IF types == 'hide' -%] + <p style="[% p_style %]">The report has been hidden from the site.</p> +[% ELSE %] + <p style="[% p_style %]">The following data has been changed: <strong>[% types %]</strong></p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% report_uri %]">View my report</a> + </p> +[% END -%] + <p style="[% p_style %]">If you do not think that this report should have been moderated, you may contact +the team at <a href="[% report_complain_uri %]">[% report_complain_uri %]</a></p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(problem.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF problem.photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(problem.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% problem.moderation_original_data.title | html %]</h2> + <p style="[% secondary_p_style %]">[% problem.moderation_original_data.detail | html %]</p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/problem-moderated.txt b/templates/email/default/problem-moderated.txt index 70dc5ad11..f69004be2 100644 --- a/templates/email/default/problem-moderated.txt +++ b/templates/email/default/problem-moderated.txt @@ -1,8 +1,8 @@ -Subject: Your report on [% INCLUDE 'site-name.txt' | trim %] has been moderated +Subject: Your report on [% site_name %] has been moderated Hello [% user.name %], -Your report on [% INCLUDE 'site-name.txt' | trim %] has been moderated. +Your report on [% site_name %] has been moderated. [% IF types == 'hide' -%] The report has been hidden from the site. @@ -28,8 +28,7 @@ You can see the report at [% report_uri %] If you do not think that this report should have been moderated, you may contact the team at [% report_complain_uri %] -Thank you for submitting a report through [% INCLUDE 'site-name.txt' | trim %]. - +Thank you for submitting a report through [% site_name %]. [% INCLUDE 'signature.txt' %] diff --git a/templates/email/default/questionnaire.html b/templates/email/default/questionnaire.html new file mode 100644 index 000000000..814e5a658 --- /dev/null +++ b/templates/email/default/questionnaire.html @@ -0,0 +1,36 @@ +[% + +title = report.title | html; +email_summary = "Got a minute spare? Let us know what happened to your " _ site_name _ " report about ${ title }."; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">Has your problem been fixed?</h1> + <p style="[% p_style %]">[% created %] ago, you reported a problem using [% site_name %].</p> + <p style="[% p_style %]">Help us keep [% site_name %] up to date by letting us know whether the problem has been fixed yet:</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% fixed_button_style %]" href="[% url %]">Fixed</a> + <a style="[% notfixed_button_style %]" href="[% url %]">Not fixed</a> + </p> + <p style="[% p_style %]">Thank you! Your feedback is really valuable.</p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF report.photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% title %]</h2> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/questionnaire.txt b/templates/email/default/questionnaire.txt index 80b556c41..95acca6ee 100644 --- a/templates/email/default/questionnaire.txt +++ b/templates/email/default/questionnaire.txt @@ -1,6 +1,6 @@ -Subject: Questionnaire about your [% site_name %] report: '[% title %]' +Subject: Questionnaire about your [% site_name %] report: '[% report.title %]' -Hello [% name %], +Hello [% report.name %], [% created %] ago, you reported a problem using [% site_name %]. @@ -16,9 +16,9 @@ updating the status of your problem: Your report was as follows: -[% title %] +[% report.title %] -[% detail %] +[% report.detail %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/submit.html b/templates/email/default/submit.html new file mode 100644 index 000000000..e5cd8f203 --- /dev/null +++ b/templates/email/default/submit.html @@ -0,0 +1,63 @@ +[% + +email_summary = "A new problem in your area has been reported by a " _ site_name _ " user."; +email_footer = "If there is a more appropriate email address for messages about " _ category_footer _ ", please let us know. This will help improve the service for local people. We also welcome any other feedback you may have."; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">New problem in your area</h1> + <p style="[% p_style %]">[% missing %][% multiple %]A user of [% site_name %] has submitted the following report +of a local problem that they believe might require your attention.</p> + + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% url %]">Show full report</a> + </p> + <h2 style="[% h2_style %] margin: 30px 0 10px 0">Reported by:</h2> + <table [% table_reset %]> + <tr> + <th style="[% contact_th_style %]">Name</th> + <td style="[% contact_td_style %]">[% name | html %]</td> + </tr> + <tr> + <th style="[% contact_th_style %]">Email</th> + <td style="[% contact_td_style %]"><a href="mailto:[% email | html %]">[% email | html %]</a></td> + </tr> + [% IF phone %] + <tr> + <th style="[% contact_th_style %]">Phone</th> + <td style="[% contact_td_style %]"><a href="tel:[% phone | html %]">[% phone | html %]</a></td> + </tr> + [% END %] + </table> + <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% name | html %], the user who reported the problem.</p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF has_photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% title | html %]</h2> + [% IF category_line %] + <p style="[% secondary_p_style %]">[% category | html %]</p> + [% END %] + <p style="[% secondary_p_style %]">[% detail | html %]</p> + <p style="[% secondary_p_style %]"> + <strong>Location:</strong> + <a href="[% osm_url %]" title="View OpenStreetMap of this location"> + [%~ latitude %], [% longitude ~%] + </a> + [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %] + </p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/test.txt b/templates/email/default/test.txt deleted file mode 100644 index 1acd4b6ca..000000000 --- a/templates/email/default/test.txt +++ /dev/null @@ -1,14 +0,0 @@ -Subject: test email ☺ - -Hello, - -This is a test email where foo: [% foo %]. - -utf8: 我们应该能够无缝处理UTF8编码 - - indented_text - -long line: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -Yours, -FixMyStreet. diff --git a/templates/email/default/update-confirm-donotsend.txt b/templates/email/default/update-confirm-donotsend.txt index bbeffef6e..c9fdef5ea 100644 --- a/templates/email/default/update-confirm-donotsend.txt +++ b/templates/email/default/update-confirm-donotsend.txt @@ -1,3 +1,3 @@ Note that we do not send updates to [% update.problem.body %] - they are -intended as a place for [% INCLUDE 'site-name.txt' | trim %] users to +intended as a place for [% site_name %] users to discuss, support, and offer advice. diff --git a/templates/email/default/update-confirm.html b/templates/email/default/update-confirm.html new file mode 100644 index 000000000..40841bd82 --- /dev/null +++ b/templates/email/default/update-confirm.html @@ -0,0 +1,33 @@ +[% + +email_summary = "Confirm your update on " _ site_name; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">Please confirm your update</h1> + <p style="[% p_style %]">Please click on the link below to confirm your update on [% site_name %].</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% token_url %]">Yes, confirm my update</a> + </p> + <p style="[% p_style %]">[% INCLUDE 'update-confirm-donotsend.txt' %]</p> + <p style="[% p_style %]">If you no longer wish to confirm this update, please take no further action.</p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(problem.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF update.photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(update.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <p style="[% secondary_p_style %]">[% update.text | html %]</p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/fiksgatami/alert-problem-area.txt b/templates/email/fiksgatami/alert-problem-area.txt index 950e9574b..086ea9a4a 100644 --- a/templates/email/fiksgatami/alert-problem-area.txt +++ b/templates/email/fiksgatami/alert-problem-area.txt @@ -3,7 +3,7 @@ Subject: Nye saker i [% area_name %] hos FiksGataMi.no Følgende saker er sendt til [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Vennlig hilsen, FiksGataMi-gruppen diff --git a/templates/email/fiksgatami/alert-problem-council.txt b/templates/email/fiksgatami/alert-problem-council.txt index 24aa02bc6..e0b0209c8 100644 --- a/templates/email/fiksgatami/alert-problem-council.txt +++ b/templates/email/fiksgatami/alert-problem-council.txt @@ -2,7 +2,7 @@ Subject: Nye saker sendt til [% area_name %] via FiksGataMi.no Følgende saker er sendt til [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Vennlig hilsen, FiksGataMi-gruppen diff --git a/templates/email/fiksgatami/alert-problem-nearby.txt b/templates/email/fiksgatami/alert-problem-nearby.txt index b19b08bea..8ba22709a 100644 --- a/templates/email/fiksgatami/alert-problem-nearby.txt +++ b/templates/email/fiksgatami/alert-problem-nearby.txt @@ -2,7 +2,7 @@ Subject: Nye saker i nærheten på FiksGataMi.no Følgende saker i nærheten er lagt inn på FiksGataMi.no: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Vennlig hilsen, FiksGataMi-gruppen diff --git a/templates/email/fiksgatami/alert-problem-ward.txt b/templates/email/fiksgatami/alert-problem-ward.txt index c7109d5c1..c2e45e7d3 100644 --- a/templates/email/fiksgatami/alert-problem-ward.txt +++ b/templates/email/fiksgatami/alert-problem-ward.txt @@ -3,7 +3,7 @@ Subject: Nye saker sendt til [% area_name %] innenfor [% ward_name %] via FiksGa Følgende saker er sendt til [% area_name %] innenfor [% ward_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Vennlig hilsen, FiksGataMi-gruppen diff --git a/templates/email/fiksgatami/alert-problem.txt b/templates/email/fiksgatami/alert-problem.txt index ffdcedc2c..f6a962612 100644 --- a/templates/email/fiksgatami/alert-problem.txt +++ b/templates/email/fiksgatami/alert-problem.txt @@ -2,7 +2,7 @@ Subject: Nye saker på FiksGataMi.no Følgende nye saker er lagt til: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Vennlig hilsen, FiksGataMi-gruppen diff --git a/templates/email/fiksgatami/alert-update.txt b/templates/email/fiksgatami/alert-update.txt index 950e33082..c075006aa 100644 --- a/templates/email/fiksgatami/alert-update.txt +++ b/templates/email/fiksgatami/alert-update.txt @@ -2,7 +2,7 @@ Subject: Nye oppdateringer for problem - '[% title %]' Følgende oppdateringer har blitt lagt inn for dette problemet: -[% data %] +[% INCLUDE '_email_comment_list.txt' %] [% state_message %] diff --git a/templates/email/fiksgatami/contact.txt b/templates/email/fiksgatami/contact.txt index 59a778ad5..6e1fd5ac9 100644 --- a/templates/email/fiksgatami/contact.txt +++ b/templates/email/fiksgatami/contact.txt @@ -2,4 +2,8 @@ Subject: FMS message: [% subject %] [% message %] +[% IF complaint %] +[ [% complaint %] - [% problem_url %] - [% admin_url %] ] +[% END %] + [ Sent by contact.cgi on [% host %]. IP address [% ip %] ] diff --git a/templates/email/fiksgatami/nn/alert-problem-area.txt b/templates/email/fiksgatami/nn/alert-problem-area.txt index 24b22b777..37fdc376f 100644 --- a/templates/email/fiksgatami/nn/alert-problem-area.txt +++ b/templates/email/fiksgatami/nn/alert-problem-area.txt @@ -3,7 +3,7 @@ Subject: Nye saker i [% area_name %] hos FiksGataMi.no Følgjande saker er sendt til [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Venleg helsing, FiksGataMi-gruppa diff --git a/templates/email/fiksgatami/nn/alert-problem-council.txt b/templates/email/fiksgatami/nn/alert-problem-council.txt index 308115de5..36d42d891 100644 --- a/templates/email/fiksgatami/nn/alert-problem-council.txt +++ b/templates/email/fiksgatami/nn/alert-problem-council.txt @@ -2,7 +2,7 @@ Subject: Nye saker sendt til [% area_name %] via FiksGataMi.no Følgjande saker er sendt til [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Venleg helsing, FiksGataMi-gruppa diff --git a/templates/email/fiksgatami/nn/alert-problem-nearby.txt b/templates/email/fiksgatami/nn/alert-problem-nearby.txt index 1d356f938..c67d7a37b 100644 --- a/templates/email/fiksgatami/nn/alert-problem-nearby.txt +++ b/templates/email/fiksgatami/nn/alert-problem-nearby.txt @@ -2,7 +2,7 @@ Subject: Nye saker i nærleiken på FiksGataMi.no Følgjande saker i nærleiken er lagd inn på FiksGataMi.no: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Venleg helsing, FiksGataMi-gruppa diff --git a/templates/email/fiksgatami/nn/alert-problem-ward.txt b/templates/email/fiksgatami/nn/alert-problem-ward.txt index 81896e856..57c95deba 100644 --- a/templates/email/fiksgatami/nn/alert-problem-ward.txt +++ b/templates/email/fiksgatami/nn/alert-problem-ward.txt @@ -3,7 +3,7 @@ Subject: Nye saker sendt til [% area_name %] innanfor [% ward_name %] via FiksGa Følgjande saker er sendt til [% area_name %] innanfor [% ward_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Venleg helsing, FiksGataMi-gruppa diff --git a/templates/email/fiksgatami/nn/alert-problem.txt b/templates/email/fiksgatami/nn/alert-problem.txt index 0f11f1048..4d788b3ea 100644 --- a/templates/email/fiksgatami/nn/alert-problem.txt +++ b/templates/email/fiksgatami/nn/alert-problem.txt @@ -2,7 +2,7 @@ Subject: Nye saker på FiksGataMi.no Følgjande nye saker er lagt til: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Venleg helsing, FiksGataMi-gruppa diff --git a/templates/email/fiksgatami/nn/alert-update.txt b/templates/email/fiksgatami/nn/alert-update.txt index 1c0422bb7..19b31b7ca 100644 --- a/templates/email/fiksgatami/nn/alert-update.txt +++ b/templates/email/fiksgatami/nn/alert-update.txt @@ -2,7 +2,7 @@ Subject: Nye oppdateringar for problem – '[% title %]' Følgjande oppdateringar har vorte lagt inn for dette problemet: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% state_message %] diff --git a/templates/email/fiksgatami/questionnaire.txt b/templates/email/fiksgatami/questionnaire.txt index 202ac4ba5..0ee5f9f08 100644 --- a/templates/email/fiksgatami/questionnaire.txt +++ b/templates/email/fiksgatami/questionnaire.txt @@ -1,6 +1,6 @@ Subject: Spørreskjema for din sak på FiksGataMi -Hei [% name %], +Hei [% report.name %], for [% created %] siden, la du til en sak på FiksGataMi.no med detaljene som vist i denne e-posten. For å holde vår nettside oppdatert @@ -16,8 +16,8 @@ FiksGataMi-gruppen Saken du la til var som følger: -[% title %] +[% report.title %] -[% detail %] +[% report.detail %] diff --git a/templates/email/fixamingata/alert-problem-area.txt b/templates/email/fixamingata/alert-problem-area.txt index 29e3bb83f..09ded3c46 100644 --- a/templates/email/fixamingata/alert-problem-area.txt +++ b/templates/email/fixamingata/alert-problem-area.txt @@ -2,7 +2,7 @@ Subject: Nya rapporter i [% area_name %] på FixaMinGata Följande nya rapporter har lagts till inom [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/fixamingata/alert-problem-council.txt b/templates/email/fixamingata/alert-problem-council.txt index 29e3bb83f..09ded3c46 100644 --- a/templates/email/fixamingata/alert-problem-council.txt +++ b/templates/email/fixamingata/alert-problem-council.txt @@ -2,7 +2,7 @@ Subject: Nya rapporter i [% area_name %] på FixaMinGata Följande nya rapporter har lagts till inom [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/fixamingata/alert-problem-nearby.txt b/templates/email/fixamingata/alert-problem-nearby.txt index 0462568ac..657ef820a 100644 --- a/templates/email/fixamingata/alert-problem-nearby.txt +++ b/templates/email/fixamingata/alert-problem-nearby.txt @@ -2,7 +2,7 @@ Subject: Nya rapporter på FixMyStreet Följande rapporter har nyligen lagts till på: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/fixamingata/alert-problem-ward.txt b/templates/email/fixamingata/alert-problem-ward.txt index 29e3bb83f..09ded3c46 100644 --- a/templates/email/fixamingata/alert-problem-ward.txt +++ b/templates/email/fixamingata/alert-problem-ward.txt @@ -2,7 +2,7 @@ Subject: Nya rapporter i [% area_name %] på FixaMinGata Följande nya rapporter har lagts till inom [% area_name %]: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/fixamingata/alert-problem.txt b/templates/email/fixamingata/alert-problem.txt index 0462568ac..657ef820a 100644 --- a/templates/email/fixamingata/alert-problem.txt +++ b/templates/email/fixamingata/alert-problem.txt @@ -2,7 +2,7 @@ Subject: Nya rapporter på FixMyStreet Följande rapporter har nyligen lagts till på: -[% data %] +[% INCLUDE '_email_report_list.txt' %] [% signature %] diff --git a/templates/email/fixamingata/alert-update.txt b/templates/email/fixamingata/alert-update.txt index 89a9681a8..c5facfca7 100644 --- a/templates/email/fixamingata/alert-update.txt +++ b/templates/email/fixamingata/alert-update.txt @@ -8,7 +8,7 @@ uppdateringar, klicka på följande länk: Följande uppdatering har lämnats för rapporten [% title %]: -[% data %] +[% INCLUDE '_email_comment_list.txt' %] [% state_message %] diff --git a/templates/email/fixamingata/contact.txt b/templates/email/fixamingata/contact.txt index aab7f400f..e08612778 100644 --- a/templates/email/fixamingata/contact.txt +++ b/templates/email/fixamingata/contact.txt @@ -1,3 +1,7 @@ Subject: [% subject %] (via FixaMinGata) [% message %] + +[% IF complaint %] +[ [% complaint %] - [% problem_url %] - [% admin_url %] ] +[% END %] diff --git a/templates/email/fixamingata/questionnaire.txt b/templates/email/fixamingata/questionnaire.txt index cd065d1f1..b59bb8415 100644 --- a/templates/email/fixamingata/questionnaire.txt +++ b/templates/email/fixamingata/questionnaire.txt @@ -1,6 +1,6 @@ -Subject: Frågeformulär om '[% title %]' +Subject: Frågeformulär om '[% report.title %]' -Hej [% name %], +Hej [% report.name %], OBS! Du kan inte svara på detta brev. För att se eller svara på dessa uppdateringar, klicka på följande länk: @@ -19,6 +19,6 @@ kommentarsfältet i frågeformuläret. Ditt rapporterade problem var enligt nedan: -[% title %] +[% report.title %] -[% detail %] +[% report.detail %] diff --git a/templates/email/fixmystreet.com/_submit_footer.html b/templates/email/fixmystreet.com/_submit_footer.html new file mode 100644 index 000000000..b76f128a5 --- /dev/null +++ b/templates/email/fixmystreet.com/_submit_footer.html @@ -0,0 +1,9 @@ +This message was sent via FixMyStreet, a project of UKCOD, registered charity +number 1076346. If there is a more appropriate email address for messages about +[% category_footer %], please <a href="https://www.fixmystreet.com/contact">let +us know</a>. This will help improve the service for local people. We also +welcome any other feedback you may have. +<br><br> +FixMyStreet is now available for full integration into council websites, making +life easier for both you and your residents. +<a href="https://www.fixmystreet.com/council">Read more</a> diff --git a/templates/email/fixmystreet.com/submit-oxfordshire.txt b/templates/email/fixmystreet.com/submit-oxfordshire.txt deleted file mode 100644 index 547f7ce7f..000000000 --- a/templates/email/fixmystreet.com/submit-oxfordshire.txt +++ /dev/null @@ -1,47 +0,0 @@ -Subject: FMS Problem Report: [% title %] - -Dear [% bodies_name %], - -[% missing %][% multiple %]A user of -FixMyStreet has submitted the following report -of a local problem that they believe might require your attention. - -[% fuzzy %], or to provide an update on the problem, -please visit the following link: - - [% url %] - -[% has_photo %]---------- - -Name: [% name %] - -Email: [% email %] - -[% phone_line %][% category_line %]Subject: [% title %] - -Details: [% detail %] - -Easting/Northing: [% easting %]/[% northing %] - -Latitude: [% latitude %] - -Longitude: [% longitude %] - -View OpenStreetMap of this location: [% osm_url %] - -[% closest_address %]---------- - -Replies to this email will go to the user who submitted the problem. - -[% signature %] - -This message was sent via FixMyStreet, a project of UKCOD, registered charity -number 1076346. If there is a more appropriate email address for messages about -[% category_footer %], please let us know by visiting <https://www.fixmystreet.com/contact>. -This will help improve the service for local people. We -also welcome any other feedback you may have. - -FixMyStreet is now available for full integration into council -websites, making life easier for both you and your residents. -Read more here: https://www.fixmystreet.com/council - diff --git a/templates/email/fixmystreet.com/submit.html b/templates/email/fixmystreet.com/submit.html new file mode 100644 index 000000000..e90862ee9 --- /dev/null +++ b/templates/email/fixmystreet.com/submit.html @@ -0,0 +1,69 @@ +[% + +email_summary = "A new problem in your area has been reported by a " _ site_name _ " user."; +email_footer = PROCESS '_submit_footer.html'; +email_columns = 2; + +PROCESS '_email_settings.html'; + +INCLUDE '_email_top.html'; + +%] + +<th style="[% td_style %][% primary_column_style %]" id="primary_column"> + [% start_padded_box %] + <h1 style="[% h1_style %]">New problem in your area</h1> + <p style="[% p_style %]">[% missing %][% multiple %]A user of [% site_name %] has submitted the following report +of a local problem that they believe might require your attention.</p> + + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% url %]">Show full report</a> + </p> + <h2 style="[% h2_style %] margin: 30px 0 10px 0">Reported by:</h2> + <table [% table_reset %]> + <tr> + <th style="[% contact_th_style %]">Name</th> + <td style="[% contact_td_style %]">[% name | html %]</td> + </tr> + <tr> + <th style="[% contact_th_style %]">Email</th> + <td style="[% contact_td_style %]"><a href="mailto:[% email | html %]">[% email | html %]</a></td> + </tr> + [% IF phone %] + <tr> + <th style="[% contact_th_style %]">Phone</th> + <td style="[% contact_td_style %]"><a href="tel:[% phone | html %]">[% phone | html %]</a></td> + </tr> + [% END %] + </table> + <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% name | html %], the user who reported the problem.</p> + [% end_padded_box %] +</th> +<th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + <img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""> + [% start_padded_box %] + [% IF has_photo %] + <img style="[% preview_photo_style %]" src="[% inline_image(report.get_first_image_fp) %]" alt="" align="right"> + [% END %] + <h2 style="[% h2_style %]">[% title | html %]</h2> + [% IF category_line %] + <p style="[% secondary_p_style %]">[% category | html %]</p> + [% END %] + <p style="[% secondary_p_style %]">[% detail | html %]</p> + [% IF additional_information %] + <p style="[% secondary_p_style %]">[% additional_information %]</p> + [% END %] + <p style="[% secondary_p_style %]"> + <strong>Location:</strong> + <br>Easting/Northing + [%~ " (IE)" IF coordsyst == "I" ~%] + : [% easting %]/[% northing %] + (<a href="[% osm_url %]" title="View OpenStreetMap of this location"> + [%~ latitude %], [% longitude ~%] + </a>) + [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %] + </p> + [% end_padded_box %] +</th> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/fixmystreet.com/submit.txt b/templates/email/fixmystreet.com/submit.txt index 735fdf37d..c30244db9 100644 --- a/templates/email/fixmystreet.com/submit.txt +++ b/templates/email/fixmystreet.com/submit.txt @@ -3,7 +3,7 @@ Subject: Problem Report: [% title %] Dear [% bodies_name %], [% missing %][% multiple %]A user of -FixMyStreet has submitted the following report +[% site_name %] has submitted the following report of a local problem that they believe might require your attention. [% fuzzy %], or to provide an update on the problem, @@ -21,6 +21,8 @@ Email: [% email %] Details: [% detail %] +[% additional_information %] + Easting/Northing [%- " (IE)" IF coordsyst == "I" -%] : [% easting %]/[% northing %] diff --git a/templates/email/fixmystreet.com/update-confirm-donotsend.txt b/templates/email/fixmystreet.com/update-confirm-donotsend.txt index 2e04dc0bf..43be8fe26 100644 --- a/templates/email/fixmystreet.com/update-confirm-donotsend.txt +++ b/templates/email/fixmystreet.com/update-confirm-donotsend.txt @@ -1,8 +1,8 @@ [% IF update.problem.bodies_str != 2482 AND update.problem.bodies_str != 2347 %] Note that we do not send updates to [% update.problem.body %] - they are -intended as a place for [% INCLUDE 'site-name.txt' | trim %] users to +intended as a place for [% site_name %] users to discuss, support, and offer advice. [% ELSE %] This update will be sent to [% update.problem.body %] and will -also be displayed on the [% INCLUDE 'site-name.txt' | trim %] website. +also be displayed on the [% site_name %] website. [% END %] diff --git a/templates/email/greenwich/_email_color_overrides.html b/templates/email/greenwich/_email_color_overrides.html new file mode 100644 index 000000000..a132a3873 --- /dev/null +++ b/templates/email/greenwich/_email_color_overrides.html @@ -0,0 +1,20 @@ +[% + +color_greenwich_red = '#D42828' +color_greenwich_gunmetal = '#4b5459' +color_greenwich_pale_gunmetal = '#e0e6e9' + +body_background_color = color_greenwich_gunmetal +body_text_color = color_greenwich_pale_gunmetal + +header_background_color = color_greenwich_pale_gunmetal +header_text_color = color_greenwich_red + +secondary_column_background_color = color_greenwich_pale_gunmetal + +button_background_color = color_greenwich_pale_gunmetal + +logo_width = "96" # pixel measurement, but without 'px' suffix +logo_height = "50" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/email/greenwich/_email_setting_overrides.html b/templates/email/greenwich/_email_setting_overrides.html new file mode 100644 index 000000000..910e5d455 --- /dev/null +++ b/templates/email/greenwich/_email_setting_overrides.html @@ -0,0 +1,5 @@ +[% + +header_style = "$header_style border-bottom: 4px solid $color_greenwich_red;" + +%]
\ No newline at end of file diff --git a/templates/email/harrogate/submit.txt b/templates/email/harrogate/submit.txt deleted file mode 100644 index a4dcd5220..000000000 --- a/templates/email/harrogate/submit.txt +++ /dev/null @@ -1,47 +0,0 @@ -Subject: Problem Report: [% title %] - -Dear [% bodies_name %], - -[% missing %][% multiple %]A user of -FixMyStreet has submitted the following report -of a local problem that they believe might require your attention. - -[% fuzzy %], or to provide an update on the problem, -please visit the following link: - - [% url %] - -[% has_photo %]---------- - -Name: [% name %] - -Email: [% email %] - -[% phone_line %][% category_line %]Subject: [% title %] - -[% detail %] [% additional_information %] - -Easting/Northing: [% easting %]/[% northing %] - -Latitude: [% latitude %] - -Longitude: [% longitude %] - -View OpenStreetMap of this location: [% osm_url %] - -[% closest_address %]---------- - -Replies to this email will go to the user who submitted the problem. - -[% signature %] - -This message was sent via FixMyStreet, a project of UKCOD, registered charity -number 1076346. If there is a more appropriate email address for messages about -[% category_footer %], please let us know by visiting <https://www.fixmystreet.com/contact>. -This will help improve the service for local people. We -also welcome any other feedback you may have. - -FixMyStreet is now available for full integration into council -websites, making life easier for both you and your residents. -Read more here: https://www.fixmystreet.com/council - diff --git a/templates/email/oxfordshire/_email_color_overrides.html b/templates/email/oxfordshire/_email_color_overrides.html new file mode 100644 index 000000000..cb2662d81 --- /dev/null +++ b/templates/email/oxfordshire/_email_color_overrides.html @@ -0,0 +1,17 @@ +[% + +color_oxfordshire_green = '#339E00' +color_oxfordshire_pale_green = '#f6fcf0' + +header_background_color = color_oxfordshire_green +header_text_color = color_white + +secondary_column_background_color = color_oxfordshire_pale_green + +button_background_color = color_oxfordshire_green +button_text_color = color_white + +logo_width = "160" # pixel measurement, but without 'px' suffix +logo_height = "35" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/email/oxfordshire/submit.txt b/templates/email/oxfordshire/submit.txt deleted file mode 100644 index 547f7ce7f..000000000 --- a/templates/email/oxfordshire/submit.txt +++ /dev/null @@ -1,47 +0,0 @@ -Subject: FMS Problem Report: [% title %] - -Dear [% bodies_name %], - -[% missing %][% multiple %]A user of -FixMyStreet has submitted the following report -of a local problem that they believe might require your attention. - -[% fuzzy %], or to provide an update on the problem, -please visit the following link: - - [% url %] - -[% has_photo %]---------- - -Name: [% name %] - -Email: [% email %] - -[% phone_line %][% category_line %]Subject: [% title %] - -Details: [% detail %] - -Easting/Northing: [% easting %]/[% northing %] - -Latitude: [% latitude %] - -Longitude: [% longitude %] - -View OpenStreetMap of this location: [% osm_url %] - -[% closest_address %]---------- - -Replies to this email will go to the user who submitted the problem. - -[% signature %] - -This message was sent via FixMyStreet, a project of UKCOD, registered charity -number 1076346. If there is a more appropriate email address for messages about -[% category_footer %], please let us know by visiting <https://www.fixmystreet.com/contact>. -This will help improve the service for local people. We -also welcome any other feedback you may have. - -FixMyStreet is now available for full integration into council -websites, making life easier for both you and your residents. -Read more here: https://www.fixmystreet.com/council - diff --git a/templates/email/warwickshire/_email_color_overrides.html b/templates/email/warwickshire/_email_color_overrides.html new file mode 100644 index 000000000..6528f0a5c --- /dev/null +++ b/templates/email/warwickshire/_email_color_overrides.html @@ -0,0 +1,17 @@ +[% + +color_warwickshire_green = '#006d3c' +color_warwickshire_pale_green = '#F9FFF8' + +header_background_color = color_warwickshire_green +header_text_color = color_white + +secondary_column_background_color = color_warwickshire_pale_green + +button_background_color = color_warwickshire_green +button_text_color = color_white + +logo_width = "112" # pixel measurement, but without 'px' suffix +logo_height = "50" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/email/zurich/alert-moderation-overdue.txt b/templates/email/zurich/alert-moderation-overdue.txt index 869f379e5..914f4607c 100644 --- a/templates/email/zurich/alert-moderation-overdue.txt +++ b/templates/email/zurich/alert-moderation-overdue.txt @@ -2,7 +2,7 @@ Subject: eskalierte Meldungen auf Züri wie neu Die folgenden Meldungen auf <<Züri wie neu>> sind älter als einen Tag und müssen dringend bearbeitet werden: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Um diese Meldungen zu moderieren, klicken Sie auf folgende URL: diff --git a/templates/email/zurich/alert-overdue.txt b/templates/email/zurich/alert-overdue.txt index 7e7914b46..fa5457cd7 100644 --- a/templates/email/zurich/alert-overdue.txt +++ b/templates/email/zurich/alert-overdue.txt @@ -2,7 +2,7 @@ Subject: Rückmeldung erforderlich auf Züri wie neu Die folgenden Meldungen wurden eskaliert, da sie nicht innerhalb von fünf Tagen beantwortet worden sind: -[% data %] +[% INCLUDE '_email_report_list.txt' %] Um diese Meldungen zu bearbeiten, klicken Sie auf folgende URL: diff --git a/templates/email/zurich/alert-update.txt b/templates/email/zurich/alert-update.txt index 144047599..30b822f9d 100644 --- a/templates/email/zurich/alert-update.txt +++ b/templates/email/zurich/alert-update.txt @@ -2,7 +2,7 @@ Subject: New update on report - '[% title %]' The following update has been left on this report: -[% data %] +[% INCLUDE '_email_comment_list.txt' %] To view this report on the site, please visit the following URL: [% problem_url %] |