Skip to content

Commit 1022838

Browse files
Added search input field to issue filter (#20623)
Added search input field to issue filter for label and milestone and assignee Co-authored-by: wxiaoguang <[email protected]>
1 parent 3f9e323 commit 1022838

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

templates/repo/issue/list.tmpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
4646
</span>
4747
<div class="menu">
48+
<div class="ui icon search input">
49+
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
50+
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_label"}}">
51+
</div>
4852
<span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
4953
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
5054
{{range .Labels}}
@@ -60,6 +64,10 @@
6064
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
6165
</span>
6266
<div class="menu">
67+
<div class="ui icon search input">
68+
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
69+
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_milestone"}}">
70+
</div>
6371
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_no_select"}}</a>
6472
{{range .Milestones}}
6573
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.Name}}</a>
@@ -90,6 +98,10 @@
9098
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
9199
</span>
92100
<div class="menu">
101+
<div class="ui icon search input">
102+
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
103+
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_assignee"}}">
104+
</div>
93105
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
94106
{{range .Assignees}}
95107
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.ID}}&poster={{$.PosterID}}">

templates/repo/issue/milestone_issues.tmpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
5252
</span>
5353
<div class="menu">
54+
<div class="ui icon search input">
55+
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
56+
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_label"}}">
57+
</div>
5458
<span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
5559
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
5660
{{range .Labels}}
@@ -82,6 +86,10 @@
8286
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
8387
</span>
8488
<div class="menu">
89+
<div class="ui icon search input">
90+
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
91+
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_assignee"}}">
92+
</div>
8593
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
8694
{{range .Assignees}}
8795
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&assignee={{.ID}}&poster={{$.PosterID}}">

0 commit comments

Comments
 (0)