7385e7cd47
The EE merge request can be found here: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8442
29 lines
849 B
Text
29 lines
849 B
Text
<% note = local_assigns.fetch(:note, @note) -%>
|
|
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
|
|
|
|
<% discussion = note.discussion if note.part_of_discussion? -%>
|
|
<% if discussion && !discussion.individual_note? -%>
|
|
<%= note.author_name -%>
|
|
<% if discussion.new_discussion? -%>
|
|
<%= " started a new discussion" -%>
|
|
<% else -%>
|
|
<%= " commented on a discussion" -%>
|
|
<% end -%>
|
|
<% if discussion.diff_discussion? -%>
|
|
<%= " on #{discussion.file_path}" -%>
|
|
<% end -%>
|
|
<%= ":" -%>
|
|
|
|
|
|
<% elsif Gitlab::CurrentSettings.email_author_in_body -%>
|
|
<%= "#{note.author_name} commented:" -%>
|
|
|
|
|
|
<% end -%>
|
|
<% if discussion&.diff_discussion? -%>
|
|
<% discussion.truncated_diff_lines(highlight: false, diff_limit: diff_limit).each do |line| -%>
|
|
<%= "> #{line.text}\n" -%>
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
<%= note.note -%>
|