From 1ee4882b8827c3fc5feb7fd87559e1f292da41ea Mon Sep 17 00:00:00 2001 From: Nanguan Lin <70063547+lng2020@users.noreply.github.com> Date: Thu, 7 Sep 2023 09:44:47 +0800 Subject: [PATCH] Fix the missing repo count (#26942) The commit (https://github.com/go-gitea/gitea/commit/958d148043a6ace08776b1fd5ec0a5859144dea0) forgot two pages :stuck_out_tongue_closed_eyes: ![ksnip_20230906-182626](https://github.com/go-gitea/gitea/assets/70063547/6da529e9-3028-46fb-8065-abfd804a078b) BTW, the `leave` button is in a weird position --- routers/web/org/teams.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go index 1e0287fe27..38bc8b4e3a 100644 --- a/routers/web/org/teams.go +++ b/routers/web/org/teams.go @@ -370,6 +370,12 @@ func TeamMembers(ctx *context.Context) { ctx.Data["Title"] = ctx.Org.Team.Name ctx.Data["PageIsOrgTeams"] = true ctx.Data["PageIsOrgTeamMembers"] = true + + if err := shared_user.LoadHeaderCount(ctx); err != nil { + ctx.ServerError("LoadHeaderCount", err) + return + } + if err := ctx.Org.Team.LoadMembers(ctx); err != nil { ctx.ServerError("GetMembers", err) return @@ -392,6 +398,12 @@ func TeamRepositories(ctx *context.Context) { ctx.Data["Title"] = ctx.Org.Team.Name ctx.Data["PageIsOrgTeams"] = true ctx.Data["PageIsOrgTeamRepos"] = true + + if err := shared_user.LoadHeaderCount(ctx); err != nil { + ctx.ServerError("LoadHeaderCount", err) + return + } + if err := ctx.Org.Team.LoadRepositories(ctx); err != nil { ctx.ServerError("GetRepositories", err) return