summaryrefslogtreecommitdiff
path: root/app/views/notify/_note_email.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/notify/_note_email.html.haml')
-rw-r--r--app/views/notify/_note_email.html.haml17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/views/notify/_note_email.html.haml b/app/views/notify/_note_email.html.haml
index 8b139a150b7..9e5aaed6f49 100644
--- a/app/views/notify/_note_email.html.haml
+++ b/app/views/notify/_note_email.html.haml
@@ -1,17 +1,18 @@
-- if @discussion
+- discussion = @note.discussion unless @discussion.individual_note?
+- if discussion
%p.details
= succeed ':' do
= link_to @note.author_name, user_url(@note.author)
- - if @discussion.diff_discussion?
- - if @discussion.new_discussion?
+ - 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}
+ on #{link_to discussion.file_path, @target_url}
- else
- - if @discussion.new_discussion?
+ - if discussion.new_discussion?
started a new discussion
- else
commented on a #{link_to 'discussion', @target_url}
@@ -20,15 +21,15 @@
%p.details
#{link_to @note.author_name, user_url(@note.author)} commented:
-- if @discussion&.diff_discussion?
+- 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,
+ collection: discussion.truncated_diff_lines,
as: :line,
- locals: { diff_file: @discussion.diff_file,
+ locals: { diff_file: discussion.diff_file,
plain: true,
email: true }