aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/release/label.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/release/label.tmpl')
-rw-r--r--templates/repo/release/label.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/repo/release/label.tmpl b/templates/repo/release/label.tmpl
new file mode 100644
index 0000000000..eacb3e36f4
--- /dev/null
+++ b/templates/repo/release/label.tmpl
@@ -0,0 +1,14 @@
+{{/*
+Template Attributes:
+* Release: the release
+* IsLatest: boolean indicating whether this is the latest release, optional
+*/}}
+{{if .IsLatest}}
+ <span class="ui green label">{{ctx.Locale.Tr "repo.release.latest"}}</span>
+{{else if .Release.IsDraft}}
+ <span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>
+{{else if .Release.IsPrerelease}}
+ <span class="ui orange label">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
+{{else if (not .Release.IsTag)}}
+ <span class="ui green label">{{ctx.Locale.Tr "repo.release.stable"}}</span>
+{{end}}