debian-mirror-gitlab/app/views/notify/_note_email.html.haml

43 lines
1.2 KiB
Text
Raw Normal View History

2019-01-03 12:48:30 +05:30
- discussion = @note.discussion if @note.part_of_discussion?
2018-03-17 18:26:18 +05:30
- diff_discussion = discussion&.diff_discussion?
- on_image = discussion.on_image? if diff_discussion
2017-08-17 22:00:37 +05:30
- if discussion
2018-03-17 18:26:18 +05:30
- phrase_end_char = on_image ? "." : ":"
2019-01-03 12:48:30 +05:30
%p.details
2018-03-17 18:26:18 +05:30
= succeed phrase_end_char do
2019-01-03 12:48:30 +05:30
= link_to @note.author_name, user_url(@note.author)
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
- if diff_discussion
2017-08-17 22:00:37 +05:30
- if discussion.new_discussion?
started a new discussion
- else
commented on a discussion
2019-01-03 12:48:30 +05:30
on #{link_to discussion.file_path, @target_url}
2017-08-17 22:00:37 +05:30
- else
- if discussion.new_discussion?
started a new discussion
- else
2019-01-03 12:48:30 +05:30
commented on a #{link_to 'discussion', @target_url}
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
- elsif Gitlab::CurrentSettings.email_author_in_body
2017-08-17 22:00:37 +05:30
%p.details
2019-01-03 12:48:30 +05:30
#{link_to @note.author_name, user_url(@note.author)} commented:
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
- if diff_discussion && !on_image
2017-08-17 22:00:37 +05:30
= content_for :head do
= stylesheet_link_tag 'mailers/highlighted_diff_email'
%table
= render partial: "projects/diffs/line",
2019-01-03 12:48:30 +05:30
collection: discussion.truncated_diff_lines,
2017-08-17 22:00:37 +05:30
as: :line,
locals: { diff_file: discussion.diff_file,
plain: true,
email: true }
2019-01-03 12:48:30 +05:30
%div
= markdown(@note.note, pipeline: :email, author: @note.author)