|
4 | 4 | <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}">
|
5 | 5 | {{if eq .GetType 4}}
|
6 | 6 | <td colspan="2" class="lines-num">
|
7 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} |
8 |
| - <a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"> |
9 |
| - {{svg "octicon-fold-down" 16}} |
10 |
| - </a> |
11 |
| - {{end}} |
12 |
| - {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} |
13 |
| - <a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"> |
14 |
| - {{svg "octicon-fold-up" 16}} |
15 |
| - </a> |
16 |
| - {{end}} |
17 |
| - {{if eq $line.GetExpandDirection 2}} |
18 |
| - <a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"> |
19 |
| - {{svg "octicon-fold" 16}} |
20 |
| - </a> |
| 7 | + {{if $.root.AfterCommitID}} |
| 8 | + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} |
| 9 | + <a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=down" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"> |
| 10 | + {{svg "octicon-fold-down" 16}} |
| 11 | + </a> |
| 12 | + {{end}} |
| 13 | + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} |
| 14 | + <a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=up" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"> |
| 15 | + {{svg "octicon-fold-up" 16}} |
| 16 | + </a> |
| 17 | + {{end}} |
| 18 | + {{if eq $line.GetExpandDirection 2}} |
| 19 | + <a role="button" class="blob-excerpt" data-url="{{$.root.RepoLink}}/blob_excerpt/{{$.root.AfterCommitID}}" data-query="{{$line.GetBlobExcerptQuery}}&style=unified&direction=" data-anchor="diff-{{Sha1 $file.Name}}K{{$line.SectionInfo.RightIdx}}"> |
| 20 | + {{svg "octicon-fold" 16}} |
| 21 | + </a> |
| 22 | + {{end}} |
21 | 23 | {{end}}
|
22 | 24 | </td>
|
23 | 25 | {{else}}
|
|
0 commit comments