aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2022-10-03 20:05:53 +0800
committerGitHub <noreply@github.com>2022-10-03 20:05:53 +0800
commita08b48454970a0639039b730cbe616686e82bc0f (patch)
treee1e99706522b35ebab854c91a8a2a51adc56304a /templates
parentaf849ac00965ed3e2722ed89309da4c353fd9bee (diff)
downloadgitea-a08b48454970a0639039b730cbe616686e82bc0f.tar.gz
gitea-a08b48454970a0639039b730cbe616686e82bc0f.zip
Tag list should include draft releases with existing tags (#21263)
Before, a tag for a draft release disappeared in the tag list, fix #21262. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/release/list.tmpl6
1 files changed, 2 insertions, 4 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl
index d87d51f26c..6abb240cc3 100644
--- a/templates/repo/release/list.tmpl
+++ b/templates/repo/release/list.tmpl
@@ -77,14 +77,12 @@
<span class="ui green label">{{$.locale.Tr "repo.release.stable"}}</span>
{{end}}
<span class="tag text blue">
- <a class="df ac je" href="{{if .IsDraft}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a>
+ <a class="df ac je" href="{{if not .Sha1}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</a>
</span>
- {{if not .IsDraft}}
+ {{if .Sha1}}
<span class="commit">
<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a>
</span>
- {{end}}
- {{if .Sha1}}
{{template "repo/branch_dropdown" dict "root" $ "release" .}}
{{end}}
{{end}}