diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-09 17:12:56 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-09 17:12:56 +0300 |
commit | 706b101f510b9a1f5acff51bb2f1b14c018b37ce (patch) | |
tree | da359ce2b19e26d885e0742bcaf13e5d6d73fea6 /app | |
parent | 80352b783ce359b70879bc7f2d571f219ae45bb1 (diff) | |
parent | 9474e36f462522af1804e760e5fe134f101fce08 (diff) |
Merge branch 'huacnlee/gitlab-ce-feature/option-to-include-author-info-in-mail' into 'master'
Add option to include the sender name in body of Notify email
_Originally opened at !2495 by @huacnlee._
- - -
Fixes #7824.
See merge request !2767
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 1 | ||||
-rw-r--r-- | app/models/application_setting.rb | 1 | ||||
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 10 | ||||
-rw-r--r-- | app/views/notify/_note_message.html.haml | 3 | ||||
-rw-r--r-- | app/views/notify/new_issue_email.html.haml | 3 | ||||
-rw-r--r-- | app/views/notify/new_merge_request_email.html.haml | 3 |
6 files changed, 21 insertions, 0 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 1515086b16d..04a99d8c84a 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -81,6 +81,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :sentry_dsn, :akismet_enabled, :akismet_api_key, + :email_author_in_body, restricted_visibility_levels: [], import_sources: [] ) diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 9cafc78f761..44bbe5fb168 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -43,6 +43,7 @@ # metrics_port :integer default(8089) # sentry_enabled :boolean default(FALSE) # sentry_dsn :string +# email_author_in_body :boolean default(FALSE) # class ApplicationSetting < ActiveRecord::Base diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index b4e3d96d405..b30dfd109ea 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -48,6 +48,16 @@ = f.check_box :version_check_enabled Version check enabled .form-group + .col-sm-offset-2.col-sm-10 + .checkbox + = f.label :email_author_in_body do + = f.check_box :email_author_in_body + Include author name in notification email body + .help-block + Some email servers do not support overriding the email sender name. + Enable this option to include the name of the author of the issue, + merge request or comment in the email body instead. + .form-group = f.label :admin_notification_email, class: 'control-label col-sm-2' .col-sm-10 = f.text_field :admin_notification_email, class: 'form-control' diff --git a/app/views/notify/_note_message.html.haml b/app/views/notify/_note_message.html.haml index 00cb4aa24cc..12ded41fbf2 100644 --- a/app/views/notify/_note_message.html.haml +++ b/app/views/notify/_note_message.html.haml @@ -1,2 +1,5 @@ +- if current_application_settings.email_author_in_body + %div + #{link_to @note.author_name, user_url(@note.author)} wrote: %div = markdown(@note.note, pipeline: :email) diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index d3b799fca23..ad3ab2525bb 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,3 +1,6 @@ +- if current_application_settings.email_author_in_body + %div + #{link_to @issue.author_name, user_url(@issue.author)} wrote: -if @issue.description = markdown(@issue.description, pipeline: :email) diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 90ebdfc3fe2..23423e7d981 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -1,3 +1,6 @@ +- if current_application_settings.email_author_in_body + %div + #{link_to @merge_request.author_name, user_url(@merge_request.author)} wrote: %p.details != merge_path_description(@merge_request, '→') |