mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 09:57:07 +02: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:
1 parent
aa962deec0
commit
43253202e9
3 files changed
+11
-10
No files matched your search
@@ -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