Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <acroitor@gitlab.com>2019-02-20 18:18:15 +0300
committerAlexandru Croitor <acroitor@gitlab.com>2019-02-27 23:07:50 +0300
commit77985826d94454514c40b8da926e13b3b3791841 (patch)
tree00da4c2f5b72001e38b56e9d994cabc278ec0d7c /app/helpers/appearances_helper.rb
parent177f9ca88b4d080e91b6c4ce2bba04d2fba95c07 (diff)
Show header and footer system messages in email
* Add email_header_and_footer_enabled flag to appearances table * Set email_header_and_footer_enabled default value to false * Add checkbox to appearance to toggle show header and footer in emails * Add email_header_and_footer_enabled to allowed params in controller * Add header and footer messages to the html and text email layouts * Remove the color styling for emails header and footer * Add empty_mailer layout for emails without layout, to have the header and footer applied
Diffstat (limited to 'app/helpers/appearances_helper.rb')
-rw-r--r--app/helpers/appearances_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb
index 023e44258b7..c0db9910143 100644
--- a/app/helpers/appearances_helper.rb
+++ b/app/helpers/appearances_helper.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
module AppearancesHelper
+ include MarkupHelper
+
def brand_title
current_appearance&.title.presence || default_brand_title
end
@@ -47,7 +49,7 @@ module AppearancesHelper
class_names = []
class_names << 'with-performance-bar' if performance_bar_enabled?
- render_message(:header_message, class_names)
+ render_message(:header_message, class_names: class_names)
end
def footer_message
@@ -58,10 +60,10 @@ module AppearancesHelper
private
- def render_message(field_sym, class_names = [])
+ def render_message(field_sym, class_names: [], style: message_style)
class_names << field_sym.to_s.dasherize
- content_tag :div, class: class_names, style: message_style do
+ content_tag :div, class: class_names, style: style do
markdown_field(current_appearance, field_sym)
end
end