Follow-up to #32465: Fix the assignee sidebar after the selector refactor. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
{{$pageMeta := .}}
|
||||
{{$data := .AssigneesData}}
|
||||
{{$listBaseLink := print $pageMeta.RepoLink (Iif $pageMeta.IsPullRequest "/pulls" "/issues")}}
|
||||
{{/* TODO: it seems that the code keeps checking $pageMeta.Issue and assumes that it might not exist, need to figure out why */}}
|
||||
{{$issueAssignees := NIL}}{{if $pageMeta.Issue}}{{$issueAssignees = $pageMeta.Issue.Assignees}}{{end}}
|
||||
<div class="divider"></div>
|
||||
<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
|
||||
@@ -19,7 +21,7 @@
|
||||
<div class="item clear-selection" data-text="">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
|
||||
<div class="divider"></div>
|
||||
{{range $data.CandidateAssignees}}
|
||||
<a class="item" href="#" data-value="{{.ID}}">
|
||||
<a class="item" href="{{$listBaseLink}}?assignee={{.ID}}" data-value="{{.ID}}">
|
||||
<span class="item-check-mark">{{svg "octicon-check"}}</span>
|
||||
{{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
|
||||
</a>
|
||||
@@ -30,8 +32,8 @@
|
||||
<div class="ui relaxed list muted-links flex-items-block">
|
||||
<span class="item empty-list {{if $issueAssignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
|
||||
{{range $issueAssignees}}
|
||||
<a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
|
||||
{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
|
||||
<a class="item" href="{{$listBaseLink}}?assignee={{.ID}}">
|
||||
{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user