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 -1
View File
@@ -117,7 +117,7 @@ func TestMilestonesForSpecificRepo(t *testing.T) {
func TestDashboardPagination(t *testing.T) {
ctx, _ := contexttest.MockContext(t, "/", contexttest.MockContextOption{Render: templates.PageRenderer()})
page := context.NewPagination(10, 3, 1, 3)
page := context.NewPagerBuilder(ctx).TotalCount(10).PerPageLimit(3).CurPage(1).NavPageNum(3).Build()
setting.AppSubURL = "/SubPath"
out, err := ctx.RenderToHTML("base/paginate", map[string]any{"Link": setting.AppSubURL, "Page": page})