diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-04-02 17:26:59 +0300 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-02-21 18:55:51 +0300 |
commit | 28e1739a3fd8c93e4805fe0053faf820cec4e1bc (patch) | |
tree | e4f8e3e45155c2410d2e5fb9e3f02be4175acf37 /app/helpers/application_helper.rb | |
parent | c8bf9f78f3e481cb7e74384fa45b46b864fa523a (diff) |
Port EE System Header And Footer feature to CE
remove EE specific code
remove EE licence checks
move migration from EE to CE folder structure
move specs from EE to CE folder structure
remove EE specific flag specs
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9efa84b02f0..ffa5719fefb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -214,12 +214,19 @@ module ApplicationHelper class_names = [] class_names << 'issue-boards-page' if current_controller?(:boards) class_names << 'with-performance-bar' if performance_bar_enabled? - + class_names << system_message_class class_names end - # EE feature: System header and footer, unavailable in CE def system_message_class + class_names = [] + + return class_names unless appearance + + class_names << 'with-system-header' if appearance.show_header? + class_names << 'with-system-footer' if appearance.show_footer? + + class_names end # Returns active css class when condition returns true @@ -292,4 +299,10 @@ module ApplicationHelper snippets: snippets_project_autocomplete_sources_path(object) } end + + private + + def appearance + ::Appearance.current + end end |