forked from forgejo/forgejo
Allow to set explore page default sort (#27951)
as title --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
parent
69d98f83f9
commit
16ba16dbe9
8 changed files with 28 additions and 15 deletions
|
@ -37,6 +37,9 @@ const (
|
|||
tplUserEdit base.TplName = "admin/user/edit"
|
||||
)
|
||||
|
||||
// UserSearchDefaultAdminSort is the default sort type for admin view
|
||||
const UserSearchDefaultAdminSort = "alphabetically"
|
||||
|
||||
// Users show all the users
|
||||
func Users(ctx *context.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("admin.users")
|
||||
|
@ -56,7 +59,7 @@ func Users(ctx *context.Context) {
|
|||
|
||||
sortType := ctx.FormString("sort")
|
||||
if sortType == "" {
|
||||
sortType = explore.UserSearchDefaultAdminSort
|
||||
sortType = UserSearchDefaultAdminSort
|
||||
ctx.SetFormString("sort", sortType)
|
||||
}
|
||||
ctx.PageData["adminUserListSearchForm"] = map[string]any{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue