]> source.dussan.org Git - gitea.git/commit
Fix sort order for organization home and user profile page (#31921)
authoryp05327 <576951401@qq.com>
Sun, 1 Sep 2024 16:55:05 +0000 (01:55 +0900)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 16:55:05 +0000 (16:55 +0000)
commit661a1e10f7abd3527d2abc027dec936022db9379
tree78eaf96d3e719efaaa3ae17739d209da86fe4245
parent55502265716f000a2c61c98fa093244e1310d97f
Fix sort order for organization home and user profile page (#31921)

Fix #31916

In #30876, `sortOrder` has been changed into a map, but it is only
implemented in explore.
~~But it seems that size sort order has no effect from long long ago,~~
not directly caused by the PR above.

I think it is still caused by #29231.
In #29231, it merged the sort orders from
`templates/explore/repo_search.tmpl` and
`templates/admin/repo/search.tmpl`.
In `templates/admin/repo/search.tmpl`, it contains size sort orders, but
not in `templates/explore/repo_search.tmpl`, which is used in non-admin
pages.
So `order by size` is added from #29231, but the handler was not added.

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
routers/web/org/home.go
routers/web/user/profile.go