BigW Consortium Gitlab

_note_email.text.erb 728 Bytes
Newer Older
Douwe Maan committed
1
<%  discussion = @note.discussion if @note.part_of_discussion? -%>
Douwe Maan committed
2
<%  if discussion && !discussion.individual_note? -%>
3
<%=   @note.author_name -%>
Douwe Maan committed
4
<%    if discussion.new_discussion? -%>
5 6 7 8
<%=     " started a new discussion" -%>
<%    else -%>
<%=     " commented on a discussion" -%>
<%    end -%>
Douwe Maan committed
9 10
<%    if discussion.diff_discussion? -%>
<%=     " on #{discussion.file_path}" -%>
11 12 13 14 15 16 17 18 19
<%    end -%>
<%=   ":" -%>


<%  elsif current_application_settings.email_author_in_body -%>
<%=     "#{@note.author_name} commented:" -%>


<%  end -%>
Douwe Maan committed
20 21
<%  if discussion&.diff_discussion? -%>
<%    discussion.truncated_diff_lines(highlight: false).each do |line| -%>
22 23 24 25 26
<%=     "> #{line.text}\n" -%>
<%    end -%>

<%  end -%>
<%= @note.note -%>