diff options
author | André Luís <me@andr3.net> | 2018-04-02 14:27:12 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-04-02 14:27:12 +0000 |
commit | f8049f4e266417e19a814121923a1e4260a3217d (patch) | |
tree | 66114ddbc7ff0aff89e2134e5b2ead4e44e1f595 /app/helpers/appearances_helper.rb | |
parent | 712da68badb68ddcc7361091c01f32a56fe1186e (diff) | |
download | gitlab-ce-f8049f4e266417e19a814121923a1e4260a3217d.tar.gz |
Backport changes in EE MR 4972: System Header and Footer
Diffstat (limited to 'app/helpers/appearances_helper.rb')
-rw-r--r-- | app/helpers/appearances_helper.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb index c037de33c22..f48db024e3f 100644 --- a/app/helpers/appearances_helper.rb +++ b/app/helpers/appearances_helper.rb @@ -1,27 +1,27 @@ module AppearancesHelper def brand_title - brand_item&.title.presence || 'GitLab Community Edition' + current_appearance&.title.presence || 'GitLab Community Edition' end def brand_image - image_tag(brand_item.logo) if brand_item&.logo? + image_tag(current_appearance.logo) if current_appearance&.logo? end def brand_text - markdown_field(brand_item, :description) + markdown_field(current_appearance, :description) end def brand_new_project_guidelines - markdown_field(brand_item, :new_project_guidelines) + markdown_field(current_appearance, :new_project_guidelines) end - def brand_item + def current_appearance @appearance ||= Appearance.current end def brand_header_logo - if brand_item&.header_logo? - image_tag brand_item.header_logo + if current_appearance&.header_logo? + image_tag current_appearance.header_logo else render 'shared/logo.svg' end @@ -29,7 +29,7 @@ module AppearancesHelper # Skip the 'GitLab' type logo when custom brand logo is set def brand_header_logo_type - unless brand_item&.header_logo? + unless current_appearance&.header_logo? render 'shared/logo_type.svg' end end |