|
257 | 257 | </div>
|
258 | 258 | </div>
|
259 | 259 |
|
| 260 | + {{if .Repository.IsWeightEnabled $.Context}} |
| 261 | + <div class="divider"></div> |
| 262 | + |
| 263 | + <div class="ui floating jump"> |
| 264 | + <a class="text muted flex-text-block issue-weight-edit"> |
| 265 | + <strong>{{ctx.Locale.Tr "repo.issues.weight.title"}}</strong> |
| 266 | + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} |
| 267 | + {{svg "octicon-pencil" 16 "tw-ml-1"}} |
| 268 | + {{end}} |
| 269 | + </a> |
| 270 | + </div> |
260 | 271 |
|
261 |
| - {{if .Repository.IsWeightEnabled $.Context}} |
262 |
| - <div class="divider"></div> |
263 |
| - |
264 |
| - <div class="ui floating jump"> |
265 |
| - <a class="text muted flex-text-block issue-weight-edit"> |
266 |
| - <strong>{{ctx.Locale.Tr "repo.issues.weight.title"}}</strong> |
267 |
| - {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} |
268 |
| - {{svg "octicon-pencil" 16 "tw-ml-1"}} |
269 |
| - {{end}} |
270 |
| - </a> |
271 |
| - </div> |
272 |
| - |
273 |
| - <div class="ui list"> |
274 |
| - {{if eq .Issue.Weight 0}} |
275 |
| - <span class="issue-weight-view item">{{ctx.Locale.Tr "repo.issues.weight.no_weight"}}</span> |
276 |
| - {{end}} |
277 |
| - |
278 |
| - {{if gt .Issue.Weight 0}} |
279 |
| - <div class="tw-flex issue-weight-view"> |
280 |
| - |
281 |
| - <strong class="item">{{ .Issue.Weight }} -</strong> |
282 |
| - <form action="{{.Issue.Link}}/weight" method="post" id="update-issue-weight-form"> |
283 |
| - {{$.CsrfTokenHtml}} |
284 |
| - <input name="weight" type="hidden" value="0" autocomplete="off"> |
285 |
| - <button class="tw-bg-transparent hover:tw-underline" style="color: var(--color-text)"> |
286 |
| - {{ctx.Locale.Tr "repo.issues.weight.remove_weight"}} |
287 |
| - </button> |
288 |
| - </form> |
289 |
| - </div> |
290 |
| - {{end}} |
291 |
| - |
292 |
| - <form class="ui tw-hidden fluid input issue-weight-form" action="{{.Issue.Link}}/weight" method="post" id="update-issue-weight-form"> |
293 |
| - {{$.CsrfTokenHtml}} |
294 |
| - <input name="weight" {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} id="issueWeight" type="number" value="{{if gt .Issue.Weight 0}}{{.Issue.Weight}}{{end}}" min="0" autocomplete="off"> |
295 |
| - </form> |
296 |
| - </div> |
297 |
| - {{end}} |
| 272 | + <div class="ui list"> |
| 273 | + {{if eq .Issue.Weight 0}} |
| 274 | + <span class="issue-weight-view item">{{ctx.Locale.Tr "repo.issues.weight.no_weight"}}</span> |
| 275 | + {{end}} |
298 | 276 |
|
| 277 | + {{if gt .Issue.Weight 0}} |
| 278 | + <div class="tw-flex issue-weight-view"> |
299 | 279 |
|
| 280 | + <strong class="item">{{.Issue.Weight}} -</strong> |
| 281 | + <form action="{{.Issue.Link}}/weight" method="post" id="update-issue-weight-form"> |
| 282 | + {{$.CsrfTokenHtml}} |
| 283 | + <input name="weight" type="hidden" value="0" autocomplete="off"> |
| 284 | + <button class="tw-bg-transparent hover:tw-underline" style="color: var(--color-text)"> |
| 285 | + {{ctx.Locale.Tr "repo.issues.weight.remove_weight"}} |
| 286 | + </button> |
| 287 | + </form> |
| 288 | + </div> |
| 289 | + {{end}} |
300 | 290 |
|
| 291 | + <form class="ui tw-hidden fluid input issue-weight-form" action="{{.Issue.Link}}/weight" method="post" id="update-issue-weight-form"> |
| 292 | + {{$.CsrfTokenHtml}} |
| 293 | + <input name="weight" {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} id="issueWeight" type="number" value="{{if gt .Issue.Weight 0}}{{.Issue.Weight}}{{end}}" min="0" autocomplete="off"> |
| 294 | + </form> |
| 295 | + </div> |
| 296 | + {{end}} |
301 | 297 |
|
302 | 298 | <div class="divider"></div>
|
303 | 299 |
|
|
0 commit comments