summaryrefslogtreecommitdiffstats
path: root/modules/templates
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2024-03-13 07:04:07 +0100
committerGitHub <noreply@github.com>2024-03-13 07:04:07 +0100
commit9a93b1816e0bc65101e7ad7ca66786fb38a8e628 (patch)
treebb2fec0860c38c2cb56236107621da2ab0308339 /modules/templates
parent857243bed7f9dccdc597c2941df41e821781cb0f (diff)
downloadgitea-9a93b1816e0bc65101e7ad7ca66786fb38a8e628.tar.gz
gitea-9a93b1816e0bc65101e7ad7ca66786fb38a8e628.zip
Refactor label.IsArchived() (#29750)
just some missed nits
Diffstat (limited to 'modules/templates')
-rw-r--r--modules/templates/util_render.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/templates/util_render.go b/modules/templates/util_render.go
index ba9b050e02..7ed3a8b9b4 100644
--- a/modules/templates/util_render.go
+++ b/modules/templates/util_render.go
@@ -124,7 +124,6 @@ func RenderLabel(ctx context.Context, locale translation.Locale, label *issues_m
var (
archivedCSSClass string
textColor = "#111"
- isArchived = !label.ArchivedUnix.IsZero()
labelScope = label.ExclusiveScope()
)
@@ -136,7 +135,7 @@ func RenderLabel(ctx context.Context, locale translation.Locale, label *issues_m
description := emoji.ReplaceAliases(template.HTMLEscapeString(label.Description))
- if isArchived {
+ if label.IsArchived() {
archivedCSSClass = "archived-label"
description = fmt.Sprintf("(%s) %s", locale.TrString("archived"), description)
}