{{if and (not $.PageIsOrgSettingsLabels) (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived)}}
{{template "repo/issue/labels/label_load_template" .}}
{{else if and ($.PageIsOrgSettingsLabels) (eq .NumLabels 0)}}
{{template "repo/issue/labels/label_load_template" .}}
{{end}}
{{$canEditLabel := and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}}
{{$canEditLabel = or $canEditLabel $.PageIsOrgSettingsLabels}}
{{range .Labels}}
-
{{ctx.RenderUtils.RenderLabel .}}
{{if .Description}}
{{.Description | ctx.RenderUtils.RenderEmoji}}{{end}}
{{template "repo/issue/labels/label_archived" .}}
{{end}}
{{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}}
-
{{range .OrgLabels}}
-
{{ctx.RenderUtils.RenderLabel .}}
{{if .Description}}
{{.Description | ctx.RenderUtils.RenderEmoji}}{{end}}
{{template "repo/issue/labels/label_archived" .}}
{{end}}
{{end}}