2018-12-07 09:24:37 -05:00
|
|
|
<% note = local_assigns.fetch(:note, @note) -%>
|
|
|
|
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
|
|
|
|
|
|
|
|
<% discussion = note.discussion if note.part_of_discussion? -%>
|
2017-03-30 23:06:09 -04:00
|
|
|
<% if discussion && !discussion.individual_note? -%>
|
2019-01-15 09:22:26 -05:00
|
|
|
<%= sanitize_name(note.author_name) -%>
|
2017-03-30 23:06:09 -04:00
|
|
|
<% if discussion.new_discussion? -%>
|
2017-03-15 20:14:58 -04:00
|
|
|
<%= " started a new discussion" -%>
|
|
|
|
<% else -%>
|
|
|
|
<%= " commented on a discussion" -%>
|
|
|
|
<% end -%>
|
2017-03-30 23:06:09 -04:00
|
|
|
<% if discussion.diff_discussion? -%>
|
|
|
|
<%= " on #{discussion.file_path}" -%>
|
2017-03-15 20:14:58 -04:00
|
|
|
<% end -%>
|
|
|
|
<%= ":" -%>
|
|
|
|
|
|
|
|
|
2018-02-02 13:39:55 -05:00
|
|
|
<% elsif Gitlab::CurrentSettings.email_author_in_body -%>
|
2019-01-15 09:22:26 -05:00
|
|
|
<%= "#{sanitize_name(note.author_name)} commented:" -%>
|
2017-03-15 20:14:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
<% end -%>
|
2018-12-20 09:25:31 -05:00
|
|
|
<% if discussion&.diff_discussion? && discussion.on_text? -%>
|
2018-12-07 09:24:37 -05:00
|
|
|
<% discussion.truncated_diff_lines(highlight: false, diff_limit: diff_limit).each do |line| -%>
|
2017-03-15 20:14:58 -04:00
|
|
|
<%= "> #{line.text}\n" -%>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<% end -%>
|
2018-12-07 09:24:37 -05:00
|
|
|
<%= note.note -%>
|