2024-04-24 16:58:03 -04:00
|
|
|
|
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
|
2024-10-08 04:39:52 -04:00
|
|
|
|
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees{{if .isExistingIssue}}-modify{{end}} dropdown">
|
2024-04-24 16:58:03 -04:00
|
|
|
|
<a class="text muted flex-text-block">
|
|
|
|
|
<strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong>
|
|
|
|
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
|
|
|
|
{{svg "octicon-gear" 16 "tw-ml-1"}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</a>
|
2024-10-08 04:39:52 -04:00
|
|
|
|
<div class="filter menu" {{if .isExistingIssue}} data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee" {{else}} data-id="#assignee_id" {{end}}>
|
2024-04-24 16:58:03 -04:00
|
|
|
|
<div class="ui icon search input">
|
|
|
|
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
|
|
|
|
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="no-select item">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
|
|
|
|
|
{{range .Assignees}}
|
|
|
|
|
|
|
|
|
|
{{$AssigneeID := .ID}}
|
|
|
|
|
<a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}">
|
|
|
|
|
{{$checked := false}}
|
|
|
|
|
{{range $.Issue.Assignees}}
|
|
|
|
|
{{if eq .ID $AssigneeID}}
|
|
|
|
|
{{$checked = true}}
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
<span class="octicon-check {{if not $checked}}tw-invisible{{end}}">{{svg "octicon-check"}}</span>
|
|
|
|
|
<span class="text">
|
|
|
|
|
{{ctx.AvatarUtils.Avatar . 20 "tw-mr-2"}}{{template "repo/search_name" .}}
|
|
|
|
|
</span>
|
|
|
|
|
</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui assignees list">
|
2024-10-08 04:39:52 -04:00
|
|
|
|
<span class="no-select item {{if .Issue.Assignees}}tw-hidden{{end}}">
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}
|
|
|
|
|
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
|
|
|
|
|
{{with index .Assignees 0}}
|
|
|
|
|
–
|
|
|
|
|
<a class="item select-assign-me" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}" {{if $.isExistingIssue}} data-action="update" {{end}} data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee" role="option">
|
|
|
|
|
{{ctx.Locale.Tr "repo.issues.new.assign_to_me"}}
|
|
|
|
|
</a>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
|
|
|
|
</span>
|
2024-04-24 16:58:03 -04:00
|
|
|
|
<div class="selected">
|
2024-10-08 04:39:52 -04:00
|
|
|
|
{{if .isExistingIssue}}
|
|
|
|
|
{{range .Issue.Assignees}}
|
|
|
|
|
<div class="item">
|
|
|
|
|
<a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
|
|
|
|
|
{{ctx.AvatarUtils.Avatar . 28 "tw-mr-2"}}{{.GetDisplayName}}
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{else}}
|
|
|
|
|
{{range .Assignees}}
|
|
|
|
|
<a class="item tw-p-1 muted tw-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
|
|
|
|
|
{{ctx.AvatarUtils.Avatar . 28 "tw-mr-2"}}{{.GetDisplayName}}
|
2024-04-24 16:58:03 -04:00
|
|
|
|
</a>
|
2024-10-08 04:39:52 -04:00
|
|
|
|
{{end}}
|
2024-04-24 16:58:03 -04:00
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|