2018-12-07 14:24:37 +00:00
|
|
|
<% note = local_assigns.fetch(:note, @note) -%>
|
|
|
|
<% diff_limit = local_assigns.fetch(:diff_limit, nil) -%>
|
2019-03-25 10:28:07 +00:00
|
|
|
<% target_url = local_assigns.fetch(:target_url, @target_url) -%>
|
2019-04-19 18:10:52 +00:00
|
|
|
<% discussion = note.discussion if note.part_of_discussion? -%>
|
2018-12-07 14:24:37 +00:00
|
|
|
|
2019-04-19 18:10:52 +00:00
|
|
|
<%= sanitize_name(note.author_name) -%>
|
|
|
|
<% if discussion.nil? -%>
|
|
|
|
<%= 'commented' -%>:
|
|
|
|
<% else -%>
|
2019-11-21 09:06:16 +00:00
|
|
|
<% if note.start_of_discussion? -%>
|
2019-04-19 18:10:52 +00:00
|
|
|
<%= 'started a new discussion' -%>
|
2017-03-16 00:14:58 +00:00
|
|
|
<% else -%>
|
2019-04-19 18:10:52 +00:00
|
|
|
<%= 'commented on a discussion' -%>
|
2017-03-16 00:14:58 +00:00
|
|
|
<% end -%>
|
2017-03-31 03:06:09 +00:00
|
|
|
<% if discussion.diff_discussion? -%>
|
2019-04-19 18:10:52 +00:00
|
|
|
<%= "on #{discussion.file_path}" -%>
|
2017-03-16 00:14:58 +00:00
|
|
|
<% end -%>
|
2019-04-19 18:10:52 +00:00
|
|
|
<%= ':' -%>
|
|
|
|
<%= " #{target_url}" -%>
|
|
|
|
<% end -%>
|
2017-03-16 00:14:58 +00:00
|
|
|
|
|
|
|
|
2018-12-20 14:25:31 +00:00
|
|
|
<% if discussion&.diff_discussion? && discussion.on_text? -%>
|
2018-12-07 14:24:37 +00:00
|
|
|
<% discussion.truncated_diff_lines(highlight: false, diff_limit: diff_limit).each do |line| -%>
|
2017-03-16 00:14:58 +00:00
|
|
|
<%= "> #{line.text}\n" -%>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<% end -%>
|
2018-12-07 14:24:37 +00:00
|
|
|
<%= note.note -%>
|