summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/release.go
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-07-05 03:08:16 -0400
committerGitHub <noreply@github.com>2023-07-05 07:08:16 +0000
commit04eea29ecbfed76ae693dab441adf5415b2e2f64 (patch)
tree22d6bb5ee81ff0ba18dddb5387cc9d58ff86dda7 /routers/web/repo/release.go
parent511be9fe6e06ece964ce93daae49f02d7880c96e (diff)
downloadgitea-04eea29ecbfed76ae693dab441adf5415b2e2f64.tar.gz
gitea-04eea29ecbfed76ae693dab441adf5415b2e2f64.zip
Fix tags header and pretty format numbers (#25624) (#25694)
Backport #25624 by @lunny This casused by #23465 Before release disabled <img width="1320" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/190a1c81-daa5-41bc-91ac-c9a0bf629b5f"> release enabled <img width="1320" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/a0372c31-727c-4ee0-a6b9-30e502498d90"> After release disabled <img width="1304" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/a747ea80-a3d9-4792-8f6d-e8955da78b9e"> release enabled <img width="1290" alt="图片" src="https://github.com/go-gitea/gitea/assets/81045/7c0bc43a-9149-4148-859d-35839aeb60ca"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web/repo/release.go')
-rw-r--r--routers/web/repo/release.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go
index 0950e68567..0b927a3a2f 100644
--- a/routers/web/repo/release.go
+++ b/routers/web/repo/release.go
@@ -203,6 +203,7 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
ctx.Data["Page"] = pager
if isTagList {
+ ctx.Data["PageIsViewCode"] = !ctx.Repo.Repository.UnitEnabled(ctx, unit.TypeReleases)
ctx.HTML(http.StatusOK, tplTagsList)
} else {
ctx.HTML(http.StatusOK, tplReleasesList)