]> source.dussan.org Git - gitea.git/commit
Add tags list for repos whose release setting is disabled (#23465) (#24369)
authorZettat123 <zettat123@gmail.com>
Thu, 27 Apr 2023 04:40:36 +0000 (12:40 +0800)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 04:40:36 +0000 (12:40 +0800)
commite301e26d7ad6350698f8868d8eb833b25ff00e2f
tree7942aba143de121cc0a594cc52b510bfc1193dab
parentd2efd2bf7363f8460e2ad6df01065fd30e7d3d4a
Add tags list for repos whose release setting is disabled (#23465)  (#24369)

Backport #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`.
routers/web/repo/release.go
routers/web/web.go
templates/repo/release/list.tmpl
templates/repo/sub_menu.tmpl
templates/repo/sub_menu_release_tag.tmpl [new file with mode: 0644]
templates/repo/tag/list.tmpl [new file with mode: 0644]
web_src/css/index.css
web_src/css/repository-release-tag.css [new file with mode: 0644]
web_src/css/repository.css