Skip to content

Commit

Permalink
Fix issues list page multiple selection update milestones (go-gitea#2…
Browse files Browse the repository at this point in the history
…4660) (go-gitea#24663)

Backport go-gitea#24660 by @lunny

Fix go-gitea#24651

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 8f72201)
  • Loading branch information
GiteaBot authored and earl-warren committed May 16, 2023
1 parent 937b8e8 commit 55d0620
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions templates/repo/issue/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
</div>

<!-- Milestone -->
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
<span class="text">
{{.locale.Tr "repo.issues.action_milestone"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
Expand All @@ -266,10 +266,23 @@
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone">
{{.locale.Tr "repo.issues.action_milestone_no_select"}}
</div>
{{range .Milestones}}
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
{{.Name}}
</div>
{{if .OpenMilestones}}
<div class="divider"></div>
<div class="header">{{.locale.Tr "repo.issues.filter_milestone_open"}}</div>
{{range .OpenMilestones}}
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
{{.Name}}
</div>
{{end}}
{{end}}
{{if .ClosedMilestones}}
<div class="divider"></div>
<div class="header">{{.locale.Tr "repo.issues.filter_milestone_open"}}</div>
{{range .ClosedMilestones}}
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
{{.Name}}
</div>
{{end}}
{{end}}
</div>
</div>
Expand Down

0 comments on commit 55d0620

Please sign in to comment.