summaryrefslogtreecommitdiffstats
path: root/templates/repo/sub_menu.tmpl
diff options
context:
space:
mode:
authorZettat123 <zettat123@gmail.com>2023-04-26 00:29:00 +0800
committerGitHub <noreply@github.com>2023-04-25 18:29:00 +0200
commit30c1cd97758592e20b6ecb3462da0f0289622828 (patch)
tree8ffa257323112ffe0fb1b216a8bc94a62a6ea87d /templates/repo/sub_menu.tmpl
parent5cf7da63ee74939595b8800787dcdb4c7290fa4f (diff)
downloadgitea-30c1cd97758592e20b6ecb3462da0f0289622828.tar.gz
gitea-30c1cd97758592e20b6ecb3462da0f0289622828.zip
Add tags list for repos whose release setting is disabled (#23465)
Close #23427 Co-Author: @wxiaoguang If a repo's release setting is enabled, the logic has't changed. Clicking the "Tags" button will jump to `/{user}/{repo}/tags` and `templates/repo/release/list.tmpl` template will be used. <img src="https://user-images.githubusercontent.com/15528715/224939362-bd8974fd-08b0-4f79-a114-3389d15847ca.png" width="600px" /> If the release setting is disabled, clicking the "Tags" button will still jump to `/{user}/{repo}/tags` but a new template `templates/repo/tag/list.tmpl` will be used. <img src="https://user-images.githubusercontent.com/15528715/233834564-74741e49-f4e9-47c8-ac12-e306642798dc.png" width="600px" /> Since both templates above need to render the tags list, I moved the tags list to a shared template located in `templates/repo/tag/table.tmpl`. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/repo/sub_menu.tmpl')
-rw-r--r--templates/repo/sub_menu.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl
index 9289295b1d..2be7d47a1c 100644
--- a/templates/repo/sub_menu.tmpl
+++ b/templates/repo/sub_menu.tmpl
@@ -10,7 +10,7 @@
<a href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a>
</div>
{{if $.Permission.CanRead $.UnitTypeCode}}
- <div class="item">
+ <div class="item{{if .PageIsTagList}} active{{end}}">
<a href="{{.RepoLink}}/tags">{{svg "octicon-tag"}} <b>{{.NumTags}}</b> {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
</div>
{{end}}