diff options
Diffstat (limited to 'templates/email/default')
21 files changed, 144 insertions, 71 deletions
diff --git a/templates/email/default/_email_bottom.html b/templates/email/default/_email_bottom.html index 76e381201..4967dfaa2 100644 --- a/templates/email/default/_email_bottom.html +++ b/templates/email/default/_email_bottom.html @@ -1,16 +1,20 @@ </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> + <th class="spacer-cell"></th> + </tr> + </table> + <table [% wrapper_table %] 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 %] + [%~ ELSE %] + This email was sent automatically, from an unmonitored email account. Please do not reply to it. + [%~ END %] + </th> + <th class="spacer-cell"></th> </tr> </table> </body> diff --git a/templates/email/default/_email_settings.html b/templates/email/default/_email_settings.html index d94466c02..f6db8334c 100644 --- a/templates/email/default/_email_settings.html +++ b/templates/email/default/_email_settings.html @@ -43,9 +43,11 @@ 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_background_color_dontknow = color_yellow button_text_color = color_black button_text_color_fixed = color_white button_text_color_notfixed = color_white +button_text_color_dontknow = color_black button_font_weight = "bold" %] @@ -58,7 +60,7 @@ button_font_weight = "bold" # 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%"' +wrapper_table = table_reset link_style = "color: $link_text_color;" link_hover_style = "text-decoration: none; color: $link_hover_text_color;" @@ -68,7 +70,12 @@ td_style = "font-family: $body_font_family; font-size: 16px; line-height: 21px; body_style = "margin: 0;" wrapper_style = "$td_style background: $body_background_color; color: $body_text_color;" -hint_style = "padding: ${ column_padding }px 0; color: $body_text_color; font-size: 12px; line-height: 18px;" +wrapper_max_width = 620 # in pixels without "px" suffix +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;" + 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;" @@ -101,6 +108,7 @@ contact_td_style = "vertical-align: top; padding: 0.4em 0 0.4em 0; width: 100%;" 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;" +dontknow_button_style = "$button_style border-color: $button_background_color_dontknow; background-color: $button_background_color_dontknow; color: $button_text_color_dontknow; margin: 0 0.2em;" %] diff --git a/templates/email/default/_email_top.html b/templates/email/default/_email_top.html index 102e23e59..75dec6788 100644 --- a/templates/email/default/_email_top.html +++ b/templates/email/default/_email_top.html @@ -22,14 +22,11 @@ font-family: [% body_font_family %] !important; } - [%~ # 550px = 5+5+5+520+5+5+5 %] - @media only screen and (max-width: 549px) { - #main { + @media only screen and (max-width: [% wrapper_min_width - 1 %]px) { + #main, .hint { min-width: 0 !important; } - } - @media only screen and (max-width: 500px) { #main table, #main tr, #main th { display: block !important; } @@ -39,20 +36,30 @@ width: auto !important; } } + + @media only screen and (min-width: [% wrapper_max_width %]px) { + .spacer-cell { + background-color: [% body_background_color %]; + } + } </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"> + <th class="spacer-cell"></th> + <th width="[% wrapper_max_width %]" style="[% td_style %][% hint_style %]" class="hint"> + [% email_summary %] + </th> + <th class="spacer-cell"></th> + </tr> + </table> + <table [% wrapper_table %] 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 %]> <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 %]"/> diff --git a/templates/email/default/alert-confirm.txt b/templates/email/default/alert-confirm.txt index 886b04b00..74fe7e64e 100644 --- a/templates/email/default/alert-confirm.txt +++ b/templates/email/default/alert-confirm.txt @@ -1,6 +1,6 @@ -Subject: Confirm your [% INCLUDE 'site-name.txt' | trim %] alert +Subject: Confirm your [% site_name %] alert -Please click on the link below to confirm your [% INCLUDE 'site-name.txt' | trim %] alert. +Please click on the link below to confirm your [% site_name %] alert. [% token_url %] @@ -8,11 +8,11 @@ If you can't click the link, copy and paste it to the address bar of your web browser. This confirms that you'd like to receive an email when someone makes a -[% INCLUDE 'site-name.txt' | trim %] report within your chosen area. +[% site_name %] report within your chosen area. -Email alerts are a free service from [% INCLUDE 'site-name.txt' | trim %]. +Email alerts are a free service from [% site_name %]. -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/alert-update.html b/templates/email/default/alert-update.html index 8c392685d..a2f1c69a9 100644 --- a/templates/email/default/alert-update.html +++ b/templates/email/default/alert-update.html @@ -1,6 +1,6 @@ [% -title = title | html; +title = report.title | html; email_summary = "New updates on “" _ title _ "”"; email_columns = 2; @@ -14,12 +14,14 @@ INCLUDE '_email_top.html'; [% start_padded_box %] <h1 style="[% h1_style %]">New updates on <a href="[% problem_url %]">[% title %]</a></h1> [%~ INCLUDE '_email_comment_list.html' %] + [% UNLESS hide_unsubscribe %] <p style="[% p_style %]"><a href="[% unsubscribe_url %]">Unsubscribe from alerts about this report</a></p> + [% END %] [% end_padded_box %] </th> [% WRAPPER '_email_sidebar.html' object = report %] - <h2 style="[% h2_style %]">[% title | html %]</h2> - <p style="[% secondary_p_style %]">[% detail | html %]</p> + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> [% END %] [% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt index 3bf9e4377..cfeba2e36 100644 --- a/templates/email/default/alert-update.txt +++ b/templates/email/default/alert-update.txt @@ -1,7 +1,7 @@ -Subject: New [% site_name %] updates on report: '[% title %]' +Subject: New [% site_name %] updates on report: '[% report.title %]' You asked us to send you an email every time an update was made to the -[% site_name %] report: [% title %]. +[% site_name %] report: [% report.title %]. The following updates have been left on this report: @@ -19,10 +19,12 @@ please do not reply to it. [% signature %] +[% IF NOT hide_unsubscribe %] Unsubscribe? We currently email you whenever someone leaves an update on the -[% site_name %] report: [% title %]. +[% site_name %] report: [% report.title %]. 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/change_email.txt b/templates/email/default/change_email.txt index 8db6b105e..3d3328b8f 100644 --- a/templates/email/default/change_email.txt +++ b/templates/email/default/change_email.txt @@ -5,7 +5,7 @@ email address on [% site_name %]. [% c.uri_for_action( 'auth/token', token ) %] -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/inactive-account.html b/templates/email/default/inactive-account.html new file mode 100644 index 000000000..78b277877 --- /dev/null +++ b/templates/email/default/inactive-account.html @@ -0,0 +1,26 @@ +[% + +email_summary = "Your inactive account 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 %]">Your inactive account</h1> + <p style="[% p_style %]"> +Your account on [% site_name %] has been inactive for [% email_from %] +[% nget('month', 'months', email_from) %], and we automatically remove +accounts that have been inactive after [% anonymize_from %] +[% nget('month', 'months', anonymize_from) %]. If you wish to keep your +account, please log in to the site and that will keep it active: +</p> + <p style="margin: 20px auto; text-align: center"> + <a style="[% button_style %]" href="[% url %]">Visit [% site_name %]</a> + </p> + <p style="[% p_style %]">Thanks for using the site.</p> + +[% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/inactive-account.txt b/templates/email/default/inactive-account.txt new file mode 100644 index 000000000..1b6b8b5bd --- /dev/null +++ b/templates/email/default/inactive-account.txt @@ -0,0 +1,18 @@ +Subject: Your inactive account on [% site_name %] + +Hello [% user.name %], + +Your account on [% site_name %] has been inactive for [% email_from %] +[% nget('month', 'months', email_from) %], and we automatically remove +accounts that have been inactive after [% anonymize_from %] +[% nget('month', 'months', anonymize_from) %]. If you wish to keep your +account, please log in to the site and that will keep it active: + +[% url %] + +Thanks for using the site. + +[% INCLUDE 'signature.txt' %] + +This email was sent automatically, from an unmonitored email account - so +please do not reply to it. diff --git a/templates/email/default/login.txt b/templates/email/default/login.txt index 9a57c4fd9..61920daf7 100644 --- a/templates/email/default/login.txt +++ b/templates/email/default/login.txt @@ -7,7 +7,7 @@ Please click on the link below to confirm your email address. Once you've done this, you'll be able to view and manage all reports and updates you've made on [% site_name %]. -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/other-reported.txt b/templates/email/default/other-reported.txt index b626e56d9..559b0933b 100644 --- a/templates/email/default/other-reported.txt +++ b/templates/email/default/other-reported.txt @@ -21,7 +21,7 @@ And details: [% report.detail %] -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/other-updated.html b/templates/email/default/other-updated.html index 27eba9007..e7f09e123 100644 --- a/templates/email/default/other-updated.html +++ b/templates/email/default/other-updated.html @@ -11,7 +11,8 @@ INCLUDE '_email_top.html'; <th style="[% td_style %][% primary_column_style %]" id="primary_column"> [% start_padded_box %] <h1 style="[% h1_style %]">Your update has been logged</h1> - <p style="[% p_style %]">Your update has been logged on [% site_name %]:</p> + <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> diff --git a/templates/email/default/other-updated.txt b/templates/email/default/other-updated.txt index 7e5631ef1..5b5195f80 100644 --- a/templates/email/default/other-updated.txt +++ b/templates/email/default/other-updated.txt @@ -6,11 +6,13 @@ Your update has been logged on [% site_name %]: [% cobrand.base_url_for_report(problem) %][% update.url %] +[% TRY %][% INCLUDE '_council_reference.txt' %][% CATCH file %][% END %] + Your update reads: [% update.text %] -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/partial.txt b/templates/email/default/partial.txt index fb5e17c10..ea405f0b4 100644 --- a/templates/email/default/partial.txt +++ b/templates/email/default/partial.txt @@ -1,8 +1,8 @@ -Subject: Confirm your report on [% INCLUDE 'site-name.txt' | trim %] +Subject: Confirm your report on [% site_name %] Hello [% report.name || report.email %], -To confirm the report you have uploaded to [% INCLUDE 'site-name.txt' | trim %] +To confirm the report you have uploaded to [% site_name %] via [% report.service %], and to check or add any details, please visit the following URL: @@ -10,7 +10,7 @@ following URL: Thanks! -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/problem-confirm-not-sending.txt b/templates/email/default/problem-confirm-not-sending.txt index d27b47677..06e84e6d5 100644 --- a/templates/email/default/problem-confirm-not-sending.txt +++ b/templates/email/default/problem-confirm-not-sending.txt @@ -25,7 +25,7 @@ Thank you for supporting [% site_name %]. -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/problem-confirm.txt b/templates/email/default/problem-confirm.txt index e9e7378d1..693d7a131 100644 --- a/templates/email/default/problem-confirm.txt +++ b/templates/email/default/problem-confirm.txt @@ -29,7 +29,7 @@ Thank you for submitting a report through [% site_name %]. -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/problem-moderated.txt b/templates/email/default/problem-moderated.txt index f69004be2..7c1c3b5c2 100644 --- a/templates/email/default/problem-moderated.txt +++ b/templates/email/default/problem-moderated.txt @@ -31,7 +31,7 @@ the team at [% report_complain_uri %] Thank you for submitting a report through [% site_name %]. -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. diff --git a/templates/email/default/questionnaire.html b/templates/email/default/questionnaire.html index 6d9c32af4..eaa570ae0 100644 --- a/templates/email/default/questionnaire.html +++ b/templates/email/default/questionnaire.html @@ -16,8 +16,11 @@ INCLUDE '_email_top.html'; <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> + <a style="[% fixed_button_style %]" href="[% url %]?been_fixed=Yes">Fixed</a> + <a style="[% notfixed_button_style %]" href="[% url %]?been_fixed=No">Not fixed</a> + </p> + <p style="margin: 20px auto; text-align: center"> + <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 %] diff --git a/templates/email/default/submit.html b/templates/email/default/submit.html index 582670f98..8dc06041e 100644 --- a/templates/email/default/submit.html +++ b/templates/email/default/submit.html @@ -23,38 +23,36 @@ of a local problem that they believe might require your attention.</p> <table [% table_reset %]> <tr> <th style="[% contact_th_style %]">Name</th> - <td style="[% contact_td_style %]">[% name | html %]</td> + <td style="[% contact_td_style %]">[% report.name | html %]</td> </tr> <tr> <th style="[% contact_th_style %]">Email</th> <td style="[% contact_td_style %]"> - [%~ IF email ~%] - <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ IF report.user.email ~%] + <a href="mailto:[% report.user.email | html %]">[% report.user.email | html %]</a> [%~ ELSE ~%] <strong>No email address provided, only phone number</strong> [%~ END ~%] </td> </tr> - [%~ IF phone %] + [%~ IF report.user.phone %] <tr> <th style="[% contact_th_style %]">Phone</th> - <td style="[% contact_td_style %]"><a href="tel:[% phone | html %]">[% phone | html %]</a></td> + <td style="[% contact_td_style %]"><a href="tel:[% report.user.phone | html %]">[% report.user.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> + <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 %] </th> [% WRAPPER '_email_sidebar.html' object = report %] - <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> + <h2 style="[% h2_style %]">[% report.title | html %]</h2> + <p style="[% secondary_p_style %]">[% report.category | html %]</p> + <p style="[% secondary_p_style %]">[% report.detail | html %]</p> <p style="[% secondary_p_style %]"> <strong>Location:</strong> <a href="[% osm_url %]" title="View OpenStreetMap of this location"> - [%~ latitude %], [% longitude ~%] + [%~ report.latitude %], [% report.longitude ~%] </a> [% IF closest_address %]<br>[% closest_address | trim | replace("\n\n", "<br>") %][% END %] </p> diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt index 8c88a17f8..f08e723a8 100644 --- a/templates/email/default/submit.txt +++ b/templates/email/default/submit.txt @@ -1,4 +1,4 @@ -Subject: Problem Report: [% title %] +Subject: Problem Report: [% report.title %] Dear [% bodies_name %], @@ -13,19 +13,21 @@ please visit the following link: [% has_photo %]---------- -Name: [% name %] +Name: [% report.name %] -Email: [% email OR "None provided" %] +Email: [% report.user.email OR "None provided" %] -Phone: [% phone OR "None provided" %] +Phone: [% report.user.phone OR "None provided" %] -[% category_line %]Subject: [% title %] +Category: [% report.category %] -Details: [% detail %] +Subject: [% report.title %] -Latitude: [% latitude %] +Details: [% report.detail %] -Longitude: [% longitude %] +Latitude: [% report.latitude %] + +Longitude: [% report.longitude %] View OpenStreetMap of this location: [% osm_url %] diff --git a/templates/email/default/update-confirm.txt b/templates/email/default/update-confirm.txt index 039a3bb39..669645f0a 100644 --- a/templates/email/default/update-confirm.txt +++ b/templates/email/default/update-confirm.txt @@ -1,8 +1,8 @@ -Subject: Confirm your update on [% INCLUDE 'site-name.txt' | trim %] +Subject: Confirm your update on [% site_name %] Hello [% update.name %], -Please click on the link below to confirm your update on [% INCLUDE 'site-name.txt' | trim %]: +Please click on the link below to confirm your update on [% site_name %]: [% token_url %] @@ -15,7 +15,7 @@ Your update reads: [% INCLUDE 'update-confirm-donotsend.txt' %] -[% INCLUDE 'signature.txt' %] +[% signature %] This email was sent automatically, from an unmonitored email account - so please do not reply to it. |