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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
972 B
Text
Raw Normal View History

2019-02-15 15:39:39 +05:30
<% note = local_assigns.fetch(:note, @note) -%>
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
2019-07-07 11:18:12 +05:30
<% target_url = local_assigns.fetch(:target_url, @target_url) -%>
2022-06-21 17:19:12 +05:30
<% author = local_assigns.fetch(:author) { note.author } -%>
<% discussion = local_assigns.fetch(:discussion) { note.discussion } if note.part_of_discussion? -%>
2019-02-15 15:39:39 +05:30
2022-06-21 17:19:12 +05:30
<%= sanitize_name(author.name) -%>
2019-09-30 21:07:59 +05:30
<% if discussion.nil? -%>
<%= 'commented' -%>:
<% else -%>
2022-06-21 17:19:12 +05:30
<% if discussion.first_note == note -%>
2019-09-30 21:07:59 +05:30
<%= 'started a new discussion' -%>
2017-08-17 22:00:37 +05:30
<% else -%>
2019-09-30 21:07:59 +05:30
<%= 'commented on a discussion' -%>
2017-08-17 22:00:37 +05:30
<% end -%>
<% if discussion.diff_discussion? -%>
2019-09-30 21:07:59 +05:30
<%= "on #{discussion.file_path}" -%>
2017-08-17 22:00:37 +05:30
<% end -%>
2019-09-30 21:07:59 +05:30
<%= ':' -%>
<%= " #{target_url}" -%>
<% end -%>
2017-08-17 22:00:37 +05:30
2019-02-15 15:39:39 +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-15 15:39:39 +05:30
<%= note.note -%>