diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/appearances_helper.rb | 16 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/helpers/emails_helper.rb | 4 |
3 files changed, 14 insertions, 10 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 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 701be97ee96..86ec500ceb3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -285,6 +285,10 @@ module ApplicationHelper class_names end + # EE feature: System header and footer, unavailable in CE + def system_message_class + end + # Returns active css class when condition returns true # otherwise returns nil. # diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb index 4ddc1dbed49..c86a26ac30f 100644 --- a/app/helpers/emails_helper.rb +++ b/app/helpers/emails_helper.rb @@ -54,9 +54,9 @@ module EmailsHelper end def header_logo - if brand_item && brand_item.header_logo? + if current_appearance&.header_logo? image_tag( - brand_item.header_logo, + current_appearance.header_logo, style: 'height: 50px' ) else |