From 50cbb204812f465ea00b2ffd31db58378e17f27b Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 15 Nov 2020 19:11:58 +0100 Subject: Fix issue label rendering (#13570) * Fix issue label rendering Prevent rendering of inactive labels and make them wrap inline. Fixes: https://github.com/go-gitea/gitea/issues/13566 * also don't render the placeholder Co-authored-by: techknowlogick --- templates/repo/issue/new_form.tmpl | 8 ++++++-- templates/repo/issue/view_content/sidebar.tmpl | 21 +++++++++++++-------- 2 files changed, 19 insertions(+), 10 deletions(-) (limited to 'templates') diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index 9540716e54..e585fc7359 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -73,10 +73,14 @@
{{.i18n.Tr "repo.issues.new.no_label"}} {{range .Labels}} - {{.Name | RenderEmoji}} + {{if .IsChecked}} + {{.Name | RenderEmoji}} + {{end}} {{end}} {{range .OrgLabels}} - {{.Name | RenderEmoji}} + {{if .IsChecked}} + {{.Name | RenderEmoji}} + {{end}} {{end}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 55884f3fa1..21c7a9d365 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -126,17 +126,22 @@
- {{.i18n.Tr "repo.issues.new.no_label"}} + {{if not .HasSelectedLabel}} + {{.i18n.Tr "repo.issues.new.no_label"}} + {{end}} {{range .Labels}} - + {{if .IsChecked}} + + {{end}} {{end}} {{range .OrgLabels}} - - + {{if .IsChecked}} + + {{end}} {{end}}
-- cgit v1.2.3