aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-05-11 21:19:42 +0800
committerGitHub <noreply@github.com>2023-05-11 21:19:42 +0800
commit365bb77a5497d492836bf823cf780c823db27e8c (patch)
treee14243ff42dee65fa7b2338de417f7e36b4e622b /templates
parentf6e029e6c7849d4361abf7f1d749b5d528364ac4 (diff)
downloadgitea-365bb77a5497d492836bf823cf780c823db27e8c.tar.gz
gitea-365bb77a5497d492836bf823cf780c823db27e8c.zip
Fix issues list page multiple selection update milestones (#24660)
Fix #24651
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/list.tmpl23
1 files changed, 18 insertions, 5 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index d739561d27..68d40ffea7 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -241,7 +241,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"}}
@@ -250,10 +250,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>