summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-11-11 16:10:24 +0100
committerMarin Jankovski <maxlazio@gmail.com>2014-11-11 16:10:24 +0100
commit3dcb5f8501e6eedb41c5d8a83eff1e3b80822f1d (patch)
treef6711ecd08bbe248fe46d16b2b76774e5f3fe461
parentaf154478675f9e3d970dbd9339e0ed23c23a7eec (diff)
downloadgitlab-ce-3dcb5f8501e6eedb41c5d8a83eff1e3b80822f1d.tar.gz
Include the helper for mailer, add links to emails.
-rw-r--r--app/mailers/notify.rb1
-rw-r--r--app/views/layouts/notify.html.haml1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index bd438bab89a..0ee19836627 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -11,6 +11,7 @@ class Notify < ActionMailer::Base
add_template_helper ApplicationHelper
add_template_helper GitlabMarkdownHelper
add_template_helper MergeRequestsHelper
+ add_template_helper EmailsHelper
default_url_options[:host] = Gitlab.config.gitlab.host
default_url_options[:protocol] = Gitlab.config.gitlab.protocol
diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml
index ab421d63f1a..1236cf00f01 100644
--- a/app/views/layouts/notify.html.haml
+++ b/app/views/layouts/notify.html.haml
@@ -28,3 +28,4 @@
You're receiving this notification because you are a member of the #{link_to_unless @target_url, @project.name_with_namespace, project_url(@project)} project team.
- if @target_url
#{link_to "View it on GitLab", @target_url}
+ = email_action name: "View #{@note.noteable_type.underscore.humanize}", url: @target_url