2017-03-31 17:52:38 -04:00
|
|
|
<% discussion = @note.discussion if @note.part_of_discussion? -%>
|
2017-03-30 23:06:09 -04:00
|
|
|
<% if discussion && !discussion.individual_note? -%>
|
2017-03-15 20:14:58 -04:00
|
|
|
<%= @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 -%>
|
|
|
|
<%= ":" -%>
|
|
|
|
|
|
|
|
|
|
|
|
<% elsif current_application_settings.email_author_in_body -%>
|
|
|
|
<%= "#{@note.author_name} commented:" -%>
|
|
|
|
|
|
|
|
|
|
|
|
<% end -%>
|
2017-03-30 23:06:09 -04:00
|
|
|
<% if discussion&.diff_discussion? -%>
|
|
|
|
<% discussion.truncated_diff_lines(highlight: false).each do |line| -%>
|
2017-03-15 20:14:58 -04:00
|
|
|
<%= "> #{line.text}\n" -%>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<% end -%>
|
|
|
|
<%= @note.note -%>
|