aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/code.go
diff options
context:
space:
mode:
authorpuni9869 <80308335+puni9869@users.noreply.github.com>2023-09-13 16:17:35 +0530
committerGitHub <noreply@github.com>2023-09-13 18:47:35 +0800
commite0aacc7624238caaf959c512362ec2b69565c444 (patch)
tree3bf508b2ea4022be1213f4527b5a4513e0c49995 /routers/web/user/code.go
parenta38eca3f52f691667f8075263badffba4e9b97ae (diff)
downloadgitea-e0aacc7624238caaf959c512362ec2b69565c444.tar.gz
gitea-e0aacc7624238caaf959c512362ec2b69565c444.zip
Show the repo count in code tab on both user profile and org page. (#27048)
as title Screenshot before User Profile page <img width="1367" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/24e79689-ba2f-4c85-b591-fe5621746965"> after <img width="1346" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/754a7ee8-c2f0-424d-9ba8-be38a48140aa"> Org page <img width="1354" alt="image" src="https://github.com/go-gitea/gitea/assets/80308335/c96178d8-664f-45c5-a162-f4df5690d9d0"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/user/code.go')
-rw-r--r--routers/web/user/code.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/web/user/code.go b/routers/web/user/code.go
index 29b8b91c89..42d7284189 100644
--- a/routers/web/user/code.go
+++ b/routers/web/user/code.go
@@ -27,6 +27,11 @@ func CodeSearch(ctx *context.Context) {
shared_user.PrepareContextForProfileBigAvatar(ctx)
shared_user.RenderUserHeader(ctx)
+ if err := shared_user.LoadHeaderCount(ctx); err != nil {
+ ctx.ServerError("LoadHeaderCount", err)
+ return
+ }
+
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
ctx.Data["Title"] = ctx.Tr("explore.code")