diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-02-14 09:22:15 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-02-14 09:22:15 +0000 |
commit | f5744500d82c8a3cf2a70ce0544d778579b1694a (patch) | |
tree | dc2e27b73cf97111754e273bff6bb256d9c9fee6 /templates | |
parent | 88e1827bd645f36be074f95eea25d1f539f1aecc (diff) | |
parent | 3e00fa1c74c92bf902b1d41d524ad79a1554e835 (diff) |
Merge branch 'private-in-email'
Diffstat (limited to 'templates')
-rw-r--r-- | templates/email/buckinghamshire/other-reported.html | 9 | ||||
-rw-r--r-- | templates/email/buckinghamshire/other-reported.txt | 9 | ||||
-rw-r--r-- | templates/email/default/other-reported.html | 10 | ||||
-rw-r--r-- | templates/email/default/other-reported.txt | 9 | ||||
-rw-r--r-- | templates/email/fixamingata/other-reported.html | 9 | ||||
-rw-r--r-- | templates/email/fixamingata/other-reported.txt | 9 | ||||
-rw-r--r-- | templates/email/hounslow/other-reported.html | 9 | ||||
-rw-r--r-- | templates/email/hounslow/other-reported.txt | 9 | ||||
-rw-r--r-- | templates/email/tfl/other-reported.html | 9 | ||||
-rw-r--r-- | templates/email/tfl/other-reported.txt | 9 | ||||
-rw-r--r-- | templates/web/base/report/display_tools.html | 2 | ||||
-rw-r--r-- | templates/web/base/report/update-form-wrapper.html | 9 |
12 files changed, 92 insertions, 10 deletions
diff --git a/templates/email/buckinghamshire/other-reported.html b/templates/email/buckinghamshire/other-reported.html index 4108f83b0..341df8120 100644 --- a/templates/email/buckinghamshire/other-reported.html +++ b/templates/email/buckinghamshire/other-reported.html @@ -12,11 +12,18 @@ INCLUDE '_email_top.html'; [% 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.owns_problem( report ) %] [% 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 | safe %] </th> diff --git a/templates/email/buckinghamshire/other-reported.txt b/templates/email/buckinghamshire/other-reported.txt index 1a042a60a..4d354d3ed 100644 --- a/templates/email/buckinghamshire/other-reported.txt +++ b/templates/email/buckinghamshire/other-reported.txt @@ -4,13 +4,20 @@ 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.owns_problem( report ) %] [% TRY %][% INCLUDE '_council_reference.txt' problem=report %][% CATCH file %][% END %] [% END %] 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 is at the following location: diff --git a/templates/email/default/other-reported.html b/templates/email/default/other-reported.html index 07a36b6f3..c22bee231 100644 --- a/templates/email/default/other-reported.html +++ b/templates/email/default/other-reported.html @@ -12,14 +12,22 @@ INCLUDE '_email_top.html'; [% 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 | safe %] </th> 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/fixamingata/other-reported.html b/templates/email/fixamingata/other-reported.html index c7e6b5c63..751da0cae 100644 --- a/templates/email/fixamingata/other-reported.html +++ b/templates/email/fixamingata/other-reported.html @@ -12,13 +12,20 @@ INCLUDE '_email_top.html'; [% start_padded_box | safe %] <h1 style="[% h1_style %]">Din rapport har loggats</h1> <p style="[% p_style %]">Din rapport till [% report.body %] har blivit loggad på [% site_name %]. + +[% 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 ) %] Eftersom [% cobrand.council_name %] inte är ansvarig för den här typen av rapporter, så kommer rapporten istället att skickas till [% report.body %]. [% END %] </p> <p style="margin: 20px auto; text-align: center"> - <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.url %]">Visa min rapport</a> + <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.view_url %]">Visa min rapport</a> </p> [% end_padded_box | safe %] </th> diff --git a/templates/email/fixamingata/other-reported.txt b/templates/email/fixamingata/other-reported.txt index e39adf527..e9ed542d3 100644 --- a/templates/email/fixamingata/other-reported.txt +++ b/templates/email/fixamingata/other-reported.txt @@ -4,6 +4,13 @@ Hej [% report.name %], Din rapport till [% report.body %] har blivit loggad på [% 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 ) %] Eftersom [% cobrand.council_name %] inte är ansvarig för den här typen av rapporter, så kommer rapporten istället att skickas till [% report.body %]. @@ -11,7 +18,7 @@ rapporter, så kommer rapporten istället att skickas till [% report.body %]. Du kan se din rapport på: -[% cobrand.base_url_for_report(report) %][% report.url %] +[% cobrand.base_url_for_report(report) %][% report.view_url %] Din rapport har titeln: diff --git a/templates/email/hounslow/other-reported.html b/templates/email/hounslow/other-reported.html index a45f64a3e..b4b4faa99 100644 --- a/templates/email/hounslow/other-reported.html +++ b/templates/email/hounslow/other-reported.html @@ -12,6 +12,13 @@ INCLUDE '_email_top.html'; [% start_padded_box | safe %] <h1 style="[% h1_style %]">Your report has been logged</h1> <p style="[% p_style %]">Your report to [% cobrand.council_name %] 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> @@ -19,7 +26,7 @@ of report, so it will instead be sent to [% report.body %].</p> [% 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 | safe %] </th> diff --git a/templates/email/hounslow/other-reported.txt b/templates/email/hounslow/other-reported.txt index b976c4edc..a3b7e37c8 100644 --- a/templates/email/hounslow/other-reported.txt +++ b/templates/email/hounslow/other-reported.txt @@ -4,6 +4,13 @@ Hello [% report.name %], Your report to [% cobrand.council_name %] 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/tfl/other-reported.html b/templates/email/tfl/other-reported.html index f28f5a819..89e76b303 100644 --- a/templates/email/tfl/other-reported.html +++ b/templates/email/tfl/other-reported.html @@ -12,9 +12,16 @@ INCLUDE '_email_top.html'; [% start_padded_box | safe %] <h1 style="[% h1_style %]">Your report has been logged</h1> <p style="[% p_style %]">Your report to Transport for London 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 %] + [% TRY %][% INCLUDE '_council_reference.html' problem=report %][% CATCH file %][% 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 | safe %] </th> diff --git a/templates/email/tfl/other-reported.txt b/templates/email/tfl/other-reported.txt index 6c959493f..e70c4eb1c 100644 --- a/templates/email/tfl/other-reported.txt +++ b/templates/email/tfl/other-reported.txt @@ -4,11 +4,18 @@ Hello [% report.name %], Your report to Transport for London 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 ~%] + [% TRY %][% INCLUDE '_council_reference.txt' problem=report %][% CATCH file %][% END %] 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/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html index b65320394..e16ffcb2c 100644 --- a/templates/web/base/report/display_tools.html +++ b/templates/web/base/report/display_tools.html @@ -1,5 +1,6 @@ <div class="shadow-wrap"> <ul id="key-tools"> + [% IF c.user_exists OR NOT problem.non_public %] [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( problem.bodies_str ) %] <li><form method="post" action="/report/[% problem.id %]/delete" id="remove-from-site-form"> <input type="hidden" name="token" value="[% csrf_token %]"> @@ -16,6 +17,7 @@ [% IF c.cobrand.moniker == 'fixmystreet' %] <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li> [% END %] + [% END %] [% IF c.cobrand.moniker == 'zurich' %] <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li> [% ELSE %] diff --git a/templates/web/base/report/update-form-wrapper.html b/templates/web/base/report/update-form-wrapper.html index 5347df3c3..a46207a3c 100644 --- a/templates/web/base/report/update-form-wrapper.html +++ b/templates/web/base/report/update-form-wrapper.html @@ -1,4 +1,10 @@ [% UNLESS c.cobrand.updates_disallowed(problem) %] + + [% IF NOT c.user_exists AND problem.non_public # Came via other-reported token or similar %] + <p>[% tprintf(loc('To provide an update, please <a href="%s">sign in</a>.'), '/auth?r=report/' _ problem.id) %]</p> + + [% ELSE %] + [% IF two_column_sidebar %] <button type="button" class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button> <div class="hidden-js"> @@ -7,6 +13,9 @@ [% IF two_column_sidebar %] </div> [% END %] + + [% END %] + [% ELSE %] [% TRY %][% INCLUDE 'report/_updates_disallowed_message.html' %][% CATCH file %][% END %] [% END %] |