diff options
Diffstat (limited to 'templates/email/default')
23 files changed, 159 insertions, 44 deletions
diff --git a/templates/email/default/_email_bottom.html b/templates/email/default/_email_bottom.html index 4967dfaa2..13c5c019f 100644 --- a/templates/email/default/_email_bottom.html +++ b/templates/email/default/_email_bottom.html @@ -4,12 +4,12 @@ <th class="spacer-cell"></th> </tr> </table> - <table [% wrapper_table %] style="[% wrapper_style %]"> + <table [% wrapper_table | safe %] style="[% wrapper_style %]"> <tr> <th class="spacer-cell"></th> <th width="[% wrapper_max_width %]" style="[% td_style %][% hint_style %]" class="hint"> [%~ IF email_footer %] - [% email_footer %] + [% email_footer | safe %] [%~ ELSE %] This email was sent automatically, from an unmonitored email account. Please do not reply to it. [%~ END %] diff --git a/templates/email/default/_email_comment_list.html b/templates/email/default/_email_comment_list.html index efbb3e8da..346efadfb 100644 --- a/templates/email/default/_email_comment_list.html +++ b/templates/email/default/_email_comment_list.html @@ -5,7 +5,7 @@ <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> + [% update.item_text | html_para | replace('<p>', '<p style="' _ list_item_p_style _ '">') %] <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 -%] diff --git a/templates/email/default/_email_report_list.html b/templates/email/default/_email_report_list.html index 5f7f67864..5a43ce7ea 100644 --- a/templates/email/default/_email_report_list.html +++ b/templates/email/default/_email_report_list.html @@ -10,7 +10,7 @@ [%~ report.title | html ~%] </a> </h2> - <p style="[% list_item_p_style %]">[% report.detail | html %]</p> + [% report.detail | html_para | replace('<p>', '<p style="' _ list_item_p_style _ '">') %] <p style="[% list_item_date_style %]"> [% cobrand.prettify_dt( report.confirmed ) %]. [% report.nearest %] diff --git a/templates/email/default/_email_report_list.txt b/templates/email/default/_email_report_list.txt index 3128e2f06..fed75a163 100644 --- a/templates/email/default/_email_report_list.txt +++ b/templates/email/default/_email_report_list.txt @@ -1,4 +1,4 @@ -[% FOR report IN data -%] +[% FOR report IN data %] [% cobrand.base_url_for_report(report) %]/report/[% report.id %] - [% report.title %] [% report.nearest ~%] diff --git a/templates/email/default/_email_settings.html b/templates/email/default/_email_settings.html index 94045bd3c..5bc7faa66 100644 --- a/templates/email/default/_email_settings.html +++ b/templates/email/default/_email_settings.html @@ -33,7 +33,7 @@ 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 +secondary_column_text_color = color_gunmetal column_divider_color = color_grey column_padding = "20" # a single CSS pixel measurement without the "px" suffix @@ -51,6 +51,8 @@ button_text_color_notfixed = color_white button_text_color_dontknow = color_black button_font_weight = "bold" +text_input_border_color = "#999"; + submit_footer_td_style = "text-align: left; vertical-align: top; font-weight: normal; color: #000;" submit_footer_h2_style = "font-size: 16px; line-height: 18px; margin: 0 0 10px 0;"; submit_footer_link_style = "color: #9CD0EA;"; @@ -81,6 +83,8 @@ wrapper_min_width = 520 # in pixels without "px" suffix hint_min_width = wrapper_min_width - (column_padding * 2) hint_style = "min-width: ${ hint_min_width }px; padding: ${ column_padding }px; color: $body_text_color; font-size: 12px; line-height: 18px;" +warning_style = "min-width: ${ hint_min_width }x; padding: ${ column_padding }px; background-color: $color_red_dark; color: $color_white;" + 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;" @@ -108,6 +112,11 @@ 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%;" +contact_admin_links_style = "display: block;" + +rss_meta_style = "padding: 5px ${ column_padding }px; vertical-align: top; background-color: $secondary_column_background_color; color: $secondary_column_text_color; border-bottom: 1px solid $column_divider_color; font-size: 14px;" + +text_input_style = "padding: 0.5em 0.75em; border-radius: 0.3em; border: 1px solid $text_input_border_color; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) inset; width: 30em; max-width: 100%; margin-top: 0.5em; font-size: 1em;"; # 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;" diff --git a/templates/email/default/_email_sidebar.html b/templates/email/default/_email_sidebar.html index 7897d168c..b90a55c28 100644 --- a/templates/email/default/_email_sidebar.html +++ b/templates/email/default/_email_sidebar.html @@ -13,11 +13,13 @@ DEFAULT url = cobrand.base_url_for_report(report) _ report.url ~%] <th style="[% td_style %][% secondary_column_style %]" id="secondary_column"> + [% IF url %] <a href="[% url %]"><img style="[% map_image_style %]" src="[% inline_image(report.static_map, 'map.jpeg') %]" width="310" height="200" alt=""></a> - [% start_padded_box %] + [% END %] + [% start_padded_box | safe %] [%~ IF object.photo %] <img style="[% preview_photo_style %]" src="[% inline_image(object.get_first_image_fp) %]" alt="" align="right"> [%~ END %] - [%~ content %] - [% end_padded_box %] + [%~ content | safe %] + [% end_padded_box | safe %] </th> diff --git a/templates/email/default/_email_top.html b/templates/email/default/_email_top.html index 0191bacfc..943b522cb 100644 --- a/templates/email/default/_email_top.html +++ b/templates/email/default/_email_top.html @@ -8,10 +8,12 @@ ELSE; SET img_dir = cobrand; END -%] +[% IF NOT for_rss ~%] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +[% END ~%] <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title></title> + <title>[% rss_title | safe %]</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 %] @@ -45,7 +47,18 @@ </style> </head> <body style="[% body_style %]"> - <table [% wrapper_table %] style="[% wrapper_style %]"> +[% IF staging AND NOT for_rss %] + <table [% wrapper_table | safe %] style="[% td_style %]"> + <tr> + <th class="spacer-cell"></th> + <th width="[% wrapper_max_width %]" style="[% td_style %][% warning_style %]" class="hint"> + [% loc('This email was sent from a staging site.') %] + </th> + <th class="spacer-cell"></th> + </tr> + </table> +[% END %] + <table [% wrapper_table | safe %] style="[% wrapper_style %]"> <tr> <th class="spacer-cell"></th> <th width="[% wrapper_max_width %]" style="[% td_style %][% hint_style %]" class="hint"> @@ -54,15 +67,19 @@ <th class="spacer-cell"></th> </tr> </table> - <table [% wrapper_table %] style="[% wrapper_style %]"> + <table [% wrapper_table | safe %] style="[% wrapper_style %]"> <tr> <th class="spacer-cell"></th> <th width="[% wrapper_max_width %]" style="[% td_style %] min-width: [% wrapper_min_width %]px;" id="main"> - <table [% table_reset %]> + <table [% table_reset | safe %]> <tr> <th colspan="[% email_columns %]" style="[% td_style %][% header_style %]"> - [%~ IF file_exists("web/cobrands/${ img_dir }/images/${ logo_file }") ~%] - <img src="[% inline_image('web/cobrands/' _ img_dir _ '/images/' _ logo_file ) %]" width="[% logo_width %]" height="[% logo_height %]" alt="[% site_name %]" style="[% logo_style %]"/> + [%~ IF file_exists("web/cobrands/${ img_dir }/images/${ logo_file }") ~%] + [%~ IF for_rss ~%] + <img src="/cobrands/[% img_dir %]/images/[% logo_file %]" width="[% logo_width %]" height="[% logo_height %]" alt="[% site_name %]" style="[% logo_style %]"/> + [%~ ELSE ~%] + <img src="[% inline_image('web/cobrands/' _ img_dir _ '/images/' _ logo_file ) %]" width="[% logo_width %]" height="[% logo_height %]" alt="[% site_name %]" style="[% logo_style %]"/> + [%~ END ~%] [%~ ELSE ~%] <span style="[% logo_style %]">[% site_name %]</span> [%~ END %] diff --git a/templates/email/default/alert-update.html b/templates/email/default/alert-update.html index 082f5e369..0f7c30481 100644 --- a/templates/email/default/alert-update.html +++ b/templates/email/default/alert-update.html @@ -1,7 +1,7 @@ [% title = report.title | html; -email_summary = "New updates on “" _ title _ "”"; +email_summary = "New updates on “" _ title _ "”"; email_columns = 2; PROCESS '_email_settings.html'; @@ -11,11 +11,13 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <h1 style="[% h1_style %]">New updates on <a href="[% problem_url %]">[% title %]</a></h1> [%~ INCLUDE '_email_comment_list.html' %] + [% IF unsubscribe_url %] <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about this report</a></p> - [% end_padded_box %] + [% END %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report %] <h2 style="[% h2_style %]">[% title %]</h2> diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt index 952b2dbca..903c68e35 100644 --- a/templates/email/default/alert-update.txt +++ b/templates/email/default/alert-update.txt @@ -21,6 +21,7 @@ please do not reply to it. [% signature %] +[% IF unsubscribe_url %] Unsubscribe? We currently email you whenever someone leaves an update on the @@ -28,3 +29,4 @@ We currently email you whenever someone leaves an update on the If you no longer wish to receive an email whenever this report is updated, please follow this link: [% unsubscribe_url %] +[% END %] diff --git a/templates/email/default/contact.html b/templates/email/default/contact.html index 8dc9f3af0..301245f1b 100644 --- a/templates/email/default/contact.html +++ b/templates/email/default/contact.html @@ -2,7 +2,7 @@ subject_html = subject | html; name = form_name | html; -email_summary = "“" _ subject_html _ "” – Message from " _ name _ " on " _ host; +email_summary = "“" _ subject_html _ "” – Message from " _ name _ " on " _ host; email_footer = "Sent via " _ host _ ", IP " _ ip; email_columns = 1; @@ -13,10 +13,21 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% contact_meta_style %]"> - <table [% table_reset %]> + <table [% table_reset | safe %]> <tr> <th style="[% contact_th_style %]">From</th> - <td style="[% contact_td_style %]">[% name %] <<a href="mailto:[% em | html %]">[% em | html %]</a>></td> + <td style="[% contact_td_style %]"> + [% name %] <<a href="mailto:[% em | html %]">[% em | html %]</a>> + [%~ IF user_admin_url %] + <small style="[% contact_admin_links_style %]"> + <a href="[% user_admin_url | html %]">Edit user</a> – + [%~ IF user_latest_report_admin_url %] + <a href="[% user_latest_report_admin_url | html %]">Edit latest report</a> – + [%~ END %] + <a href="[% user_reports_admin_url | html %]">Show all reports</a> + </small> + [%~ END %] + </td> </tr> </table> </th> diff --git a/templates/email/default/contact.txt b/templates/email/default/contact.txt index bd97d17a6..67ff6f610 100644 --- a/templates/email/default/contact.txt +++ b/templates/email/default/contact.txt @@ -6,6 +6,14 @@ Subject: [% site_name %] message: [% subject %] [ [% complaint %] - [% problem_url %] - [% admin_url %] ] [% END %] +[%~ IF user_admin_url %] +[ Edit user: [% user_admin_url %] ] +[%~ IF user_latest_report_admin_url %] +[ Edit latest report: [% user_latest_report_admin_url %] ] +[%~ END %] +[ Show all reports: [% user_reports_admin_url %] ] +[%~ END %] + -- Sent by contact form on [% host %]. IP address [% ip %], user agent [% user_agent %] diff --git a/templates/email/default/login.html b/templates/email/default/login.html index b22838d4e..86bda2464 100644 --- a/templates/email/default/login.html +++ b/templates/email/default/login.html @@ -1,6 +1,6 @@ [% -email_summary = "Click this link to confirm your email address and log into " _ site_name; +email_summary = "Click the link below to confirm your email address and log into " _ site_name; email_columns = 1; PROCESS '_email_settings.html'; diff --git a/templates/email/default/other-reported.html b/templates/email/default/other-reported.html index 584c5b89e..c22bee231 100644 --- a/templates/email/default/other-reported.html +++ b/templates/email/default/other-reported.html @@ -9,19 +9,27 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <h1 style="[% h1_style %]">Your report has been logged</h1> <p style="[% p_style %]">Your report to [% report.body %] has been logged on [% site_name %].</p> + +[% IF report.non_public %] +<p style="[% p_style %]">It has been marked as private and will not be visible +to the general public; you may view it using the link below, or if you sign in +using the email address associated with the report.</p> +[% END %] + [% IF cobrand.is_council && !cobrand.owns_problem( report ) %] <p style="[% p_style %]">Please note that [% cobrand.council_name %] is not responsible for this type of report, so it will instead be sent to [% report.body %].</p> [% ELSE %] [% TRY %][% INCLUDE '_council_reference.html' problem=report %][% CATCH file %][% END %] [% END %] + <p style="margin: 20px auto; text-align: center"> - <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.url %]">View my report</a> + <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.view_url %]">View my report</a> </p> - [% end_padded_box %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report %] <h2 style="[% h2_style %]">[% report.title | html %]</h2> diff --git a/templates/email/default/other-reported.txt b/templates/email/default/other-reported.txt index 7b1230555..522a89b50 100644 --- a/templates/email/default/other-reported.txt +++ b/templates/email/default/other-reported.txt @@ -4,6 +4,13 @@ Hello [% report.name %], Your report to [% report.body %] has been logged on [% site_name %]. +[% IF report.non_public ~%] +It has been marked as private and will not be visible to the general public; +you may view it using the link below, or if you sign in using the email address +associated with the report. + +[% END ~%] + [% IF cobrand.is_council && !cobrand.owns_problem( report ) %] Please note that [% cobrand.council_name %] is not responsible for this type of report, so it will instead be sent to [% report.body %]. @@ -13,7 +20,7 @@ of report, so it will instead be sent to [% report.body %]. It is available to view at: -[% cobrand.base_url_for_report(report) %][% report.url %] +[% cobrand.base_url_for_report(report) %][% report.view_url %] Your report has the title: diff --git a/templates/email/default/other-updated.html b/templates/email/default/other-updated.html index e7f09e123..2609b0027 100644 --- a/templates/email/default/other-updated.html +++ b/templates/email/default/other-updated.html @@ -9,14 +9,14 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <h1 style="[% h1_style %]">Your update has been logged</h1> <p style="[% p_style %]">Your update has been logged on [% site_name %].</p> [% TRY %][% INCLUDE '_council_reference.html' %][% CATCH file %][% END %] <p style="margin: 20px auto; text-align: center"> <a style="[% button_style %]" href="[% cobrand.base_url_for_report(problem) %][% update.url %]">View my update</a> </p> - [% end_padded_box %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = update diff --git a/templates/email/default/problem-confirm-not-sending.html b/templates/email/default/problem-confirm-not-sending.html index 827a49d55..43a4c6372 100644 --- a/templates/email/default/problem-confirm-not-sending.html +++ b/templates/email/default/problem-confirm-not-sending.html @@ -10,7 +10,7 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <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 @@ -20,7 +20,7 @@ council.</p> <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 %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report, url = token_url %] <h2 style="[% h2_style %]">[% report.title | html %]</h2> diff --git a/templates/email/default/problem-confirm.html b/templates/email/default/problem-confirm.html index f545d7385..40b83a5a0 100644 --- a/templates/email/default/problem-confirm.html +++ b/templates/email/default/problem-confirm.html @@ -10,7 +10,7 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <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 ) %] @@ -20,12 +20,13 @@ of problem, so it will instead be sent to [% report.body %]. [% TRY %][% INCLUDE '_problem-confirm_extra.html' %][% CATCH file %][% END %] </p> - <p style="[% p_style %]">Your report will also appear on the [% site_name %] website.</p> + [% UNLESS report.non_public %]<p style="[% p_style %]">Your report will also appear on the [% site_name %] website.</p>[% END %] <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 %] + [% TRY %][% INCLUDE '_problem-confirm_footer.html' %][% CATCH file %][% END %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report, url = token_url %] <h2 style="[% h2_style %]">[% report.title | html %]</h2> diff --git a/templates/email/default/problem-confirm.txt b/templates/email/default/problem-confirm.txt index 693d7a131..7939a988a 100644 --- a/templates/email/default/problem-confirm.txt +++ b/templates/email/default/problem-confirm.txt @@ -3,8 +3,8 @@ 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 [% site_name %] -website: +[% report.body %].[% UNLESS report.non_public %] Note that your report will also +appear on the [% site_name %] website.[% END %] [% token_url %] diff --git a/templates/email/default/problem-moderated.html b/templates/email/default/problem-moderated.html index 142f27fc2..915bb4138 100644 --- a/templates/email/default/problem-moderated.html +++ b/templates/email/default/problem-moderated.html @@ -10,7 +10,7 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <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> @@ -22,7 +22,7 @@ INCLUDE '_email_top.html'; [% 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 %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = problem %] <h2 style="[% h2_style %]">[% moderated_data.title | html %]</h2> diff --git a/templates/email/default/questionnaire.html b/templates/email/default/questionnaire.html index eaa570ae0..bc0b6dbd5 100644 --- a/templates/email/default/questionnaire.html +++ b/templates/email/default/questionnaire.html @@ -11,7 +11,7 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <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> @@ -23,7 +23,7 @@ INCLUDE '_email_top.html'; <a style="[% dontknow_button_style %]" href="[% url %]?been_fixed=Unknown">Don’t know</a> </p> <p style="[% p_style %]">Thank you! Your feedback is really valuable.</p> - [% end_padded_box %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report, url = url %] <h2 style="[% h2_style %]">[% title %]</h2> diff --git a/templates/email/default/submit.html b/templates/email/default/submit.html index 8dc06041e..0fed5770f 100644 --- a/templates/email/default/submit.html +++ b/templates/email/default/submit.html @@ -11,7 +11,7 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <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> @@ -20,7 +20,7 @@ of a local problem that they believe might require your attention.</p> <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 %]> + <table [% table_reset | safe %]> <tr> <th style="[% contact_th_style %]">Name</th> <td style="[% contact_td_style %]">[% report.name | html %]</td> @@ -43,7 +43,7 @@ of a local problem that they believe might require your attention.</p> [%~ END %] </table> <p style="[% p_style %] margin-top: 0.5em;">Replies to this message will go directly to [% report.name | html %], the user who reported the problem.</p> - [% end_padded_box %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = report %] <h2 style="[% h2_style %]">[% report.title | html %]</h2> diff --git a/templates/email/default/update-confirm.html b/templates/email/default/update-confirm.html index c2a39c0e5..888511346 100644 --- a/templates/email/default/update-confirm.html +++ b/templates/email/default/update-confirm.html @@ -10,7 +10,7 @@ INCLUDE '_email_top.html'; %] <th style="[% td_style %][% primary_column_style %]" id="primary_column"> - [% start_padded_box %] + [% start_padded_box | safe %] <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"> @@ -18,7 +18,7 @@ INCLUDE '_email_top.html'; </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 %] + [% end_padded_box | safe %] </th> [% WRAPPER '_email_sidebar.html' object = update diff --git a/templates/email/default/xsl.xsl b/templates/email/default/xsl.xsl new file mode 100644 index 000000000..09fc9adfe --- /dev/null +++ b/templates/email/default/xsl.xsl @@ -0,0 +1,48 @@ +[% +email_footer = site_name; +-%] +[% FILTER collapse %][% PROCESS '_email_settings.html' %][% END ~%] +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:output method="html" /> + <xsl:variable name="title" select="/rss/channel/title"/> + <xsl:variable name="uri" select="/rss/channel/uri"/> + <xsl:template match="/"> + [% PROCESS '_email_top.html' for_rss=1 rss_title='<xsl:value-of select="$title"/> XML Feed' %] + + <th style="[% td_style %][% rss_meta_style %]"> + <p> + This is an RSS feed from the [% site_name %] website. RSS feeds allow you + to stay up to date with the latest changes and additions to the site. + <a href="https://www.bbc.co.uk/news/10628494">Learn more about RSS feeds.</a> + </p> + <p> + To subscribe to this RSS feed, copy this URL into your RSS feed reader: + <input type="text" style="[% text_input_style %]" onClick="this.setSelectionRange(0, this.value.length)"> + <xsl:attribute name="value"> + <xsl:value-of select="$uri"/> + </xsl:attribute> + </input> + </p> + </th> + + </tr> + <tr> + + <th style="[% td_style %][% only_column_style %]"> + <h1 style="[% h1_style %]"><xsl:value-of select="$title"/></h1> + <xsl:apply-templates select="rss/channel/item"/> + </th> + + [% PROCESS '_email_bottom.html' %] + + </xsl:template> + + <xsl:template match="item"> + <div style="[% list_item_style %]"> + <h2 style="[% list_item_h2_style %]"><a href="{link}"><xsl:value-of select="title"/></a></h2> + <xsl:value-of disable-output-escaping="yes" select="description" /> + </div> + </xsl:template> + +</xsl:stylesheet> |