|
|
@ -1,9 +1,9 @@ |
|
|
|
{{$file := .file}} |
|
|
|
{{$file := .file}} |
|
|
|
{{range $j, $section := $file.Sections}} |
|
|
|
{{range $j, $section := $file.Sections}} |
|
|
|
{{range $k, $line := $section.Lines}} |
|
|
|
{{range $k, $line := $section.Lines}} |
|
|
|
{{if or $.root.AfterCommitID (ne .GetType 4)}} |
|
|
|
|
|
|
|
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}"> |
|
|
|
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{DiffLineTypeToStr .GetType}}"> |
|
|
|
{{if eq .GetType 4}} |
|
|
|
{{if eq .GetType 4}} |
|
|
|
|
|
|
|
{{if $.root.AfterCommitID}} |
|
|
|
<td colspan="2" class="lines-num"> |
|
|
|
<td colspan="2" class="lines-num"> |
|
|
|
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} |
|
|
|
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} |
|
|
|
<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}" data-anchor="diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> |
|
|
|
<a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}" data-anchor="diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> |
|
|
@ -21,6 +21,10 @@ |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
|
|
|
|
{{else}} |
|
|
|
|
|
|
|
{{/* for code file preview page or comment diffs on pull comment pages, do not show the expansion arrows */}} |
|
|
|
|
|
|
|
<td colspan="2" class="lines-num"></td> |
|
|
|
|
|
|
|
{{end}} |
|
|
|
{{else}} |
|
|
|
{{else}} |
|
|
|
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td> |
|
|
|
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td> |
|
|
|
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td> |
|
|
|
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td> |
|
|
@ -52,5 +56,4 @@ |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|