summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/milestone/select_menu.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /templates/repo/issue/milestone/select_menu.tmpl
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r--templates/repo/issue/milestone/select_menu.tmpl39
1 files changed, 39 insertions, 0 deletions
diff --git a/templates/repo/issue/milestone/select_menu.tmpl b/templates/repo/issue/milestone/select_menu.tmpl
new file mode 100644
index 0000000..570acc2
--- /dev/null
+++ b/templates/repo/issue/milestone/select_menu.tmpl
@@ -0,0 +1,39 @@
+{{$useHTMX := not .NewIssuePage}}
+{{if or .OpenMilestones .ClosedMilestones}}
+ <div class="ui icon search input">
+ <i class="icon">{{svg "octicon-search" 16}}</i>
+ <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_milestones"}}">
+ </div>
+ <div class="divider"></div>
+{{end}}
+<div class="no-select item"{{if $useHTMX}} hx-post="{{$.RepoLink}}/issues/milestone?issue_ids={{$.Issue.ID}}&htmx=true"{{end}}>{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}</div>
+{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
+ <div class="disabled item">
+ {{ctx.Locale.Tr "repo.issues.new.no_items"}}
+ </div>
+{{else}}
+ {{if .OpenMilestones}}
+ <div class="divider"></div>
+ <div class="header">
+ {{ctx.Locale.Tr "repo.issues.new.open_milestone"}}
+ </div>
+ {{range .OpenMilestones}}
+ <a class="item"{{if $useHTMX}} hx-post="{{$.RepoLink}}/issues/milestone?id={{.ID}}&issue_ids={{$.Issue.ID}}&htmx=true"{{else}} data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"{{end}}>
+ {{svg "octicon-milestone" 16 "tw-mr-1"}}
+ {{.Name}}
+ </a>
+ {{end}}
+ {{end}}
+ {{if .ClosedMilestones}}
+ <div class="divider"></div>
+ <div class="header">
+ {{ctx.Locale.Tr "repo.issues.new.closed_milestone"}}
+ </div>
+ {{range .ClosedMilestones}}
+ <a class="item"{{if $useHTMX}} hx-post="{{$.RepoLink}}/issues/milestone?id={{.ID}}&issue_ids={{$.Issue.ID}}&htmx=true"{{else}} data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"{{end}}>
+ {{svg "octicon-milestone" 16 "tw-mr-1"}}
+ {{.Name}}
+ </a>
+ {{end}}
+ {{end}}
+{{end}}