mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
committed by
techknowlogick
parent
40dc458bb6
commit
fcbac38d6f
@@ -27,7 +27,6 @@ import (
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/Unknwon/paginater"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -186,8 +185,7 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB
|
||||
} else {
|
||||
total = int(issueStats.ClosedCount)
|
||||
}
|
||||
pager := paginater.New(total, setting.UI.IssuePagingNum, page, 5)
|
||||
ctx.Data["Page"] = pager
|
||||
pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5)
|
||||
|
||||
var issues []*models.Issue
|
||||
if forceEmpty {
|
||||
@@ -199,7 +197,7 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB
|
||||
PosterID: posterID,
|
||||
MentionedID: mentionedID,
|
||||
MilestoneID: milestoneID,
|
||||
Page: pager.Current(),
|
||||
Page: pager.Paginater.Current(),
|
||||
PageSize: setting.UI.IssuePagingNum,
|
||||
IsClosed: util.OptionalBoolOf(isShowClosed),
|
||||
IsPull: isPullOption,
|
||||
@@ -268,6 +266,15 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB
|
||||
} else {
|
||||
ctx.Data["State"] = "open"
|
||||
}
|
||||
|
||||
pager.AddParam(ctx, "q", "Keyword")
|
||||
pager.AddParam(ctx, "type", "ViewType")
|
||||
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
|
||||
}
|
||||
|
||||
// Issues render issues page
|
||||
|
Reference in New Issue
Block a user