aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/diff/section_split.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/diff/section_split.tmpl')
-rw-r--r--templates/repo/diff/section_split.tmpl9
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/repo/diff/section_split.tmpl b/templates/repo/diff/section_split.tmpl
index 349f0c3dfc..37b42bcb37 100644
--- a/templates/repo/diff/section_split.tmpl
+++ b/templates/repo/diff/section_split.tmpl
@@ -16,19 +16,20 @@
{{if or (ne .GetType 2) (not $hasmatch)}}
<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}">
{{if eq .GetType 4}}
+ {{$expandDirection := $line.GetExpandDirection}}
<td class="lines-num lines-num-old">
- <div class="tw-flex">
- {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}}
+ <div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
+ {{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
{{svg "octicon-fold-down"}}
</button>
{{end}}
- {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}}
+ {{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
{{svg "octicon-fold-up"}}
</button>
{{end}}
- {{if eq $line.GetExpandDirection 2}}
+ {{if eq $expandDirection 2}}
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}">
{{svg "octicon-fold"}}
</button>