summaryrefslogtreecommitdiffstats
path: root/routers/user/home.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/home.go')
-rw-r--r--routers/user/home.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 8eedeb70bd..79377ac500 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -18,7 +18,6 @@ import (
"code.gitea.io/gitea/modules/util"
"github.com/Unknwon/com"
- "github.com/Unknwon/paginater"
"github.com/keybase/go-crypto/openpgp"
"github.com/keybase/go-crypto/openpgp/armor"
)
@@ -354,7 +353,6 @@ func Issues(ctx *context.Context) {
ctx.Data["CommitStatus"] = commitStatus
ctx.Data["Repos"] = showRepos
ctx.Data["Counts"] = counts
- ctx.Data["Page"] = paginater.New(total, setting.UI.IssuePagingNum, page, 5)
ctx.Data["IssueStats"] = issueStats
ctx.Data["ViewType"] = viewType
ctx.Data["SortType"] = sortType
@@ -367,6 +365,16 @@ func Issues(ctx *context.Context) {
ctx.Data["State"] = "open"
}
+ pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5)
+ pager.AddParam(ctx, "type", "ViewType")
+ pager.AddParam(ctx, "repo", "RepoID")
+ pager.AddParam(ctx, "sort", "SortType")
+ pager.AddParam(ctx, "state", "State")
+ pager.AddParam(ctx, "labels", "SelectLabels")
+ pager.AddParam(ctx, "milestone", "MilestoneID")
+ pager.AddParam(ctx, "assignee", "AssigneeID")
+ ctx.Data["Page"] = pager
+
ctx.HTML(200, tplIssues)
}
@@ -534,10 +542,13 @@ func showOrgProfile(ctx *context.Context) {
ctx.Data["Repos"] = repos
ctx.Data["Total"] = count
- ctx.Data["Page"] = paginater.New(int(count), setting.UI.User.RepoPagingNum, page, 5)
ctx.Data["Members"] = org.Members
ctx.Data["Teams"] = org.Teams
+ pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5)
+ pager.SetDefaultParams(ctx)
+ ctx.Data["Page"] = pager
+
ctx.HTML(200, tplOrgHome)
}