diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/views/projects/diffs/_email_line.html.haml | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/views/projects/diffs/_email_line.html.haml')
-rw-r--r-- | app/views/projects/diffs/_email_line.html.haml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/projects/diffs/_email_line.html.haml b/app/views/projects/diffs/_email_line.html.haml new file mode 100644 index 00000000000..dfff143196c --- /dev/null +++ b/app/views/projects/diffs/_email_line.html.haml @@ -0,0 +1,21 @@ +-# This template is used when rendering diffs in email notifications +-# Called inside: app/views/notify/repository_push_email.html.haml +-# app/views/notify/_note_email.html.haml + +%tr.line_holder{ class: line.type } + - case line.type + - when 'match' + = diff_match_line line.old_pos, line.new_pos, text: line.text + - when 'old-nonewline', 'new-nonewline' + %td.old_line.diff-line-num + %td.new_line.diff-line-num + %td.line_content.match= line.text + - else + %td.old_line.diff-line-num{ class: line.type, data: { linenumber: line.old_pos } } + = diff_link_number(line.type, "new", line.old_pos) + + %td.new_line.diff-line-num{ class: line.type, data: { linenumber: line.new_pos } } + = diff_link_number(line.type, "old", line.new_pos) + + %td.line_content{ class: line.type }< + %pre= line.rich_text |