summaryrefslogtreecommitdiff
path: root/app/views/notify/_note_email.text.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/notify/_note_email.text.erb')
-rw-r--r--app/views/notify/_note_email.text.erb26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/notify/_note_email.text.erb b/app/views/notify/_note_email.text.erb
new file mode 100644
index 00000000000..cb2e7fab6d5
--- /dev/null
+++ b/app/views/notify/_note_email.text.erb
@@ -0,0 +1,26 @@
+<% 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 current_application_settings.email_author_in_body -%>
+<%= "#{@note.author_name} commented:" -%>
+
+
+<% end -%>
+<% if discussion&.diff_discussion? -%>
+<% discussion.truncated_diff_lines(highlight: false).each do |line| -%>
+<%= "> #{line.text}\n" -%>
+<% end -%>
+
+<% end -%>
+<%= @note.note -%>