37 lines
1.2 KiB
Text
37 lines
1.2 KiB
Text
- 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?
|
|
|
|
%p{ style: "color: #777777;" }
|
|
= succeed ':' do
|
|
= link_to note.author_name, user_url(note.author)
|
|
- if discussion.nil?
|
|
= link_to 'commented', target_url
|
|
- else
|
|
- if note.start_of_discussion?
|
|
started a new
|
|
- else
|
|
commented on a
|
|
|
|
- if discussion&.diff_discussion?
|
|
discussion on #{link_to(discussion.file_path, target_url)}
|
|
- else
|
|
= link_to 'discussion', target_url
|
|
|
|
- if discussion&.diff_discussion? && discussion.on_text?
|
|
= content_for :head do
|
|
= stylesheet_link_tag 'mailers/highlighted_diff_email'
|
|
|
|
%table
|
|
= render partial: "projects/diffs/line",
|
|
collection: discussion.truncated_diff_lines(diff_limit: diff_limit),
|
|
as: :line,
|
|
locals: { diff_file: discussion.diff_file,
|
|
plain: true,
|
|
email: true }
|
|
|
|
%div{ style: note_style }
|
|
= markdown(note.note, pipeline: :email, author: note.author)
|