File tree 4 files changed +23
-35
lines changed 4 files changed +23
-35
lines changed Original file line number Diff line number Diff line change @@ -364,13 +364,12 @@ func NewFuncMap() []template.FuncMap {
364
364
return ""
365
365
},
366
366
"RenderLabels" : func (labels []* models.Label ) template.HTML {
367
- html := ""
368
-
367
+ html := `<span class="labels-list">`
369
368
for _ , label := range labels {
370
- html = fmt .Sprintf ("%s <div class='ui label' style='color: %s; background-color: %s'>%s</div>" ,
371
- html , label .ForegroundColor (), label .Color , RenderEmoji (label .Name ))
369
+ html + = fmt .Sprintf ("<div class='ui label' style='color: %s; background-color: %s'>%s</div>" ,
370
+ label .ForegroundColor (), label .Color , RenderEmoji (label .Name ))
372
371
}
373
-
372
+ html += "</span>"
374
373
return template .HTML (html )
375
374
},
376
375
}}
Original file line number Diff line number Diff line change 1
1
<div class="ui labels list">
2
2
<span class="no-select item {{if .ctx.HasSelectedLabel}}hide{{end}}">{{.ctx.i18n.Tr "repo.issues.new.no_label"}}</span>
3
- {{range .ctx.Labels}}
4
- {{template "repo/issue/labels/label" dict "root" $ "label" .}}
5
- {{end}}
6
- {{range .ctx.OrgLabels}}
7
- {{template "repo/issue/labels/label" dict "root" $ "label" .}}
8
- {{end}}
3
+ <span class="labels-list">
4
+ {{range .ctx.Labels}}
5
+ {{template "repo/issue/labels/label" dict "root" $ "label" .}}
6
+ {{end}}
7
+ {{range .ctx.OrgLabels}}
8
+ {{template "repo/issue/labels/label" dict "root" $ "label" .}}
9
+ {{end}}
10
+ </span>
9
11
</div>
Original file line number Diff line number Diff line change 37
37
{{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
38
38
{{end}}
39
39
{{end}}
40
- {{range .Labels}}
41
- <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>
42
- {{end}}
40
+ <span class="labels-list">
41
+ {{range .Labels}}
42
+ <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>
43
+ {{end}}
44
+ </span>
43
45
</div>
44
46
<div class="desc issue-item-bottom-row df ac fw my-1">
45
47
<a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
Original file line number Diff line number Diff line change 2856
2856
}
2857
2857
}
2858
2858
2859
- .labels. list {
2860
- display : flex ;
2859
+ .labels- list {
2860
+ display : inline- flex ;
2861
2861
flex-wrap : wrap ;
2862
2862
}
2863
2863
2864
- .labels.list .item ,
2865
- .timeline-item .label {
2866
- padding : .3em .5em !important ;
2867
- margin-left : 0 ;
2868
- margin-right : 0 ;
2869
- margin-bottom : 3px ;
2870
- }
2871
-
2872
- .issue-item-top-row .label {
2873
- margin-left : 0 ;
2874
- margin-right : 0 ;
2864
+ .labels-list .label {
2875
2865
margin-top : 1.5px ;
2876
2866
margin-bottom : 1.5px ;
2877
- }
2878
-
2879
- .labels.list .item ,
2880
- .timeline-item .label ,
2881
- .issue-item-top-row .label {
2882
2867
margin-right : 3px ;
2883
- display : inline !important ;
2868
+ margin-left : 0 ;
2869
+ display : inline-block !important ;
2884
2870
}
2885
2871
2886
- .timeline-item .label :last-of-type ,
2887
- .issue-item-top-row .label :last-of-type {
2872
+ .labels-list .label :last-of-type {
2888
2873
margin-right : 0 ;
2889
2874
}
2890
2875
You can’t perform that action at this time.
0 commit comments