summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/milestones.tmpl
diff options
context:
space:
mode:
authorRoger Luo <rogerluo410@gmail.com>2021-04-08 19:53:59 +0800
committerGitHub <noreply@github.com>2021-04-08 13:53:59 +0200
commitfa06e98553b78da66cb75e13cffe56b3ef013447 (patch)
treea448a47ea1f0f7643d705a9da6bbe106d7e9eff7 /templates/repo/issue/milestones.tmpl
parent0d1a5e0ffcf689e6e6b2aaa4a4251db74f6b487b (diff)
downloadgitea-fa06e98553b78da66cb75e13cffe56b3ef013447.tar.gz
gitea-fa06e98553b78da66cb75e13cffe56b3ef013447.zip
Add dashboard milestone search and repo milestone search by name (#14866)
Feature for issue #13845: - Add milestones search by name on dashboard milestones page. - Add milestones search by name on repo issue/milestones page.
Diffstat (limited to 'templates/repo/issue/milestones.tmpl')
-rw-r--r--templates/repo/issue/milestones.tmpl66
1 files changed, 42 insertions, 24 deletions
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index ecb7cd95f1..c572e0c3f3 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -12,34 +12,52 @@
</div>
<div class="ui divider"></div>
{{template "base/alert" .}}
- <div class="ui compact tiny menu">
- <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open">
- {{svg "octicon-milestone" 16 "mr-3"}}
- {{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
- </a>
- <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=closed">
- {{svg "octicon-milestone" 16 "mr-3"}}
- {{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
- </a>
- </div>
- <div class="ui right floated secondary filter menu">
- <!-- Sort -->
- <div class="ui dropdown type jump item">
- <span class="text">
- {{.i18n.Tr "repo.issues.filter_sort"}}
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- </span>
- <div class="menu">
- <a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?sort=closestduedate&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
- <a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?sort=furthestduedate&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
- <a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?sort=leastcomplete&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.least_complete"}}</a>
- <a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?sort=mostcomplete&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.most_complete"}}</a>
- <a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?sort=mostissues&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.most_issues"}}</a>
- <a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?sort=leastissues&state={{$.State}}">{{.i18n.Tr "repo.milestones.filter_sort.least_issues"}}</a>
+ <div class="ui three column stackable grid">
+ <div class="column">
+ <div class="ui compact tiny menu">
+ <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}">
+ {{svg "octicon-milestone" 16 "mr-3"}}
+ {{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
+ </a>
+ <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=closed&q={{$.Keyword}}">
+ {{svg "octicon-milestone" 16 "mr-3"}}
+ {{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
+ </a>
+ </div>
+ </div>
+
+ <!-- Search -->
+ <div class="column center aligned">
+ <form class="ui form ignore-dirty">
+ <div class="ui search fluid action input">
+ <input type="hidden" name="state" value="{{$.State}}"/>
+ <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
+ <button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button>
+ </div>
+ </form>
+ </div>
+
+ <div class="column right aligned df ac je">
+ <!-- Sort -->
+ <div class="ui dropdown type jump item">
+ <span class="text">
+ {{.i18n.Tr "repo.issues.filter_sort"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
+ <a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
+ <a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.least_complete"}}</a>
+ <a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.most_complete"}}</a>
+ <a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.most_issues"}}</a>
+ <a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.least_issues"}}</a>
+ </div>
</div>
</div>
</div>
+
+ <!-- milestone list -->
<div class="milestone list">
{{range .Milestones}}
<li class="item">