|
1 | 1 | {{$file := .file}} |
| 2 | +<colgroup> |
| 3 | + <col width="50"> |
| 4 | + <col width="10"> |
| 5 | + <col width="10"> |
| 6 | + <col> |
| 7 | + <col width="50"> |
| 8 | + <col width="10"> |
| 9 | + <col width="10"> |
| 10 | + <col> |
| 11 | +</colgroup> |
2 | 12 | {{range $j, $section := $file.Sections}} |
3 | 13 | {{range $k, $line := $section.Lines}} |
4 | 14 | {{$hasmatch := ne $line.Match -1}} |
|
33 | 43 | <td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td> |
34 | 44 | <td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> |
35 | 45 | <td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> |
36 | | - <td class="lines-code lines-code-old halfwidth del-code">{{/* |
| 46 | + <td class="lines-code lines-code-old del-code">{{/* |
37 | 47 | */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* |
38 | 48 | */}}<a class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/* |
39 | 49 | */}}{{svg "octicon-plus"}}{{/* |
|
48 | 58 | <td class="lines-num lines-num-new add-code" data-line-num="{{if $match.RightIdx}}{{$match.RightIdx}}{{end}}"><span rel="{{if $match.RightIdx}}diff-{{$file.NameHash}}R{{$match.RightIdx}}{{end}}"></span></td> |
49 | 59 | <td class="lines-escape add-code lines-escape-new">{{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $rightDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> |
50 | 60 | <td class="lines-type-marker lines-type-marker-new add-code">{{if $match.RightIdx}}<span class="gt-mono" data-type-marker="{{$match.GetLineTypeMarker}}"></span>{{end}}</td> |
51 | | - <td class="lines-code lines-code-new halfwidth add-code">{{/* |
| 61 | + <td class="lines-code lines-code-new add-code">{{/* |
52 | 62 | */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* |
53 | 63 | */}}<a class="ui primary button add-code-comment add-code-comment-right{{if (not $match.CanComment)}} invisible{{end}}" data-side="right" data-idx="{{$match.RightIdx}}">{{/* |
54 | 64 | */}}{{svg "octicon-plus"}}{{/* |
|
65 | 75 | <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> |
66 | 76 | <td class="lines-escape lines-escape-old">{{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> |
67 | 77 | <td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td> |
68 | | - <td class="lines-code lines-code-old halfwidth">{{/* |
| 78 | + <td class="lines-code lines-code-old">{{/* |
69 | 79 | */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/* |
70 | 80 | */}}<a class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/* |
71 | 81 | */}}{{svg "octicon-plus"}}{{/* |
|
80 | 90 | <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> |
81 | 91 | <td class="lines-escape lines-escape-new">{{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> |
82 | 92 | <td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td> |
83 | | - <td class="lines-code lines-code-new halfwidth">{{/* |
| 93 | + <td class="lines-code lines-code-new">{{/* |
84 | 94 | */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/* |
85 | 95 | */}}<a class="ui primary button add-code-comment add-code-comment-right{{if (not $line.CanComment)}} invisible{{end}}" data-side="right" data-idx="{{$line.RightIdx}}">{{/* |
86 | 96 | */}}{{svg "octicon-plus"}}{{/* |
|
98 | 108 | {{$match := index $section.Lines $line.Match}} |
99 | 109 | {{if or (gt (len $line.Comments) 0) (gt (len $match.Comments) 0)}} |
100 | 110 | <tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}"> |
101 | | - <td class="lines-num"></td> |
102 | | - <td class="lines-escape"></td> |
103 | | - <td class="lines-type-marker"></td> |
104 | 111 | <td class="add-comment-left" colspan="4"> |
105 | 112 | {{if gt (len $line.Comments) 0}} |
106 | 113 | {{if eq $line.GetCommentSide "previous"}} |
|
113 | 120 | {{end}} |
114 | 121 | {{end}} |
115 | 122 | </td> |
116 | | - <td class="lines-num"></td> |
117 | | - <td class="lines-escape"></td> |
118 | | - <td class="lines-type-marker"></td> |
119 | 123 | <td class="add-comment-right" colspan="4"> |
120 | 124 | {{if eq $line.GetCommentSide "proposed"}} |
121 | 125 | {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} |
|
130 | 134 | {{end}} |
131 | 135 | {{else if gt (len $line.Comments) 0}} |
132 | 136 | <tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}"> |
133 | | - <td class="lines-num"></td> |
134 | | - <td class="lines-escape"></td> |
135 | | - <td class="lines-type-marker"></td> |
136 | 137 | <td class="add-comment-left" colspan="4"> |
137 | 138 | {{if gt (len $line.Comments) 0}} |
138 | 139 | {{if eq $line.GetCommentSide "previous"}} |
139 | 140 | {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} |
140 | 141 | {{end}} |
141 | 142 | {{end}} |
142 | 143 | </td> |
143 | | - <td class="lines-num"></td> |
144 | | - <td class="lines-escape"></td> |
145 | | - <td class="lines-type-marker"></td> |
146 | 144 | <td class="add-comment-right" colspan="4"> |
147 | 145 | {{if eq $line.GetCommentSide "proposed"}} |
148 | 146 | {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} |
|
0 commit comments