aboutsummaryrefslogtreecommitdiffstats
path: root/templates/email/default
diff options
context:
space:
mode:
Diffstat (limited to 'templates/email/default')
-rw-r--r--templates/email/default/_email_sidebar.html17
-rw-r--r--templates/email/default/other-updated.html2
-rw-r--r--templates/email/default/other-updated.txt2
-rw-r--r--templates/email/default/problem-confirm-not-sending.html2
-rw-r--r--templates/email/default/problem-confirm.html4
-rw-r--r--templates/email/default/problem-confirm.txt1
-rw-r--r--templates/email/default/questionnaire.html2
-rw-r--r--templates/email/default/submit-example.txt2
8 files changed, 24 insertions, 8 deletions
diff --git a/templates/email/default/_email_sidebar.html b/templates/email/default/_email_sidebar.html
index 291584195..7897d168c 100644
--- a/templates/email/default/_email_sidebar.html
+++ b/templates/email/default/_email_sidebar.html
@@ -1,6 +1,19 @@
-[% DEFAULT report = object ~%]
+[%
+
+# There are cases (eg: when sending email about an update on a problem)
+# where `object` might not be a report. So in those cases, you can pass
+# in a `report` argument, which should be the report the email is about.
+# Otherwise, we assume the `object` you passed is a report.
+DEFAULT report = object;
+
+# There are cases (eg: when confirming a not-yet-published report) where
+# you will want the map image to link to somewhere other than the report
+# page. So in those cases, you can pass in a custom `url` argument.
+DEFAULT url = cobrand.base_url_for_report(report) _ report.url
+
+~%]
<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="">
+ <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 %]
[%~ IF object.photo %]
<img style="[% preview_photo_style %]" src="[% inline_image(object.get_first_image_fp) %]" alt="" align="right">
diff --git a/templates/email/default/other-updated.html b/templates/email/default/other-updated.html
index fbae37268..27eba9007 100644
--- a/templates/email/default/other-updated.html
+++ b/templates/email/default/other-updated.html
@@ -13,7 +13,7 @@ INCLUDE '_email_top.html';
<h1 style="[% h1_style %]">Your update has been&nbsp;logged</h1>
<p style="[% p_style %]">Your update has been logged on [% site_name %]:</p>
<p style="margin: 20px auto; text-align: center">
- <a style="[% button_style %]" href="[% cobrand.base_url_for_report(problem) %][% problem.url %]#update_[% update.id %]">View my update</a>
+ <a style="[% button_style %]" href="[% cobrand.base_url_for_report(problem) %][% update.url %]">View my update</a>
</p>
[% end_padded_box %]
</th>
diff --git a/templates/email/default/other-updated.txt b/templates/email/default/other-updated.txt
index 4900f6c29..7e5631ef1 100644
--- a/templates/email/default/other-updated.txt
+++ b/templates/email/default/other-updated.txt
@@ -4,7 +4,7 @@ Hello [% update.name %],
Your update has been logged on [% site_name %]:
-[% cobrand.base_url_for_report(problem) %][% problem.url %]#update_[% update.id %]
+[% cobrand.base_url_for_report(problem) %][% update.url %]
Your update reads:
diff --git a/templates/email/default/problem-confirm-not-sending.html b/templates/email/default/problem-confirm-not-sending.html
index dad5b64bc..827a49d55 100644
--- a/templates/email/default/problem-confirm-not-sending.html
+++ b/templates/email/default/problem-confirm-not-sending.html
@@ -22,7 +22,7 @@ council.</p>
<p style="[% p_style %]">If you no longer wish to publish this report, please take no further action.</p>
[% end_padded_box %]
</th>
-[% WRAPPER '_email_sidebar.html' object = report %]
+[% WRAPPER '_email_sidebar.html' object = report, url = token_url %]
<h2 style="[% h2_style %]">[% report.title | html %]</h2>
<p style="[% secondary_p_style %]">[% report.detail | html %]</p>
[% END %]
diff --git a/templates/email/default/problem-confirm.html b/templates/email/default/problem-confirm.html
index f69449b52..f545d7385 100644
--- a/templates/email/default/problem-confirm.html
+++ b/templates/email/default/problem-confirm.html
@@ -17,6 +17,8 @@ INCLUDE '_email_top.html';
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 %]
+
+[% 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>
<p style="margin: 20px auto; text-align: center">
@@ -25,7 +27,7 @@ of problem, so it will instead be sent to [% report.body %].
<p style="[% p_style %]">If you no longer wish to send this report, please take no further action.</p>
[% end_padded_box %]
</th>
-[% WRAPPER '_email_sidebar.html' object = report %]
+[% WRAPPER '_email_sidebar.html' object = report, url = token_url %]
<h2 style="[% h2_style %]">[% report.title | html %]</h2>
<p style="[% secondary_p_style %]">[% report.detail | html %]</p>
[% END %]
diff --git a/templates/email/default/problem-confirm.txt b/templates/email/default/problem-confirm.txt
index 9d0767671..e9e7378d1 100644
--- a/templates/email/default/problem-confirm.txt
+++ b/templates/email/default/problem-confirm.txt
@@ -14,6 +14,7 @@ into your web browser and press return.
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 %]
+[% TRY %][% INCLUDE '_problem-confirm_extra.txt' %][% CATCH file %][% END %]
Your problem had the title:
[% report.title %]
diff --git a/templates/email/default/questionnaire.html b/templates/email/default/questionnaire.html
index ab5783d17..6d9c32af4 100644
--- a/templates/email/default/questionnaire.html
+++ b/templates/email/default/questionnaire.html
@@ -22,7 +22,7 @@ INCLUDE '_email_top.html';
<p style="[% p_style %]">Thank you! Your feedback is really valuable.</p>
[% end_padded_box %]
</th>
-[% WRAPPER '_email_sidebar.html' object = report %]
+[% WRAPPER '_email_sidebar.html' object = report, url = url %]
<h2 style="[% h2_style %]">[% title %]</h2>
<p style="[% secondary_p_style %]">[% report.detail | html %]</p>
[% END %]
diff --git a/templates/email/default/submit-example.txt b/templates/email/default/submit-example.txt
index c4ae6704f..1d9db23d3 100644
--- a/templates/email/default/submit-example.txt
+++ b/templates/email/default/submit-example.txt
@@ -55,5 +55,5 @@ 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/about/council
+Read more here: https://www.fixmystreet.com/pro