mirror of
https://github.com/discourse/discourse.git
synced 2025-03-29 19:35:43 +08:00
UX: add email to '/email/unsubscribed' page
This commit is contained in:
parent
2ffddfb32c
commit
6e37f09b19
@ -109,15 +109,16 @@ class EmailController < ApplicationController
|
||||
redirect_to :back
|
||||
else
|
||||
if topic
|
||||
redirect_to path("/email/unsubscribed?topic_id=#{topic.id}")
|
||||
redirect_to path("/email/unsubscribed?topic_id=#{topic.id}&email=#{user.email}")
|
||||
else
|
||||
redirect_to path("/email/unsubscribed")
|
||||
redirect_to path("/email/unsubscribed?email=#{user.email}")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def unsubscribed
|
||||
@email = params[:email]
|
||||
@topic = Topic.find_by(id: params[:topic_id].to_i) if params[:topic_id]
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<h2><%=t "unsubscribed.title"%></h2>
|
||||
<br>
|
||||
<p>
|
||||
<%=t("unsubscribed.description", url: path("/my/preferences")).html_safe %>
|
||||
<%=t("unsubscribed.description", email: @email, url: path("/my/preferences")).html_safe %>
|
||||
</p>
|
||||
|
||||
<% if @topic %>
|
||||
|
@ -723,7 +723,7 @@ en:
|
||||
|
||||
unsubscribed:
|
||||
title: "Unsubscribed!"
|
||||
description: "You have been unsubscribed. To change your email settings <a href='%{url}'>visit your user preferences</a>."
|
||||
description: "<b>%{email}</b> has been unsubscribed. To change your email settings <a href='%{url}'>visit your user preferences</a>."
|
||||
topic_description: "To re-subscribe to %{link}, use the notification control at the bottom or right of the topic."
|
||||
|
||||
unsubscribe:
|
||||
|
Loading…
x
Reference in New Issue
Block a user