summaryrefslogtreecommitdiffstats
path: root/routers/repo/release.go
diff options
context:
space:
mode:
authorMario Lubenka <mario.lubenka@googlemail.com>2019-04-20 06:15:19 +0200
committertechknowlogick <matti@mdranta.net>2019-04-20 00:15:19 -0400
commitfcbac38d6fd8c91be0da5e7f37e7bc69b071253a (patch)
treecdf7c901df75d0d2f26567d1090ed0e3c1af138d /routers/repo/release.go
parent40dc458bb69f9827e804e2fe51c9f42caf3d3ddc (diff)
downloadgitea-fcbac38d6fd8c91be0da5e7f37e7bc69b071253a.tar.gz
gitea-fcbac38d6fd8c91be0da5e7f37e7bc69b071253a.zip
Unifies pagination template usage (#6531) (#6533)
Diffstat (limited to 'routers/repo/release.go')
-rw-r--r--routers/repo/release.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go
index 38e8da1401..fdef533f10 100644
--- a/routers/repo/release.go
+++ b/routers/repo/release.go
@@ -15,8 +15,6 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/setting"
-
- "github.com/Unknwon/paginater"
)
const (
@@ -120,9 +118,12 @@ func Releases(ctx *context.Context) {
r.Note = markdown.RenderString(r.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
}
- pager := paginater.New(int(count), limit, page, 5)
- ctx.Data["Page"] = pager
ctx.Data["Releases"] = releases
+
+ pager := context.NewPagination(int(count), limit, page, 5)
+ pager.SetDefaultParams(ctx)
+ ctx.Data["Page"] = pager
+
ctx.HTML(200, tplReleases)
}