2018-12-07 09:24:37 -05:00
|
|
|
- note = local_assigns.fetch(:note, @note)
|
|
|
|
- diff_limit = local_assigns.fetch(:diff_limit, nil)
|
|
|
|
- target_url = local_assigns.fetch(:target_url, @target_url)
|
|
|
|
- note_style = local_assigns.fetch(:note_style, "")
|
|
|
|
|
|
|
|
- discussion = note.discussion if note.part_of_discussion?
|
2017-11-09 14:59:39 -05:00
|
|
|
|
2019-04-19 14:10:52 -04:00
|
|
|
%p{ style: "color: #777777;" }
|
|
|
|
= succeed ':' do
|
|
|
|
= link_to note.author_name, user_url(note.author)
|
|
|
|
- if discussion.nil?
|
|
|
|
commented
|
|
|
|
- else
|
|
|
|
- if discussion.new_discussion?
|
|
|
|
started a new
|
|
|
|
- else
|
|
|
|
commented on a
|
2017-03-15 20:14:58 -04:00
|
|
|
|
2018-12-20 09:26:07 -05:00
|
|
|
- if discussion&.diff_discussion?
|
2019-04-19 14:10:52 -04:00
|
|
|
discussion on #{link_to(discussion.file_path, target_url)}
|
2017-03-15 20:14:58 -04:00
|
|
|
- else
|
2019-04-19 14:10:52 -04:00
|
|
|
= link_to 'discussion', target_url
|
2017-03-15 20:14:58 -04:00
|
|
|
|
2018-12-20 09:26:07 -05:00
|
|
|
- if discussion&.diff_discussion? && discussion.on_text?
|
2017-03-15 20:14:58 -04:00
|
|
|
= content_for :head do
|
|
|
|
= stylesheet_link_tag 'mailers/highlighted_diff_email'
|
|
|
|
|
|
|
|
%table
|
|
|
|
= render partial: "projects/diffs/line",
|
2018-12-07 09:24:37 -05:00
|
|
|
collection: discussion.truncated_diff_lines(diff_limit: diff_limit),
|
2017-03-15 20:14:58 -04:00
|
|
|
as: :line,
|
2017-03-30 23:06:09 -04:00
|
|
|
locals: { diff_file: discussion.diff_file,
|
2017-03-15 20:14:58 -04:00
|
|
|
plain: true,
|
|
|
|
email: true }
|
|
|
|
|
2018-12-07 09:24:37 -05:00
|
|
|
%div{ style: note_style }
|
|
|
|
= markdown(note.note, pipeline: :email, author: note.author)
|