diff options
author | Mario Lubenka <mario.lubenka@googlemail.com> | 2019-04-20 06:15:19 +0200 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-04-20 00:15:19 -0400 |
commit | fcbac38d6fd8c91be0da5e7f37e7bc69b071253a (patch) | |
tree | cdf7c901df75d0d2f26567d1090ed0e3c1af138d /routers/repo/milestone.go | |
parent | 40dc458bb69f9827e804e2fe51c9f42caf3d3ddc (diff) | |
download | gitea-fcbac38d6fd8c91be0da5e7f37e7bc69b071253a.tar.gz gitea-fcbac38d6fd8c91be0da5e7f37e7bc69b071253a.zip |
Unifies pagination template usage (#6531) (#6533)
Diffstat (limited to 'routers/repo/milestone.go')
-rw-r--r-- | routers/repo/milestone.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/repo/milestone.go b/routers/repo/milestone.go index 632c792c43..644f7e043b 100644 --- a/routers/repo/milestone.go +++ b/routers/repo/milestone.go @@ -14,7 +14,6 @@ import ( "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "github.com/Unknwon/paginater" ) const ( @@ -51,7 +50,6 @@ func Milestones(ctx *context.Context) { } else { total = int(closedCount) } - ctx.Data["Page"] = paginater.New(total, setting.UI.IssuePagingNum, page, 5) miles, err := models.GetMilestones(ctx.Repo.Repository.ID, page, isShowClosed, sortType) if err != nil { @@ -77,6 +75,11 @@ func Milestones(ctx *context.Context) { ctx.Data["SortType"] = sortType ctx.Data["IsShowClosed"] = isShowClosed + + pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5) + pager.AddParam(ctx, "state", "State") + ctx.Data["Page"] = pager + ctx.HTML(200, tplMilestone) } |