diff --git a/lib/web/email/email.ex b/lib/web/email/email.ex index 51782d06e..4394b5161 100644 --- a/lib/web/email/email.ex +++ b/lib/web/email/email.ex @@ -20,6 +20,7 @@ defmodule Mobilizon.Web.Email do |> maybe_put_message_id() |> assign(:jsonLDMetadata, nil) |> assign(:instance_name, Config.instance_name()) + |> assign(:offer_unsupscription, true) |> put_html_layout({EmailView, "email.html"}) |> put_text_layout({EmailView, "email.text"}) end diff --git a/lib/web/email/user.ex b/lib/web/email/user.ex index 413fb81b6..6844e3e6e 100644 --- a/lib/web/email/user.ex +++ b/lib/web/email/user.ex @@ -34,6 +34,7 @@ defmodule Mobilizon.Web.Email.User do |> assign(:locale, locale) |> assign(:token, confirmation_token) |> assign(:subject, subject) + |> assign(:offer_unsupscription, false) |> render(:registration_confirmation) end @@ -54,6 +55,7 @@ defmodule Mobilizon.Web.Email.User do |> assign(:locale, locale) |> assign(:token, reset_password_token) |> assign(:subject, subject) + |> assign(:offer_unsupscription, false) |> render(:password_reset) end @@ -161,6 +163,7 @@ defmodule Mobilizon.Web.Email.User do |> assign(:locale, user_locale) |> assign(:subject, subject) |> assign(:new_email, unconfirmed_email) + |> assign(:offer_unsupscription, false) |> render(:email_changed_old) end @@ -181,6 +184,7 @@ defmodule Mobilizon.Web.Email.User do |> assign(:locale, user_locale) |> assign(:subject, subject) |> assign(:token, confirmation_token) + |> assign(:offer_unsupscription, false) |> render(:email_changed_new) end diff --git a/lib/web/templates/email/email.html.heex b/lib/web/templates/email/email.html.heex index 675908d73..61af9051f 100644 --- a/lib/web/templates/email/email.html.heex +++ b/lib/web/templates/email/email.html.heex @@ -145,6 +145,11 @@
+ <%= if @offer_unsupscription do %>
+
+ <%= gettext("Manage your notification settings") %>
+
+ <% end %>
<%= gettext("%{instance} is powered by Mobilizon.", instance: @instance_name) |> raw %>
<%= gettext "Learn more about Mobilizon here!" %>