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/user/notification.go | |
parent | 40dc458bb69f9827e804e2fe51c9f42caf3d3ddc (diff) | |
download | gitea-fcbac38d6fd8c91be0da5e7f37e7bc69b071253a.tar.gz gitea-fcbac38d6fd8c91be0da5e7f37e7bc69b071253a.zip |
Unifies pagination template usage (#6531) (#6533)
Diffstat (limited to 'routers/user/notification.go')
-rw-r--r-- | routers/user/notification.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/routers/user/notification.go b/routers/user/notification.go index 32cacdd2c4..8c23d76fa9 100644 --- a/routers/user/notification.go +++ b/routers/user/notification.go @@ -1,3 +1,7 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + package user import ( @@ -6,8 +10,6 @@ import ( "strconv" "strings" - "github.com/Unknwon/paginater" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -80,7 +82,11 @@ func Notifications(c *context.Context) { c.Data["Keyword"] = keyword c.Data["Status"] = status c.Data["Notifications"] = notifications - c.Data["Page"] = paginater.New(int(total), perPage, page, 5) + + pager := context.NewPagination(int(total), perPage, page, 5) + pager.SetDefaultParams(c) + c.Data["Page"] = pager + c.HTML(200, tplNotification) } |