|
150 | 150 | {{end}}
|
151 | 151 | </tr>
|
152 | 152 | {{if gt (len $line.Comments) 0}}
|
153 |
| - {{$resolved := (index $line.Comments 0).IsResolved}} |
154 |
| - {{$resolveDoer := (index $line.Comments 0).ResolveDoer}} |
155 |
| - {{$isNotPending := (not (eq (index $line.Comments 0).Review.Type 0))}} |
156 | 153 | <tr class="add-code-comment">
|
157 | 154 | <td class="lines-num"></td>
|
158 | 155 | <td class="lines-type-marker"></td>
|
159 | 156 | <td class="add-comment-left">
|
160 |
| - {{if and $resolved (eq $line.GetCommentSide "previous")}} |
161 |
| - <div class="ui top attached header resolved-placeholder"> |
162 |
| - <span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span> |
163 |
| - <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated"> |
164 |
| - {{svg "octicon-unfold"}} |
165 |
| - {{$.i18n.Tr "repo.issues.review.show_resolved"}} |
166 |
| - </button> |
167 |
| - <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated"> |
168 |
| - {{svg "octicon-fold"}} |
169 |
| - {{$.i18n.Tr "repo.issues.review.hide_resolved"}} |
170 |
| - </button> |
171 |
| - </div> |
172 |
| - {{end}} |
173 | 157 | {{if eq $line.GetCommentSide "previous"}}
|
174 |
| - <div id="code-comments-{{(index $line.Comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}hide{{end}}"> |
175 |
| - <div class="comment-list"> |
176 |
| - <ui class="ui comments"> |
177 |
| - {{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}} |
178 |
| - </ui> |
179 |
| - </div> |
180 |
| - {{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}} |
181 |
| - {{if and $.CanMarkConversation $isNotPending}} |
182 |
| - <button class="ui icon tiny button resolve-conversation" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index $line.Comments 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" > |
183 |
| - {{if $resolved}} |
184 |
| - {{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}} |
185 |
| - {{else}} |
186 |
| - {{$.i18n.Tr "repo.issues.review.resolve_conversation"}} |
187 |
| - {{end}} |
188 |
| - </button> |
189 |
| - {{end}} |
190 |
| - </div> |
| 158 | + {{template "repo/diff/conversation" mergeinto $ "comments" $line.Comments}} |
191 | 159 | {{end}}
|
192 | 160 | </td>
|
193 | 161 | <td class="lines-num"></td>
|
194 | 162 | <td class="lines-type-marker"></td>
|
195 |
| - <td class="add-comment-right resolved-placeholder"> |
196 |
| - {{if and $resolved (eq $line.GetCommentSide "proposed")}} |
197 |
| - <div class="ui top attached header"> |
198 |
| - <span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span> |
199 |
| - <button id="show-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="ui tiny right labeled button show-outdated"> |
200 |
| - {{svg "octicon-unfold"}} |
201 |
| - {{$.i18n.Tr "repo.issues.review.show_resolved"}} |
202 |
| - </button> |
203 |
| - <button id="hide-outdated-{{(index $line.Comments 0).ID}}" data-comment="{{(index $line.Comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated"> |
204 |
| - {{svg "octicon-fold"}} |
205 |
| - {{$.i18n.Tr "repo.issues.review.hide_resolved"}} |
206 |
| - </button> |
207 |
| - </div> |
208 |
| - {{end}} |
| 163 | + <td class="add-comment-right"> |
209 | 164 | {{if eq $line.GetCommentSide "proposed"}}
|
210 |
| - <div id="code-comments-{{(index $line.Comments 0).ID}}" class="field comment-code-cloud {{if $resolved}}hide{{end}}"> |
211 |
| - <div class="comment-list"> |
212 |
| - <ui class="ui comments"> |
213 |
| - {{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}} |
214 |
| - </ui> |
215 |
| - </div> |
216 |
| - {{template "repo/diff/comment_form_datahandler" dict "reply" (index $line.Comments 0).ReviewID "hidden" true "root" $ "comment" (index $line.Comments 0)}} |
217 |
| - {{if and $.CanMarkConversation $isNotPending}} |
218 |
| - <button class="ui icon tiny button resolve-conversation" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index $line.Comments 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation" > |
219 |
| - {{if $resolved}} |
220 |
| - {{$.i18n.Tr "repo.issues.review.un_resolve_conversation"}} |
221 |
| - {{else}} |
222 |
| - {{$.i18n.Tr "repo.issues.review.resolve_conversation"}} |
223 |
| - {{end}} |
224 |
| - </button> |
225 |
| - {{end}} |
226 |
| - </div> |
| 165 | + {{template "repo/diff/conversation" mergeinto $ "comments" $line.Comments}} |
227 | 166 | {{end}}
|
228 | 167 | </td>
|
229 | 168 | </tr>
|
|
0 commit comments