summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorDenys Konovalov <kontakt@denyskon.de>2023-07-13 22:00:38 +0200
committerGitHub <noreply@github.com>2023-07-13 20:00:38 +0000
commiteec45b43db3b30c1d197e0d3cd03de00fd84e744 (patch)
treef48ec797aef4bdc887ea6dbcadf60044614e1d85 /routers
parentef90fdbd1d7e1f62ed5bf18757e00e97817eb602 (diff)
downloadgitea-eec45b43db3b30c1d197e0d3cd03de00fd84e744.tar.gz
gitea-eec45b43db3b30c1d197e0d3cd03de00fd84e744.zip
move issue filters to shared template (#25729)
Issue filters are being used on repo list page and on milestone issues page, and the code is mostly duplicated. This PR does the following changes: - move issue filters into a shared template - allow filtering milestone issues by project, so no need to hide this filter on milestone issues page - remove some dead code (e. g. issue actions in milestone issues template) - fix label filter dropdown width --------- Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/milestone.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/repo/milestone.go b/routers/web/repo/milestone.go
index 38ef693967..a6f7f56af7 100644
--- a/routers/web/repo/milestone.go
+++ b/routers/web/repo/milestone.go
@@ -264,6 +264,7 @@ func DeleteMilestone(ctx *context.Context) {
// MilestoneIssuesAndPulls lists all the issues and pull requests of the milestone
func MilestoneIssuesAndPulls(ctx *context.Context) {
milestoneID := ctx.ParamsInt64(":id")
+ projectID := ctx.FormInt64("project")
milestone, err := issues_model.GetMilestoneByRepoID(ctx, ctx.Repo.Repository.ID, milestoneID)
if err != nil {
if issues_model.IsErrMilestoneNotExist(err) {
@@ -289,7 +290,7 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
ctx.Data["Title"] = milestone.Name
ctx.Data["Milestone"] = milestone
- issues(ctx, milestoneID, 0, util.OptionalBoolNone)
+ issues(ctx, milestoneID, projectID, util.OptionalBoolNone)
ret, _ := issue.GetTemplatesFromDefaultBranch(ctx.Repo.Repository, ctx.Repo.GitRepo)
ctx.Data["NewIssueChooseTemplate"] = len(ret) > 0