mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
Change default sort order (#2647)
* sort repositories by `updated_unix` in Explore * Fix UI problem * Added missing sort order "newest" * Change default sort order * fmt
This commit is contained in:
parent
aa962deec0
commit
43253202e9
3 changed files with 11 additions and 10 deletions
|
@ -126,12 +126,7 @@ func Profile(ctx *context.Context) {
|
|||
orderBy = models.SearchOrderByAlphabetically
|
||||
default:
|
||||
ctx.Data["SortType"] = "recentupdate"
|
||||
orderBy = models.SearchOrderByNewest
|
||||
}
|
||||
|
||||
// set default sort value if sort is empty.
|
||||
if ctx.Query("sort") == "" {
|
||||
ctx.Data["SortType"] = "recentupdate"
|
||||
orderBy = models.SearchOrderByRecentUpdated
|
||||
}
|
||||
|
||||
keyword := strings.Trim(ctx.Query("q"), " ")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue