refactor: pagination/pager (#39162)

This commit is contained in:
wxiaoguang
2026-08-29 08:20:46 +02:00
committed by GitHub
parent 9297205f2c
commit fedf219e77
42 changed files with 133 additions and 131 deletions
+1 -2
View File
@@ -115,8 +115,7 @@ func RenderUserSearch(ctx *context.Context, opts user_model.SearchUserOptions, t
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
pager := context.NewPagination(count, opts.PageSize, opts.Page, 5)
pager.AddParamFromRequest(ctx.Req)
pager := context.NewPagerBuilder(ctx).TotalCount(count).PerPageLimit(opts.PageSize).CurPage(opts.Page).Build()
ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, tplName)