mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 21:05:34 +03:00
Backport of #22081 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
parent
a8534ac4a4
commit
c057590a3a
2 changed files with 6 additions and 2 deletions
|
@ -58,6 +58,10 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
|
||||||
orderBy = "`user`.updated_unix ASC"
|
orderBy = "`user`.updated_unix ASC"
|
||||||
case "reversealphabetically":
|
case "reversealphabetically":
|
||||||
orderBy = "`user`.name DESC"
|
orderBy = "`user`.name DESC"
|
||||||
|
case "lastlogin":
|
||||||
|
orderBy = "`user`.last_login_unix ASC"
|
||||||
|
case "reverselastlogin":
|
||||||
|
orderBy = "`user`.last_login_unix DESC"
|
||||||
case UserSearchDefaultSortType: // "alphabetically"
|
case UserSearchDefaultSortType: // "alphabetically"
|
||||||
default:
|
default:
|
||||||
orderBy = "`user`.name ASC"
|
orderBy = "`user`.name ASC"
|
||||||
|
|
|
@ -76,9 +76,9 @@
|
||||||
<th>{{.i18n.Tr "admin.users.2fa"}}</th>
|
<th>{{.i18n.Tr "admin.users.2fa"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||||
<th data-sortt-asc="leastupdate" data-sortt-desc="recentupdate">
|
<th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin">
|
||||||
{{.i18n.Tr "admin.users.last_login"}}
|
{{.i18n.Tr "admin.users.last_login"}}
|
||||||
{{SortArrow "leastupdate" "recentupdate" $.SortType false}}
|
{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
|
||||||
</th>
|
</th>
|
||||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue