2017-03-31 17:52:38 -04:00
|
|
|
- discussion = @note.discussion if @note.part_of_discussion?
|
2017-11-09 14:59:39 -05:00
|
|
|
- diff_discussion = discussion&.diff_discussion?
|
|
|
|
- on_image = discussion.on_image? if diff_discussion
|
|
|
|
|
2017-03-30 23:06:09 -04:00
|
|
|
- if discussion
|
2017-11-09 14:59:39 -05:00
|
|
|
- phrase_end_char = on_image ? "." : ":"
|
|
|
|
|
2017-03-15 20:14:58 -04:00
|
|
|
%p.details
|
2017-11-09 14:59:39 -05:00
|
|
|
= succeed phrase_end_char do
|
2017-03-15 20:14:58 -04:00
|
|
|
= link_to @note.author_name, user_url(@note.author)
|
|
|
|
|
2017-11-09 14:59:39 -05:00
|
|
|
- if diff_discussion
|
2017-03-30 23:06:09 -04:00
|
|
|
- if discussion.new_discussion?
|
2017-03-15 20:14:58 -04:00
|
|
|
started a new discussion
|
|
|
|
- else
|
|
|
|
commented on a discussion
|
|
|
|
|
2017-03-30 23:06:09 -04:00
|
|
|
on #{link_to discussion.file_path, @target_url}
|
2017-03-15 20:14:58 -04:00
|
|
|
- else
|
2017-03-30 23:06:09 -04:00
|
|
|
- if discussion.new_discussion?
|
2017-03-15 20:14:58 -04:00
|
|
|
started a new discussion
|
|
|
|
- else
|
|
|
|
commented on a #{link_to 'discussion', @target_url}
|
|
|
|
|
2018-02-02 13:39:55 -05:00
|
|
|
- elsif Gitlab::CurrentSettings.email_author_in_body
|
2017-03-15 20:14:58 -04:00
|
|
|
%p.details
|
|
|
|
#{link_to @note.author_name, user_url(@note.author)} commented:
|
|
|
|
|
2017-11-09 14:59:39 -05:00
|
|
|
- if diff_discussion && !on_image
|
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",
|
2017-03-30 23:06:09 -04:00
|
|
|
collection: discussion.truncated_diff_lines,
|
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 }
|
|
|
|
|
|
|
|
%div
|
|
|
|
= markdown(@note.note, pipeline: :email, author: @note.author)
|