From c1e94479bd565a3deebe7452f186815157082cbb Mon Sep 17 00:00:00 2001
From: Alexis Reigel <mail@koffeinfrei.org>
Date: Fri, 17 Feb 2017 10:05:13 +0100
Subject: [PATCH] restrict height of the custom brand logo in emails

---
 app/helpers/emails_helper.rb       | 5 ++++-
 spec/helpers/emails_helper_spec.rb | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb
index 3beddff920..a6d9e37ac7 100644
--- a/app/helpers/emails_helper.rb
+++ b/app/helpers/emails_helper.rb
@@ -54,7 +54,10 @@ module EmailsHelper
 
   def header_logo
     if brand_item && brand_item.header_logo?
-      brand_header_logo
+      image_tag(
+        brand_item.header_logo,
+        style: 'height: 50px'
+      )
     else
       image_tag(
         image_url('mailers/gitlab_header_logo.gif'),
diff --git a/spec/helpers/emails_helper_spec.rb b/spec/helpers/emails_helper_spec.rb
index b9519e387e..cd112dbb2f 100644
--- a/spec/helpers/emails_helper_spec.rb
+++ b/spec/helpers/emails_helper_spec.rb
@@ -52,7 +52,7 @@ describe EmailsHelper do
         )
 
         expect(header_logo).to eq(
-          %{<img src="/uploads/appearance/header_logo/#{appearance.id}/dk.png" alt="Dk" />}
+          %{<img style="height: 50px" src="/uploads/appearance/header_logo/#{appearance.id}/dk.png" alt="Dk" />}
         )
       end
     end
-- 
2.30.9