Add offer_unsupscription parameter to emails
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ea76805a90
commit
f9ddeb80fb
|
@ -20,6 +20,7 @@ defmodule Mobilizon.Web.Email do
|
||||||
|> maybe_put_message_id()
|
|> maybe_put_message_id()
|
||||||
|> assign(:jsonLDMetadata, nil)
|
|> assign(:jsonLDMetadata, nil)
|
||||||
|> assign(:instance_name, Config.instance_name())
|
|> assign(:instance_name, Config.instance_name())
|
||||||
|
|> assign(:offer_unsupscription, true)
|
||||||
|> put_html_layout({EmailView, "email.html"})
|
|> put_html_layout({EmailView, "email.html"})
|
||||||
|> put_text_layout({EmailView, "email.text"})
|
|> put_text_layout({EmailView, "email.text"})
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,6 +34,7 @@ defmodule Mobilizon.Web.Email.User do
|
||||||
|> assign(:locale, locale)
|
|> assign(:locale, locale)
|
||||||
|> assign(:token, confirmation_token)
|
|> assign(:token, confirmation_token)
|
||||||
|> assign(:subject, subject)
|
|> assign(:subject, subject)
|
||||||
|
|> assign(:offer_unsupscription, false)
|
||||||
|> render(:registration_confirmation)
|
|> render(:registration_confirmation)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,6 +55,7 @@ defmodule Mobilizon.Web.Email.User do
|
||||||
|> assign(:locale, locale)
|
|> assign(:locale, locale)
|
||||||
|> assign(:token, reset_password_token)
|
|> assign(:token, reset_password_token)
|
||||||
|> assign(:subject, subject)
|
|> assign(:subject, subject)
|
||||||
|
|> assign(:offer_unsupscription, false)
|
||||||
|> render(:password_reset)
|
|> render(:password_reset)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -161,6 +163,7 @@ defmodule Mobilizon.Web.Email.User do
|
||||||
|> assign(:locale, user_locale)
|
|> assign(:locale, user_locale)
|
||||||
|> assign(:subject, subject)
|
|> assign(:subject, subject)
|
||||||
|> assign(:new_email, unconfirmed_email)
|
|> assign(:new_email, unconfirmed_email)
|
||||||
|
|> assign(:offer_unsupscription, false)
|
||||||
|> render(:email_changed_old)
|
|> render(:email_changed_old)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -181,6 +184,7 @@ defmodule Mobilizon.Web.Email.User do
|
||||||
|> assign(:locale, user_locale)
|
|> assign(:locale, user_locale)
|
||||||
|> assign(:subject, subject)
|
|> assign(:subject, subject)
|
||||||
|> assign(:token, confirmation_token)
|
|> assign(:token, confirmation_token)
|
||||||
|
|> assign(:offer_unsupscription, false)
|
||||||
|> render(:email_changed_new)
|
|> render(:email_changed_new)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,11 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#ECEBF2" align="center" style="padding: 30px 30px 30px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
|
<td bgcolor="#ECEBF2" align="center" style="padding: 30px 30px 30px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 18px;" >
|
||||||
<p style="margin: 0;">
|
<p style="margin: 0;">
|
||||||
|
<%= if @offer_unsupscription do %>
|
||||||
|
<a href={"#{Mobilizon.Web.Endpoint.url()}/settings/notifications"}>
|
||||||
|
<%= gettext("Manage your notification settings") %>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
<%= gettext("<b>%{instance}</b> is powered by Mobilizon.", instance: @instance_name) |> raw %><br />
|
<%= gettext("<b>%{instance}</b> is powered by Mobilizon.", instance: @instance_name) |> raw %><br />
|
||||||
<a href="https://joinmobilizon.org"><%= gettext "Learn more about Mobilizon here!" %></a>
|
<a href="https://joinmobilizon.org"><%= gettext "Learn more about Mobilizon here!" %></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue