Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre de La Morinerie <pierre@capitainetrain.com>2014-02-18 14:12:01 +0400
committerPierre de La Morinerie <pierre@capitainetrain.com>2014-03-03 19:58:44 +0400
commit7ba0b502d3e6fdc5efc5619d803a1b9fcf9db791 (patch)
tree7dab84048b9c766ad52c2e2349dd8535d6b99409 /app/mailers/emails/profile.rb
parent03920b96d01ea4f5267c7ccd1aa036eab17d62b4 (diff)
Add a "View in GitLab" link in notification emails
When an email notification concerns a specific object (issue, note, merge request, etc.), add a link to the footer of the email that opens the item's page in a web browser. Rationale: * The link is predictable: always the same text, always at the same location, like any reliable tool. * It allows to remove the inline-title in many emails, and leave only the actual content of the message.
Diffstat (limited to 'app/mailers/emails/profile.rb')
-rw-r--r--app/mailers/emails/profile.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb
index c91660a02b5..f02d95fd557 100644
--- a/app/mailers/emails/profile.rb
+++ b/app/mailers/emails/profile.rb
@@ -3,6 +3,7 @@ module Emails
def new_user_email(user_id, password)
@user = User.find(user_id)
@password = password
+ @target_url = user_url(@user)
mail(to: @user.email, subject: subject("Account was created for you"))
end
@@ -15,6 +16,7 @@ module Emails
def new_ssh_key_email(key_id)
@key = Key.find(key_id)
@user = @key.user
+ @target_url = user_url(@user)
mail(to: @user.email, subject: subject("SSH key was added to your account"))
end
end