gitlab-org--gitlab-foss/app/views/notify/_note_email.text.erb
Frank van Rest df4c1a75de Uniform html and text emails
Uniform new_issue_email html and text emails
Uniform note_email html and text emails
Uniform new_merge_request_email html and text emails
2019-06-21 13:48:43 +03:00

29 lines
876 B
Text

<% note = local_assigns.fetch(:note, @note) -%>
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
<% target_url = local_assigns.fetch(:target_url, @target_url) -%>
<% discussion = note.discussion if note.part_of_discussion? -%>
<%= sanitize_name(note.author_name) -%>
<% if discussion.nil? -%>
<%= 'commented' -%>:
<% else -%>
<% if discussion.new_discussion? -%>
<%= 'started a new discussion' -%>
<% else -%>
<%= 'commented on a discussion' -%>
<% end -%>
<% if discussion.diff_discussion? -%>
<%= "on #{discussion.file_path}" -%>
<% end -%>
<%= ':' -%>
<%= " #{target_url}" -%>
<% end -%>
<% if discussion&.diff_discussion? && discussion.on_text? -%>
<% discussion.truncated_diff_lines(highlight: false, diff_limit: diff_limit).each do |line| -%>
<%= "> #{line.text}\n" -%>
<% end -%>
<% end -%>
<%= note.note -%>