mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
fix(ui): update sort dropdown structure for consistency across templates (#11423)
Main modified pages `/milestones`, `/issues`, `/pulls` and `/user/repo/projects` | Before | After | |----|----| |  |  | Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11423 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: panc <pan0xc@foxmail.com> Co-committed-by: panc <pan0xc@foxmail.com>
This commit is contained in:
parent
8531c059f6
commit
a4821c2bf9
3 changed files with 12 additions and 8 deletions
|
|
@ -23,7 +23,8 @@
|
|||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.project_kind")}}
|
||||
</form>
|
||||
<!-- Sort -->
|
||||
<div class="list-header-sort ui dropdown type jump item">
|
||||
<div class="ui secondary menu tw-mt-0">
|
||||
<div class="list-header-sort ui dropdown type jump item">
|
||||
<span class="text">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||
</span>
|
||||
|
|
@ -34,6 +35,7 @@
|
|||
<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="milestone-list">
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
<div class="list-header ui dropdown type jump item">
|
||||
<span class="text tw-whitespace-nowrap">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_type"}}
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="ui menu">
|
||||
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="?type=created_by&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
|
||||
<div class="ui circular mini label tw-ml-0">{{CountFmt .IssueStats.CreateCount}}</div>
|
||||
|
|
@ -76,8 +76,8 @@
|
|||
<div class="list-header-sort ui dropdown type jump item">
|
||||
<span class="text tw-whitespace-nowrap">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
{{$keyword := StringUtils.RemoveAllPrefix $.Keyword "sort:"}}
|
||||
{{$o := .}}
|
||||
|
|
|
|||
|
|
@ -53,11 +53,12 @@
|
|||
{{template "shared/search/combo" dict "Value" $.Keyword}}
|
||||
</form>
|
||||
<!-- Sort -->
|
||||
<div class="list-header-sort ui dropdown type jump item">
|
||||
<span class="text">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="ui secondary menu tw-mt-0">
|
||||
<div class="list-header-sort ui dropdown type jump item">
|
||||
<span class="text">
|
||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||
</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.earliest_due_data"}}</a>
|
||||
<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.latest_due_date"}}</a>
|
||||
|
|
@ -68,6 +69,7 @@
|
|||
<a class="{{if eq .SortType "name"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=name&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="milestone-list">
|
||||
{{range .Milestones}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue