mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 20:58:36 +00:00
Improve labels-list
rendering (#34846)
Make labels list use consistent gap --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -63,16 +63,21 @@
|
||||
|
||||
{{if or .Labels .Assignees}}
|
||||
<div class="issue-card-bottom">
|
||||
<div class="labels-list">
|
||||
{{range .Labels}}
|
||||
<a target="_blank" href="{{$.Issue.Repo.Link}}/issues?labels={{.ID}}">{{ctx.RenderUtils.RenderLabel .}}</a>
|
||||
{{/* the labels container must always be present, to help the assignees list right-aligned */}}
|
||||
<div class="issue-card-bottom-part labels-list">
|
||||
{{range $label := .Labels}}
|
||||
{{$link := print $.Issue.Repo.Link "/issues"}}
|
||||
{{$link = QueryBuild $link "labels" $label.ID}}
|
||||
{{ctx.RenderUtils.RenderLabelWithLink $label $link}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="issue-card-assignees">
|
||||
{{if .Assignees}}
|
||||
<div class="issue-card-bottom-part tw-justify-end">
|
||||
{{range .Assignees}}
|
||||
<a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{ctx.Locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 28}}</a>
|
||||
<a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{ctx.Locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 24}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
@@ -26,7 +26,7 @@
|
||||
<div class="divider"></div>
|
||||
{{end}}
|
||||
|
||||
<ul class="issue-label-list">
|
||||
<ul class="issue-label-list muted-links">
|
||||
{{$canEditLabel := and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}}
|
||||
{{$canEditLabel = or $canEditLabel $.PageIsOrgSettingsLabels}}
|
||||
{{range .Labels}}
|
||||
@@ -42,9 +42,8 @@
|
||||
<a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="label-operation tw-flex">
|
||||
<div class="label-operation">
|
||||
{{template "repo/issue/labels/label_archived" .}}
|
||||
<div class="tw-flex tw-ml-auto">
|
||||
{{if $canEditLabel}}
|
||||
<a class="edit-label-button" href="#"
|
||||
data-label-id="{{.ID}}" data-label-name="{{.Name}}" data-label-color="{{.Color}}"
|
||||
@@ -57,7 +56,6 @@
|
||||
data-modal-confirm-content="{{ctx.Locale.Tr "repo.issues.label_deletion_desc"}}"
|
||||
>{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
|
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui list muted-links flex-items-block tw-flex tw-flex-col tw-gap-2">
|
||||
<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}}">
|
||||
|
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui list labels-list tw-my-2 tw-flex tw-gap-2">
|
||||
<div class="ui list labels-list">
|
||||
<span class="item empty-list {{if $data.SelectedLabelIDs}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_label"}}</span>
|
||||
{{range $data.AllLabels}}
|
||||
{{if .IsChecked}}
|
||||
|
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui relaxed list flex-items-block tw-my-4">
|
||||
<div class="ui relaxed list flex-items-block">
|
||||
<span class="item empty-list {{if or $data.OriginalReviews $data.CurrentPullReviewers}}tw-hidden{{end}}">
|
||||
{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}
|
||||
</span>
|
||||
|
@@ -169,7 +169,7 @@
|
||||
</div>
|
||||
{{else if eq .Type 7}}
|
||||
{{if or .AddedLabels .RemovedLabels}}
|
||||
<div class="timeline-item event" id="{{.HashTag}}">
|
||||
<div class="timeline-item event with-labels-list-inline" id="{{.HashTag}}">
|
||||
<span class="badge">{{svg "octicon-tag"}}</span>
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
<span class="text grey muted-links">
|
||||
|
Reference in New Issue
Block a user