diff --git a/routers/repo/compare.go b/routers/repo/compare.go
index fb6076cbe1..aa4b3191b2 100644
--- a/routers/repo/compare.go
+++ b/routers/repo/compare.go
@@ -184,6 +184,7 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *
ctx.Data["BaseIsCommit"] = baseIsCommit
ctx.Data["BaseIsBranch"] = baseIsBranch
ctx.Data["BaseIsTag"] = baseIsTag
+ ctx.Data["IsPull"] = true
// Now we have the repository that represents the base
diff --git a/templates/repo/issue/labels/label.tmpl b/templates/repo/issue/labels/label.tmpl
new file mode 100644
index 0000000000..d76dc6af73
--- /dev/null
+++ b/templates/repo/issue/labels/label.tmpl
@@ -0,0 +1,9 @@
+
+ {{.label.Name | RenderEmoji}}
+
diff --git a/templates/repo/issue/labels/labels_sidebar.tmpl b/templates/repo/issue/labels/labels_sidebar.tmpl
new file mode 100644
index 0000000000..bf6f98c888
--- /dev/null
+++ b/templates/repo/issue/labels/labels_sidebar.tmpl
@@ -0,0 +1,9 @@
+
+ {{.ctx.i18n.Tr "repo.issues.new.no_label"}}
+ {{range .ctx.Labels}}
+ {{template "repo/issue/labels/label" dict "root" $ "label" .}}
+ {{end}}
+ {{range .ctx.OrgLabels}}
+ {{template "repo/issue/labels/label" dict "root" $ "label" .}}
+ {{end}}
+
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index e585fc7359..73a3851e17 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -70,19 +70,7 @@
{{end}}
-
+ {{template "repo/issue/labels/labels_sidebar" dict "root" $ "ctx" .}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 21c7a9d365..55a625ec5f 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -125,25 +125,7 @@
{{end}}
-
- {{if not .HasSelectedLabel}}
-
{{.i18n.Tr "repo.issues.new.no_label"}}
- {{end}}
- {{range .Labels}}
- {{if .IsChecked}}
-
- {{end}}
- {{end}}
- {{range .OrgLabels}}
- {{if .IsChecked}}
-
- {{end}}
- {{end}}
-
+ {{template "repo/issue/labels/labels_sidebar" dict "root" $ "ctx" .}}
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index ab5ef21ee4..3058ec0cce 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -133,11 +133,6 @@
max-width: 100px;
}
}
-
- .label.color {
- padding: 0 8px;
- margin-right: 5px;
- }
}
#deadlineForm input {
@@ -2985,12 +2980,14 @@
}
.labels.list .item {
- padding: 0 !important;
- margin-bottom: 2px;
+ padding: .3em .5em !important;
+ margin-left: 0;
+ margin-right: 0;
+ margin-bottom: 3px;
}
.labels.list .item + .item {
- margin-left: 2px;
+ margin-left: 3px;
}
tbody.commit-list {