Skip to content

Commit 6174356

Browse files
committed
Merge pull request #461 from alphagov/explain-why-youre-getting-emails
Update unsubscribe link to explain up-front why you're receiving emails
2 parents 5e0e785 + 344e8cf commit 6174356

18 files changed

Lines changed: 124 additions & 19 deletions

app/views/petition_mailer/email_creator.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<p><small>You’re receiving this email because you created this petition.</small></p>
2+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
3+
<hr>
4+
15
<p>Dear <%= @signature.name %>,</p>
26

37
<p>You recently created the petition "<%= @petition.action %>":<br />
@@ -9,4 +13,6 @@
913
<%= t("petitions.emails.signoff_prefix") %><br />
1014
<%= t("petitions.emails.signoff_suffix") %></p>
1115

12-
<p><small>You’re receiving this email because you created this petition. <%= link_to 'Unsubscribe', unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
16+
<hr>
17+
<p><small>You’re receiving this email because you created this petition.</small></p>
18+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>

app/views/petition_mailer/email_creator.text.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
You’re receiving this email because you created this petition.
2+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
3+
--
4+
15
Dear <%= @signature.name %>,
26

37
You recently created the petition "<%= @petition.action %>":
@@ -9,4 +13,6 @@ Thanks,
913
<%= t("petitions.emails.signoff_prefix") %>
1014
<%= t("petitions.emails.signoff_suffix") %>
1115

12-
You’re receiving this email because you created this petition. Unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
16+
--
17+
You’re receiving this email because you created this petition.
18+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>

app/views/petition_mailer/email_signer.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<p><small>You’re receiving this email because you signed this petition.</small></p>
2+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
3+
<hr>
4+
15
<p>Dear <%= @signature.name %>,</p>
26

37
<p>You recently signed the petition "<%= @petition.action %>":<br />
@@ -9,4 +13,6 @@
913
<%= t("petitions.emails.signoff_prefix") %><br />
1014
<%= t("petitions.emails.signoff_suffix") %></p>
1115

12-
<p><small>You’re receiving this email because you signed this petition. <%= link_to 'Unsubscribe', unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
16+
<hr>
17+
<p><small>You’re receiving this email because you signed this petition.</small></p>
18+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>

app/views/petition_mailer/email_signer.text.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
You’re receiving this email because you signed this petition.
2+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
3+
--
4+
15
Dear <%= @signature.name %>,
26

37
You recently signed the petition "<%= @petition.action %>":
@@ -9,4 +13,6 @@ Thanks,
913
<%= t("petitions.emails.signoff_prefix") %>
1014
<%= t("petitions.emails.signoff_suffix") %>
1115

12-
You’re receiving this email because you signed this petition. Unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
16+
--
17+
You’re receiving this email because you signed this petition.
18+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>

app/views/petition_mailer/notify_creator_of_debate_outcome.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<p><small>You’re receiving this email because you created this petition.</small></p>
2+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
3+
<hr>
4+
15
<p>Dear <%= @signature.name %>,</p>
26

37
<% if @debate_outcome.debated? %>
@@ -32,4 +36,6 @@
3236
<%= t("petitions.emails.signoff_prefix") %><br />
3337
<%= t("petitions.emails.signoff_suffix") %></p>
3438

35-
<p><small>You’re receiving this email because you created this petition. <%= link_to 'Unsubscribe', unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
39+
<hr>
40+
<p><small>You’re receiving this email because you created this petition.</small></p>
41+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>

app/views/petition_mailer/notify_creator_of_debate_outcome.text.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
You’re receiving this email because you created this petition.
2+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
3+
--
4+
15
Dear <%= @signature.name %>,
26

37
<% if @debate_outcome.debated? %>
@@ -33,4 +37,6 @@ Thanks,
3337
<%= t("petitions.emails.signoff_prefix") %>
3438
<%= t("petitions.emails.signoff_suffix") %>
3539

36-
You’re receiving this email because you created this petition. Unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
40+
--
41+
You’re receiving this email because you created this petition.
42+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>

app/views/petition_mailer/notify_creator_of_debate_scheduled.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<p><small>You’re receiving this email because you created this petition.</small></p>
2+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
3+
<hr>
4+
15
<p>Dear <%= @signature.name %>,</p>
26

37
<p>Parliament is going to debate your petition – “<%= @petition.action %>”.</p>
@@ -12,4 +16,6 @@
1216
<%= t("petitions.emails.signoff_prefix") %><br />
1317
<%= t("petitions.emails.signoff_suffix") %></p>
1418

15-
<p><small>You’re receiving this email because you created this petition. <%= link_to 'Unsubscribe', unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
19+
<hr>
20+
<p><small>You’re receiving this email because you created this petition.</small></p>
21+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>

app/views/petition_mailer/notify_creator_of_debate_scheduled.text.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
You’re receiving this email because you created this petition.
2+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
3+
--
4+
15
Dear <%= @signature.name %>,
26

37
Parliament is going to debate your petition – "<%= @petition.action %>".
@@ -12,4 +16,6 @@ Thanks,
1216
<%= t("petitions.emails.signoff_prefix") %>
1317
<%= t("petitions.emails.signoff_suffix") %>
1418

15-
You’re receiving this email because you created this petition. Unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
19+
--
20+
You’re receiving this email because you created this petition.
21+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>

app/views/petition_mailer/notify_creator_of_threshold_response.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<p><small>You’re receiving this email because you created this petition.</small></p>
2+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
3+
<hr>
4+
15
<p>Dear <%= @signature.name %>,</p>
26

37
<p>The Government has responded to your petition – “<%= link_to @petition.action, petition_url(@petition) %>”.</p>
@@ -24,4 +28,6 @@
2428
<%= t("petitions.emails.signoff_prefix") %><br />
2529
<%= t("petitions.emails.signoff_suffix") %></p>
2630

27-
<p><small>You’re receiving this email because you created this petition. <%= link_to 'Unsubscribe', unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>
31+
<hr>
32+
<p><small>You’re receiving this email because you created this petition.</small></p>
33+
<p><small>To unsubscribe: <%= link_to nil, unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %></small></p>

app/views/petition_mailer/notify_creator_of_threshold_response.text.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
You’re receiving this email because you created this petition.
2+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
3+
--
4+
15
Dear <%= @signature.name %>,
26

37
The Government has responded to your petition – "<%= @petition.action %>".
@@ -24,4 +28,6 @@ Thanks,
2428
<%= t("petitions.emails.signoff_prefix") %>
2529
<%= t("petitions.emails.signoff_suffix") %>
2630

27-
You’re receiving this email because you created this petition. Unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>
31+
--
32+
You’re receiving this email because you created this petition.
33+
To unsubscribe: <%= unsubscribe_signature_url(@signature, @signature.unsubscribe_token) %>

0 commit comments

Comments
 (0)