Skip to content

Commit e0aacc7

Browse files
puni9869wxiaoguang
andauthored
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 <[email protected]>
1 parent a38eca3 commit e0aacc7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/web/user/code.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ func CodeSearch(ctx *context.Context) {
2727
shared_user.PrepareContextForProfileBigAvatar(ctx)
2828
shared_user.RenderUserHeader(ctx)
2929

30+
if err := shared_user.LoadHeaderCount(ctx); err != nil {
31+
ctx.ServerError("LoadHeaderCount", err)
32+
return
33+
}
34+
3035
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
3136
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
3237
ctx.Data["Title"] = ctx.Tr("explore.code")

0 commit comments

Comments
 (0)