summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-02-07 16:06:27 +0100
committerAlexis Reigel <mail@koffeinfrei.org>2017-02-22 12:22:52 +0100
commit0df104a389438665df2c7248ae022cdbb767f838 (patch)
tree7a63da8cba5f7916c96a5d90e34a7ac777cea31c /app
parentf0766fdefaeadcc526d6a87e29b65f5bf7b26318 (diff)
downloadgitlab-ce-0df104a389438665df2c7248ae022cdbb767f838.tar.gz
use custom brand logo in pipeline mails
Diffstat (limited to 'app')
-rw-r--r--app/helpers/emails_helper.rb14
-rw-r--r--app/views/layouts/mailer.html.haml2
2 files changed, 15 insertions, 1 deletions
diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb
index 2843ad96efa..3beddff9206 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,16 @@ 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?
+ brand_header_logo
+ else
+ image_tag(
+ image_url('mailers/gitlab_header_logo.gif'),
+ size: "55x50",
+ alt: "GitLab"
+ )
+ end
+ end
end
diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml
index 39133f8cdb3..53268cc22f8 100644
--- a/app/views/layouts/mailer.html.haml
+++ b/app/views/layouts/mailer.html.haml
@@ -48,7 +48,7 @@
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" }  
%tr.header
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" }
- %img{ alt: "GitLab", height: "50", src: image_url('mailers/gitlab_header_logo.gif'), width: "55" }/
+ = header_logo
%tr
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" }
%table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" }