mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +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:
@@ -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"), " ")
|
||||
|
Reference in New Issue
Block a user