summaryrefslogtreecommitdiff
path: root/app/views/notify/_note_email.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-15 18:14:58 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commitf6f6aaf593dc40c79b8e3536f5e2821c96b9dcd3 (patch)
tree2291c4c92889f11e1bdbabe640205debb1e88029 /app/views/notify/_note_email.html.haml
parent76aa0bedd7ed3aaaeab9402b78261917df66de10 (diff)
downloadgitlab-ce-f6f6aaf593dc40c79b8e3536f5e2821c96b9dcd3.tar.gz
Better notification emails for notes and (diff) discussions
Diffstat (limited to 'app/views/notify/_note_email.html.haml')
-rw-r--r--app/views/notify/_note_email.html.haml36
1 files changed, 36 insertions, 0 deletions
diff --git a/app/views/notify/_note_email.html.haml b/app/views/notify/_note_email.html.haml
new file mode 100644
index 00000000000..8b139a150b7
--- /dev/null
+++ b/app/views/notify/_note_email.html.haml
@@ -0,0 +1,36 @@
+- if @discussion
+ %p.details
+ = succeed ':' do
+ = link_to @note.author_name, user_url(@note.author)
+
+ - if @discussion.diff_discussion?
+ - if @discussion.new_discussion?
+ started a new discussion
+ - else
+ commented on a discussion
+
+ on #{link_to @discussion.file_path, @target_url}
+ - else
+ - if @discussion.new_discussion?
+ started a new discussion
+ - else
+ commented on a #{link_to 'discussion', @target_url}
+
+- elsif current_application_settings.email_author_in_body
+ %p.details
+ #{link_to @note.author_name, user_url(@note.author)} commented:
+
+- if @discussion&.diff_discussion?
+ = content_for :head do
+ = stylesheet_link_tag 'mailers/highlighted_diff_email'
+
+ %table
+ = render partial: "projects/diffs/line",
+ collection: @discussion.truncated_diff_lines,
+ as: :line,
+ locals: { diff_file: @discussion.diff_file,
+ plain: true,
+ email: true }
+
+%div
+ = markdown(@note.note, pipeline: :email, author: @note.author)