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

30 lines
876 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) -%>
2019-09-30 21:07:59 +05:30
<% discussion = note.discussion if note.part_of_discussion? -%>
2019-02-15 15:39:39 +05:30
2019-09-30 21:07:59 +05:30
<%= sanitize_name(note.author_name) -%>
<% if discussion.nil? -%>
<%= 'commented' -%>:
<% else -%>
2017-08-17 22:00:37 +05:30
<% if discussion.new_discussion? -%>
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 -%>