|
| 1 | +<div class="ui secondary filter menu"> |
| 2 | + <form id="repo-search-form" class="ui form ignore-dirty tw-flex-1 tw-flex tw-flex-row tw-gap-x-2"> |
| 3 | + {{if .Language}}<input hidden name="language" value="{{.Language}}">{{end}} |
| 4 | + <div class="ui fluid action input tw-flex-1"> |
| 5 | + {{template "shared/searchinput" dict "Value" .Keyword}} |
| 6 | + {{if .PageIsExploreRepositories}} |
| 7 | + <input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}"> |
| 8 | + {{else if .TabName}} |
| 9 | + <input type="hidden" name="tab" value="{{.TabName}}"> |
| 10 | + {{end}} |
| 11 | + <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> |
| 12 | + </div> |
| 13 | + <!-- Filter --> |
| 14 | + <div class="ui dropdown type jump item tw-mr-0"> |
| 15 | + <span class="text"> |
| 16 | + {{ctx.Locale.Tr "filter"}} |
| 17 | + </span> |
| 18 | + {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
| 19 | + <div class="menu"> |
| 20 | + <label class="item"><input type="radio" name="clear-filter"> {{ctx.Locale.Tr "filter.clear"}}</label> |
| 21 | + <div class="divider"></div> |
| 22 | + <label class="item"><input type="radio" name="archived" {{if .IsArchived.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_archived"}}</label> |
| 23 | + <label class="item"><input type="radio" name="archived" {{if (not (.IsArchived.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_archived"}}</label> |
| 24 | + <div class="divider"></div> |
| 25 | + <label class="item"><input type="radio" name="fork" {{if .IsFork.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_fork"}}</label> |
| 26 | + <label class="item"><input type="radio" name="fork" {{if (not (.IsFork.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_fork"}}</label> |
| 27 | + <div class="divider"></div> |
| 28 | + <label class="item"><input type="radio" name="mirror" {{if .IsMirror.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_mirror"}}</label> |
| 29 | + <label class="item"><input type="radio" name="mirror" {{if (not (.IsMirror.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_mirror"}}</label> |
| 30 | + <div class="divider"></div> |
| 31 | + <label class="item"><input type="radio" name="template" {{if .IsTemplate.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.is_template"}}</label> |
| 32 | + <label class="item"><input type="radio" name="template" {{if (not (.IsTemplate.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.not_template"}}</label> |
| 33 | + <div class="divider"></div> |
| 34 | + <label class="item"><input type="radio" name="private" {{if .IsPrivate.Value}}checked{{end}} value="1"> {{ctx.Locale.Tr "filter.private"}}</label> |
| 35 | + <label class="item"><input type="radio" name="private" {{if (not (.IsPrivate.ValueOrDefault true))}}checked{{end}} value="0"> {{ctx.Locale.Tr "filter.public"}}</label> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + <!-- Sort --> |
| 39 | + <div class="ui dropdown type jump item gt-mr-0"> |
| 40 | + <span class="text"> |
| 41 | + {{ctx.Locale.Tr "repo.issues.filter_sort"}} |
| 42 | + </span> |
| 43 | + {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
| 44 | + <div class="menu"> |
| 45 | + <label class="{{if eq .SortType "newest"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "newest"}}checked{{end}} value="newest"> {{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</label> |
| 46 | + <label class="{{if eq .SortType "oldest"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "oldest"}}checked{{end}} value="oldest"> {{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</label> |
| 47 | + <label class="{{if eq .SortType "alphabetically"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "alphabetically"}}checked{{end}} value="alphabetically"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</label> |
| 48 | + <label class="{{if eq .SortType "reversealphabetically"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "reversealphabetically"}}checked{{end}} value="reversealphabetically"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</label> |
| 49 | + <label class="{{if eq .SortType "recentupdate"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "recentupdate"}}checked{{end}} value="recentupdate"> {{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</label> |
| 50 | + <label class="{{if eq .SortType "leastupdate"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "leastupdate"}}checked{{end}} value="leastupdate"> {{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</label> |
| 51 | + {{if not .DisableStars}} |
| 52 | + <label class="{{if eq .SortType "moststars"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "moststars"}}checked{{end}} value="moststars"> {{ctx.Locale.Tr "repo.issues.filter_sort.moststars"}}</label> |
| 53 | + <label class="{{if eq .SortType "feweststars"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "feweststars"}}checked{{end}} value="feweststars"> {{ctx.Locale.Tr "repo.issues.filter_sort.feweststars"}}</label> |
| 54 | + {{end}} |
| 55 | + <label class="{{if eq .SortType "mostforks"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "mostforks"}}checked{{end}} value="mostforks"> {{ctx.Locale.Tr "repo.issues.filter_sort.mostforks"}}</label> |
| 56 | + <label class="{{if eq .SortType "fewestforks"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "fewestforks"}}checked{{end}} value="fewestforks"> {{ctx.Locale.Tr "repo.issues.filter_sort.fewestforks"}}</label> |
| 57 | + <label class="{{if eq .SortType "size"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "size"}}checked{{end}} value="size"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.by_size"}}</label> |
| 58 | + <label class="{{if eq .SortType "reversesize"}}active {{end}}item"><input hidden type="radio" name="sort" {{if eq .SortType "reversesize"}}checked{{end}} value="reversesize"> {{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_by_size"}}</label> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </form> |
| 62 | +</div> |
| 63 | +{{if and .PageIsExploreRepositories .OnlyShowRelevant}} |
| 64 | + <div class="ui message explore-relevancy-note"> |
| 65 | + <span data-tooltip-content="{{ctx.Locale.Tr "explore.relevant_repositories_tooltip"}}">{{ctx.Locale.Tr "explore.relevant_repositories" (printf "?only_show_relevant=0&sort=%s&q=%s&language=%s" $.SortType (QueryEscape $.Keyword) (QueryEscape $.Language))}}</span> |
| 66 | + </div> |
| 67 | +{{end}} |
0 commit comments