2019-02-15 15:39:39 +05:30
|
|
|
- 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, "")
|
2022-06-21 17:19:12 +05:30
|
|
|
- include_stylesheet_link = local_assigns.fetch(:include_stylesheet_link, true)
|
2018-03-17 18:26:18 +05:30
|
|
|
|
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?
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2019-09-30 21:07:59 +05:30
|
|
|
%p{ style: "color: #777777;" }
|
|
|
|
= succeed ':' do
|
2022-06-21 17:19:12 +05:30
|
|
|
= link_to author.name, user_url(author)
|
2019-09-30 21:07:59 +05:30
|
|
|
- if discussion.nil?
|
2021-01-29 00:20:46 +05:30
|
|
|
= link_to 'commented', target_url
|
2019-09-30 21:07:59 +05:30
|
|
|
- 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
|
|
|
|
- else
|
|
|
|
commented on a
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
- if discussion&.diff_discussion?
|
2019-09-30 21:07:59 +05:30
|
|
|
discussion on #{link_to(discussion.file_path, target_url)}
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2019-09-30 21:07:59 +05:30
|
|
|
= link_to 'discussion', target_url
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
- if discussion&.diff_discussion? && discussion.on_text?
|
2022-06-21 17:19:12 +05:30
|
|
|
- if include_stylesheet_link
|
|
|
|
= content_for :head do
|
|
|
|
= stylesheet_link_tag 'mailers/highlighted_diff_email'
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2022-06-21 17:19:12 +05:30
|
|
|
%table.code.gl-mb-5
|
2022-03-02 08:16:31 +05:30
|
|
|
= render partial: "projects/diffs/email_line",
|
2019-02-15 15:39:39 +05:30
|
|
|
collection: discussion.truncated_diff_lines(diff_limit: diff_limit),
|
2017-08-17 22:00:37 +05:30
|
|
|
as: :line,
|
2022-03-02 08:16:31 +05:30
|
|
|
locals: { diff_file: discussion.diff_file }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2022-05-07 20:08:51 +05:30
|
|
|
.md{ style: note_style }
|
2022-06-21 17:19:12 +05:30
|
|
|
= markdown(note.note, pipeline: :email, author: author, current_user: @recipient, issuable_reference_expansion_enabled: true)
|