Do not show arrows on comment diffs on pull comment pages (#12434)

* Do not show arrows on comment diffs on pull comment pages

Prior to this PR it was possible that an expansion arrow could be displayed
on comment diffs displayed on the comments pages of pulls

These arrows would not successfully work because they were not attached to
a commit id - nor can they necessarily be.

This PR prevents these from being shown.

Fix #10851

Signed-off-by: Andrew Thornton <art27@cantab.net>

* as per @silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>

* one more indentation fix

Signed-off-by: Andrew Thornton <art27@cantab.net>

* one more indentation fix

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2020-08-08 02:22:34 +01:00 committed by GitHub
parent e770c2b850
commit 96add8c319
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
{{$file := .file}}
{{range $j, $section := $file.Sections}}
{{range $k, $line := $section.Lines}}
{{if or $.root.AfterCommitID (ne .GetType 4)}}
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
{{if eq .GetType 4}}
<td colspan="2" class="lines-num">
@ -73,3 +74,4 @@
{{end}}
{{end}}
{{end}}
{{end}}