summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-02-22 16:20:46 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-02-22 16:20:46 +0000
commit475715f18f03ff059618b42b3ecdf162cb419403 (patch)
tree334510d97b8460f3bd03260f414d9ffef9c3cde3 /app/helpers
parent4753368d2f1bb62eab76bb3276f0859f8eec140d (diff)
parentc1e94479bd565a3deebe7452f186815157082cbb (diff)
downloadgitlab-ce-475715f18f03ff059618b42b3ecdf162cb419403.tar.gz
Merge branch 'feature/brand-logo-in-emails' into 'master'
Custom brand header logo in emails Closes #24969 and #25570 See merge request !9049
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/emails_helper.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb
index 2843ad96efa..a6d9e37ac76 100644
--- a/app/helpers/emails_helper.rb
+++ b/app/helpers/emails_helper.rb
@@ -1,4 +1,6 @@
module EmailsHelper
+ include AppearancesHelper
+
# Google Actions
# https://developers.google.com/gmail/markup/reference/go-to-action
def email_action(url)
@@ -49,4 +51,19 @@ module EmailsHelper
msg = "This link is valid for #{password_reset_token_valid_time}. "
msg << "After it expires, you can #{link_tag}."
end
+
+ def header_logo
+ if brand_item && brand_item.header_logo?
+ image_tag(
+ brand_item.header_logo,
+ style: 'height: 50px'
+ )
+ else
+ image_tag(
+ image_url('mailers/gitlab_header_logo.gif'),
+ size: "55x50",
+ alt: "GitLab"
+ )
+ end
+ end
end