forked from forgejo/forgejo
Backport #28351 by @KN4CK3R
Fix #28347
As there is no info how to reproduce it, I can't test it.
Fix may be `section_split.tmpl @ 126/130`.
Other changes are "empty check" refactorings.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit 08445d5d86
)
This commit is contained in:
parent
b1b0d9a3fe
commit
171b6a294f
11 changed files with 23 additions and 23 deletions
|
@ -108,25 +108,27 @@
|
|||
</tr>
|
||||
{{if and (eq .GetType 3) $hasmatch}}
|
||||
{{$match := index $section.Lines $line.Match}}
|
||||
{{if or (gt (len $line.Comments) 0) (gt (len $match.Comments) 0)}}
|
||||
{{if or $line.Comments $match.Comments}}
|
||||
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
|
||||
<td class="add-comment-left" colspan="4">
|
||||
{{if gt (len $line.Comments) 0}}
|
||||
{{if $line.Comments}}
|
||||
{{if eq $line.GetCommentSide "previous"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if gt (len $match.Comments) 0}}
|
||||
{{if $match.Comments}}
|
||||
{{if eq $match.GetCommentSide "previous"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="add-comment-right" colspan="4">
|
||||
{{if eq $line.GetCommentSide "proposed"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
|
||||
{{if $line.Comments}}
|
||||
{{if eq $line.GetCommentSide "proposed"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if gt (len $match.Comments) 0}}
|
||||
{{if $match.Comments}}
|
||||
{{if eq $match.GetCommentSide "proposed"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}}
|
||||
{{end}}
|
||||
|
@ -134,13 +136,11 @@
|
|||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else if gt (len $line.Comments) 0}}
|
||||
{{else if $line.Comments}}
|
||||
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
|
||||
<td class="add-comment-left" colspan="4">
|
||||
{{if gt (len $line.Comments) 0}}
|
||||
{{if eq $line.GetCommentSide "previous"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
|
||||
{{end}}
|
||||
{{if eq $line.GetCommentSide "previous"}}
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="add-comment-right" colspan="4">
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
*/}}</td>
|
||||
{{end}}
|
||||
</tr>
|
||||
{{if gt (len $line.Comments) 0}}
|
||||
{{if $line.Comments}}
|
||||
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
|
||||
<td class="add-comment-left add-comment-right" colspan="5">
|
||||
{{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue