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 diff --git a/templates/repo/issue/filters.tmpl b/templates/repo/issue/filters.tmpl new file mode 100644 index 0000000000..edc483d752 --- /dev/null +++ b/templates/repo/issue/filters.tmpl @@ -0,0 +1,194 @@ +
+
+ {{if and ($.CanWriteIssuesOrPulls) (gt (len .Issues) 0)}} + + {{end}} + {{template "repo/issue/openclose" .}} +
+
+ +
+
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index c7d73c6667..8eb85a3298 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -81,197 +81,8 @@ {{end}} {{end}} -
-
- {{if and ($.CanWriteIssuesOrPulls) (gt (len .Issues) 0)}} - - {{end}} - {{template "repo/issue/openclose" .}} -
-
- -
-
+ {{template "repo/issue/filters" .}}
@@ -282,12 +93,12 @@ {{if not .Repository.IsArchived}} {{if .IsShowClosed}} - + {{else}} - + {{end}} {{if $.IsRepoAdmin}} - diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 5913f59fe8..dab6ef3de6 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -50,155 +50,8 @@
-
-
- {{template "repo/issue/openclose" .}} -
-
- -
-
- -
-
- {{template "repo/issue/openclose" .}} -
-
- -
-
{{template "shared/issuelist" dict "." . "listType" "milestone"}}
diff --git a/web_src/css/repo.css b/web_src/css/repo.css index da5cd06b3e..ff539228f5 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -169,6 +169,7 @@ /* the label-filter is the first dropdown, it shouldn't be shown leftward, otherwise it may go out the viewport (left side) */ .repository .filter.menu .ui.dropdown.label-filter .menu { + min-width: max-content; right: unset; left: 0; } diff --git a/web_src/css/repo/issue-list.css b/web_src/css/repo/issue-list.css index 8602bb9a97..7769a16f5f 100644 --- a/web_src/css/repo/issue-list.css +++ b/web_src/css/repo/issue-list.css @@ -1,6 +1,6 @@ .issue-list-toolbar { display: flex; - flex-wrap: wrap; + flex-wrap: wrap-reverse; justify-content: space-between; align-items: flex-start; gap: 1rem; @@ -14,13 +14,9 @@ .issue-list-toolbar-right .filter.menu { flex-direction: row; flex-wrap: wrap; - gap: 8px; } @media (max-width: 767.98px) { - .issue-list-toolbar { - flex-direction: column-reverse; - } .issue-list-toolbar-right .dropdown .menu { left: auto !important; right: auto !important;