Update "newsletter" notification email to add unsubscribe link

This commit is contained in:
taitus
2021-02-01 18:21:16 +01:00
committed by Javi Martín
parent 1fcbd49448
commit 13965901f8
5 changed files with 16 additions and 2 deletions

View File

@@ -2,4 +2,15 @@
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;line-height: 24px;">
<%= auto_link_already_sanitized_html wysiwyg(@newsletter.body) %>
</p>
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 12px;font-weight: normal;line-height: 20px;">
<%= sanitize(t("mailers.config.unsubscribe_text",
notifications: link_to(
t("mailers.config.notifications_link"),
edit_subscriptions_url(token: @token),
style: "color: #2895F1; text-decoration: none;"
),
notification: User.human_attribute_name(:newsletter)
)) %>
</p>
</td>