diff options
author | silverwind <me@silverwind.io> | 2020-11-29 04:26:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 22:26:03 -0500 |
commit | da4bb6fc4ef552865816303fc9c0db25509ff626 (patch) | |
tree | 04edd31cce1c77c2d7598de5c9d01388416108a1 /templates | |
parent | b2435af9be75a0cdeea08881c162e65740225f56 (diff) | |
download | gitea-da4bb6fc4ef552865816303fc9c0db25509ff626.tar.gz gitea-da4bb6fc4ef552865816303fc9c0db25509ff626.zip |
Fix label styles affecting shabox (#13734)
* Fix label styles affecting shabox
Add common parent .labels-list to issue labels lists to prevent
affecting other elements.
Fixes: https://github.com/go-gitea/gitea/issues/13704
* Update templates/shared/issuelist.tmpl
* Update templates/shared/issuelist.tmpl
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/labels/labels_sidebar.tmpl | 14 | ||||
-rw-r--r-- | templates/shared/issuelist.tmpl | 8 |
2 files changed, 13 insertions, 9 deletions
diff --git a/templates/repo/issue/labels/labels_sidebar.tmpl b/templates/repo/issue/labels/labels_sidebar.tmpl index bf6f98c888..1d61ecf3df 100644 --- a/templates/repo/issue/labels/labels_sidebar.tmpl +++ b/templates/repo/issue/labels/labels_sidebar.tmpl @@ -1,9 +1,11 @@ <div class="ui labels list"> <span class="no-select item {{if .ctx.HasSelectedLabel}}hide{{end}}">{{.ctx.i18n.Tr "repo.issues.new.no_label"}}</span> - {{range .ctx.Labels}} - {{template "repo/issue/labels/label" dict "root" $ "label" .}} - {{end}} - {{range .ctx.OrgLabels}} - {{template "repo/issue/labels/label" dict "root" $ "label" .}} - {{end}} + <span class="labels-list"> + {{range .ctx.Labels}} + {{template "repo/issue/labels/label" dict "root" $ "label" .}} + {{end}} + {{range .ctx.OrgLabels}} + {{template "repo/issue/labels/label" dict "root" $ "label" .}} + {{end}} + </span> </div> diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 9393583862..beb78a5491 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -37,9 +37,11 @@ {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}} {{end}} {{end}} - {{range .Labels}} - <a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}{{if ne $.listType "milestone"}}&milestone={{$.MilestoneID}}{{end}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a> - {{end}} + <span class="labels-list"> + {{range .Labels}} + <a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}{{if ne $.listType "milestone"}}&milestone={{$.MilestoneID}}{{end}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a> + {{end}} + </span> </div> <div class="desc issue-item-bottom-row df ac fw my-1"> <a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}"> |