summaryrefslogtreecommitdiffstats
path: root/templates/shared/issueicon.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /templates/shared/issueicon.tmpl
parentInitial commit. (diff)
downloadforgejo-upstream.tar.xz
forgejo-upstream.zip
Adding upstream version 9.0.0.HEADupstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r--templates/shared/issueicon.tmpl25
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/shared/issueicon.tmpl b/templates/shared/issueicon.tmpl
new file mode 100644
index 0000000..d7c4414
--- /dev/null
+++ b/templates/shared/issueicon.tmpl
@@ -0,0 +1,25 @@
+{{if .IsPull}}
+ {{if not .PullRequest}}
+ No PullRequest
+ {{else}}
+ {{if .IsClosed}}
+ {{if .PullRequest.HasMerged}}
+ {{svg "octicon-git-merge" 16 "text purple"}}
+ {{else}}
+ {{svg "octicon-git-pull-request-closed" 16 "text red"}}
+ {{end}}
+ {{else}}
+ {{if .PullRequest.IsWorkInProgress ctx}}
+ {{svg "octicon-git-pull-request-draft" 16 "text grey"}}
+ {{else}}
+ {{svg "octicon-git-pull-request" 16 "text green"}}
+ {{end}}
+ {{end}}
+ {{end}}
+{{else}}
+ {{if .IsClosed}}
+ {{svg "octicon-issue-closed" 16 "text red"}}
+ {{else}}
+ {{svg "octicon-issue-opened" 16 "text green"}}
+ {{end}}
+{{end}}