Skip to content

Commit bc9d014

Browse files
committed
apply changes in 27115
1 parent 3471fd4 commit bc9d014

File tree

2 files changed

+60
-35
lines changed

2 files changed

+60
-35
lines changed

routers/web/repo/issue.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
246246
isShowClosed = true
247247
}
248248

249+
archived := ctx.FormBool("archived")
250+
showArchivedLabels := "false"
251+
if archived {
252+
showArchivedLabels = "true"
253+
}
254+
249255
page := ctx.FormInt("page")
250256
if page <= 1 {
251257
page = 1
@@ -419,8 +425,8 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
419425
ctx.Data["IssueStats"] = issueStats
420426
ctx.Data["OpenCount"] = issueStats.OpenCount
421427
ctx.Data["ClosedCount"] = issueStats.ClosedCount
422-
ctx.Data["OpenLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=open&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID)
423-
ctx.Data["ClosedLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=closed&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID)
428+
ctx.Data["OpenLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=open&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d&archived=%s", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID, showArchivedLabels)
429+
ctx.Data["ClosedLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=closed&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d&archived=%s", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID, showArchivedLabels)
424430
ctx.Data["SelLabelIDs"] = labelIDs
425431
ctx.Data["SelectLabels"] = selectLabels
426432
ctx.Data["ViewType"] = viewType
@@ -436,6 +442,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
436442
} else {
437443
ctx.Data["State"] = "open"
438444
}
445+
ctx.Data["ShowArchivedLabels"] = archived
439446

440447
pager.AddParam(ctx, "q", "Keyword")
441448
pager.AddParam(ctx, "type", "ViewType")
@@ -446,11 +453,8 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
446453
pager.AddParam(ctx, "project", "ProjectID")
447454
pager.AddParam(ctx, "assignee", "AssigneeID")
448455
pager.AddParam(ctx, "poster", "PosterID")
456+
pager.AddParam(ctx, "archived", "ShowArchivedLabels")
449457

450-
if ctx.FormBool("archived") {
451-
ctx.Data["ShowArchivedLabels"] = true
452-
pager.AddParam(ctx, "archived", "ShowArchivedLabels")
453-
}
454458
ctx.Data["Page"] = pager
455459
}
456460

0 commit comments

Comments
 (0)