diff options
author | Alexandru Croitor <acroitor@gitlab.com> | 2019-02-20 17:18:15 +0200 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-02-27 22:07:50 +0200 |
commit | 77985826d94454514c40b8da926e13b3b3791841 (patch) | |
tree | 00da4c2f5b72001e38b56e9d994cabc278ec0d7c /app/mailers | |
parent | 177f9ca88b4d080e91b6c4ce2bba04d2fba95c07 (diff) | |
download | gitlab-ce-77985826d94454514c40b8da926e13b3b3791841.tar.gz |
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/mailers')
-rw-r--r-- | app/mailers/abuse_report_mailer.rb | 4 | ||||
-rw-r--r-- | app/mailers/email_rejection_mailer.rb | 4 | ||||
-rw-r--r-- | app/mailers/repository_check_mailer.rb | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/app/mailers/abuse_report_mailer.rb b/app/mailers/abuse_report_mailer.rb index e032f568913..e0aa66e6de3 100644 --- a/app/mailers/abuse_report_mailer.rb +++ b/app/mailers/abuse_report_mailer.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true class AbuseReportMailer < BaseMailer + layout 'empty_mailer' + + helper EmailsHelper + def notify(abuse_report_id) return unless deliverable? diff --git a/app/mailers/email_rejection_mailer.rb b/app/mailers/email_rejection_mailer.rb index 45fc5a6c383..d743533b1bc 100644 --- a/app/mailers/email_rejection_mailer.rb +++ b/app/mailers/email_rejection_mailer.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true class EmailRejectionMailer < BaseMailer + layout 'empty_mailer' + + helper EmailsHelper + def rejection(reason, original_raw, can_retry = false) @reason = reason @original_message = Mail::Message.new(original_raw) diff --git a/app/mailers/repository_check_mailer.rb b/app/mailers/repository_check_mailer.rb index 145169be8a6..a24d3476d0e 100644 --- a/app/mailers/repository_check_mailer.rb +++ b/app/mailers/repository_check_mailer.rb @@ -2,6 +2,10 @@ class RepositoryCheckMailer < BaseMailer # rubocop: disable CodeReuse/ActiveRecord + layout 'empty_mailer' + + helper EmailsHelper + def notify(failed_count) @message = if failed_count == 1 |