code.gitea.io/gitea@v1.22.3/templates/repo/issue/labels/labels_selector_field.tmpl (about) 1 <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-label dropdown"> 2 <span class="text muted flex-text-block"> 3 <strong>{{ctx.Locale.Tr "repo.issues.new.labels"}}</strong> 4 {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} 5 {{svg "octicon-gear" 16 "tw-ml-1"}} 6 {{end}} 7 </span> 8 <div class="filter menu" {{if .Issue}}data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/labels"{{else}}data-id="#label_ids"{{end}}> 9 {{if or .Labels .OrgLabels}} 10 <div class="ui icon search input"> 11 <i class="icon">{{svg "octicon-search" 16}}</i> 12 <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_labels"}}"> 13 </div> 14 {{end}} 15 <a class="no-select item" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a> 16 {{if or .Labels .OrgLabels}} 17 {{$previousExclusiveScope := "_no_scope"}} 18 {{range .Labels}} 19 {{$exclusiveScope := .ExclusiveScope}} 20 {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} 21 <div class="divider"></div> 22 {{end}} 23 {{$previousExclusiveScope = $exclusiveScope}} 24 <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" {{if .IsArchived}}data-is-archived{{end}} data-id-selector="#label_{{.ID}}" data-scope="{{$exclusiveScope}}"><span class="octicon-check {{if not .IsChecked}}tw-invisible{{end}}">{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}</span> {{RenderLabel $.Context ctx.Locale .}} 25 {{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}} 26 <p class="archived-label-hint">{{template "repo/issue/labels/label_archived" .}}</p> 27 </a> 28 {{end}} 29 <div class="divider"></div> 30 {{$previousExclusiveScope = "_no_scope"}} 31 {{range .OrgLabels}} 32 {{$exclusiveScope := .ExclusiveScope}} 33 {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} 34 <div class="divider"></div> 35 {{end}} 36 {{$previousExclusiveScope = $exclusiveScope}} 37 <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" {{if .IsArchived}}data-is-archived{{end}} data-id-selector="#label_{{.ID}}" data-scope="{{$exclusiveScope}}"><span class="octicon-check {{if not .IsChecked}}tw-invisible{{end}}">{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}</span> {{RenderLabel $.Context ctx.Locale .}} 38 {{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}} 39 <p class="archived-label-hint">{{template "repo/issue/labels/label_archived" .}}</p> 40 </a> 41 {{end}} 42 {{else}} 43 <div class="disabled item">{{ctx.Locale.Tr "repo.issues.new.no_items"}}</div> 44 {{end}} 45 </div> 46 </div>