debian-mirror-gitlab/app/views/notify/_note_email.text.erb

30 lines
902 B
Text
Raw Normal View History

2019-02-13 22:33:31 +05:30
<% note = local_assigns.fetch(:note, @note) -%>
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
<% discussion = note.discussion if note.part_of_discussion? -%>
2017-08-17 22:00:37 +05:30
<% if discussion && !discussion.individual_note? -%>
2019-02-13 22:33:31 +05:30
<%= sanitize_name(note.author_name) -%>
2017-08-17 22:00:37 +05:30
<% if discussion.new_discussion? -%>
<%= " started a new discussion" -%>
<% else -%>
<%= " commented on a discussion" -%>
<% end -%>
<% if discussion.diff_discussion? -%>
<%= " on #{discussion.file_path}" -%>
<% end -%>
<%= ":" -%>
2018-03-17 18:26:18 +05:30
<% elsif Gitlab::CurrentSettings.email_author_in_body -%>
2019-02-13 22:33:31 +05:30
<%= "#{sanitize_name(note.author_name)} commented:" -%>
2017-08-17 22:00:37 +05:30
<% end -%>
2019-02-13 22:33:31 +05:30
<% if discussion&.diff_discussion? && discussion.on_text? -%>
<% discussion.truncated_diff_lines(highlight: false, diff_limit: diff_limit).each do |line| -%>
2017-08-17 22:00:37 +05:30
<%= "> #{line.text}\n" -%>
<% end -%>
<% end -%>
2019-02-13 22:33:31 +05:30
<%= note.note -%>