diff options
Diffstat (limited to 'templates/email/default')
38 files changed, 748 insertions, 40 deletions
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' %] |