mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-06 13:03:24 +09:00
refactor: pagination/pager (#39162)
This commit is contained in:
@@ -93,8 +93,7 @@ func Emails(ctx *context.Context) {
|
||||
ctx.Data["Total"] = count
|
||||
ctx.Data["Emails"] = emails
|
||||
|
||||
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, tplEmails)
|
||||
|
||||
Reference in New Issue
Block a user