From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/repo/diff/section_unified.tmpl | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 templates/repo/diff/section_unified.tmpl (limited to 'templates/repo/diff/section_unified.tmpl') diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl new file mode 100644 index 0000000..ab78097 --- /dev/null +++ b/templates/repo/diff/section_unified.tmpl @@ -0,0 +1,72 @@ +{{$file := .file}} +{{$blobExcerptRepoLink := or $.root.CommitRepoLink $.root.RepoLink}} + + + + + + + +{{range $j, $section := $file.Sections}} + {{range $k, $line := $section.Lines}} + + {{if eq .GetType 4}} + {{if $.root.AfterCommitID}} + +
+ {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
+ + {{else}} + {{/* for code file preview page or comment diffs on pull comment pages, do not show the expansion arrows */}} + + {{end}} + {{else}} + + + {{end}} + {{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale -}} + + {{- if $inlineDiff.EscapeStatus.Escaped -}} + + {{- end -}} + + + {{if eq .GetType 4}} + {{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}} + {{else}} + {{/* + */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* + */}} + {{end}} + + {{if $line.Conversations}} + + + {{template "repo/diff/conversations" dict "." $.root "conversations" $line.Conversations}} + + + {{end}} + {{end}} +{{end}} -- cgit v1.2.3