mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 11:20:42 +00:00
[PORT] Added default sorting milestones by name (gitea#27084)
Resolves https://github.com/go-gitea/gitea/issues/26996 Added default sorting for milestones by name. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> --- Conflict resolution: trivial, was due to the improvement made to 'the due date sorting' strings. (cherry picked from commit e8d4b7a8b198eca3b0bd117efb422d7d7cac93fe)
This commit is contained in:
parent
d405143919
commit
5e8a830505
4 changed files with 6 additions and 1 deletions
|
@ -70,8 +70,10 @@ func (opts FindMilestoneOptions) ToOrders() string {
|
|||
return "num_issues DESC"
|
||||
case "id":
|
||||
return "id ASC"
|
||||
case "name":
|
||||
return "name DESC"
|
||||
default:
|
||||
return "deadline_unix ASC, id ASC"
|
||||
return "deadline_unix ASC, name ASC"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1996,6 +1996,7 @@ milestones.edit_success = Milestone "%s" has been updated.
|
|||
milestones.deletion = Delete milestone
|
||||
milestones.deletion_desc = Deleting a milestone removes it from all related issues. Continue?
|
||||
milestones.deletion_success = The milestone has been deleted.
|
||||
milestones.filter_sort.name = Name
|
||||
milestones.filter_sort.earliest_due_data = Nearest due date
|
||||
milestones.filter_sort.latest_due_date = Farthest due date
|
||||
milestones.filter_sort.least_complete = Least complete
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
<a class="{{if eq .SortType "mostcomplete"}}active {{end}}item" href="?sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_complete"}}</a>
|
||||
<a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
|
||||
<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
||||
<a class="{{if eq .SortType "name"}}active {{end}}item" href="{{$.Link}}?sort=name&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
<a class="{{if eq .SortType "mostcomplete"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_complete"}}</a>
|
||||
<a class="{{if eq .SortType "mostissues"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
|
||||
<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
||||
<a class="{{if eq .SortType "name"}}active {{end}}item" href="{{$.Link}}?sort=name&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue