summaryrefslogtreecommitdiffstats
path: root/templates/repo/actions/status.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /templates/repo/actions/status.tmpl
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/repo/actions/status.tmpl')
-rw-r--r--templates/repo/actions/status.tmpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/templates/repo/actions/status.tmpl b/templates/repo/actions/status.tmpl
new file mode 100644
index 0000000..a0e02cf
--- /dev/null
+++ b/templates/repo/actions/status.tmpl
@@ -0,0 +1,29 @@
+<!-- This template should be kept the same as web_src/js/components/ActionRunStatus.vue
+ Please also update the vue file above if this template is modified.
+ action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
+-->
+{{- $size := 16 -}}
+{{- if .size -}}
+{{- $size = .size -}}
+{{- end -}}
+
+{{- $className := "" -}}
+{{- if .className -}}
+{{- $className = .className -}}
+{{- end -}}
+
+<span class="tw-flex tw-items-center" data-tooltip-content="{{ctx.Locale.Tr (printf "actions.status.%s" .status)}}">
+{{if eq .status "success"}}
+ {{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
+{{else if eq .status "skipped"}}
+ {{svg "octicon-skip" $size (printf "text grey %s" $className)}}
+{{else if eq .status "waiting"}}
+ {{svg "octicon-clock" $size (printf "text yellow %s" $className)}}
+{{else if eq .status "blocked"}}
+ {{svg "octicon-blocked" $size (printf "text yellow %s" $className)}}
+{{else if eq .status "running"}}
+ {{svg "octicon-meter" $size (printf "text yellow job-status-rotate %s" $className)}}
+{{else if or (eq .status "failure") or (eq .status "cancelled") or (eq .status "unknown")}}
+ {{svg "octicon-x-circle-fill" $size (printf "text red %s" $className)}}
+{{end}}
+</span>