mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-23 05:03:39 +09:00
refactor: pagination/pager (#39162)
This commit is contained in:
@@ -64,8 +64,7 @@ func Packages(ctx *context.Context) {
|
||||
ctx.Data["Total"] = total
|
||||
ctx.Data["RepositoryAccessMap"] = map[int64]bool{ctx.Repo.Repository.ID: true} // There is only the current repository
|
||||
|
||||
pager := context.NewPagination(total, setting.UI.PackagesPagingNum, page, 5)
|
||||
pager.AddParamFromRequest(ctx.Req)
|
||||
pager := context.NewPagerBuilder(ctx).TotalCount(total).PerPageLimit(setting.UI.PackagesPagingNum).CurPage(page).Build()
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplPackagesList)
|
||||
|
||||
Reference in New Issue
Block a user