diff options
author | 853 <sonic853@qq.com> | 2023-10-25 13:55:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-25 13:55:56 +0800 |
commit | e544a277fe261aa5671a20751d6f83126579334a (patch) | |
tree | ae237000815028fcc65a3da033ba01dfb834ce60 /routers/web/org | |
parent | 572f0963edc71239634ee782a3c69213479f34ba (diff) | |
download | gitea-e544a277fe261aa5671a20751d6f83126579334a.tar.gz gitea-e544a277fe261aa5671a20751d6f83126579334a.zip |
Fix the missing repo count in new team page and edit team page (#27743)
Follow #26942
Before:


After:


Diffstat (limited to 'routers/web/org')
-rw-r--r-- | routers/web/org/teams.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go index 183b7dd266..9e65c8ba9c 100644 --- a/routers/web/org/teams.go +++ b/routers/web/org/teams.go @@ -276,6 +276,10 @@ func NewTeam(ctx *context.Context) { ctx.Data["PageIsOrgTeamsNew"] = true ctx.Data["Team"] = &org_model.Team{} ctx.Data["Units"] = unit_model.Units + if err := shared_user.LoadHeaderCount(ctx); err != nil { + ctx.ServerError("LoadHeaderCount", err) + return + } ctx.HTML(http.StatusOK, tplTeamNew) } @@ -463,6 +467,10 @@ func EditTeam(ctx *context.Context) { ctx.ServerError("LoadUnits", err) return } + if err := shared_user.LoadHeaderCount(ctx); err != nil { + ctx.ServerError("LoadHeaderCount", err) + return + } ctx.Data["Team"] = ctx.Org.Team ctx.Data["Units"] = unit_model.Units ctx.HTML(http.StatusOK, tplTeamNew) |