1
0
Fork 0
forked from s3lph/matemat

Sort user list in db.list_users rather than during templating. Closes !82

This commit is contained in:
s3lph 2022-07-20 21:43:47 +02:00
parent c7f6e1e849
commit caee4a3ee7
2 changed files with 2 additions and 1 deletions

View file

@ -87,6 +87,7 @@ class MatematDatabase(object):
SELECT user_id, username, email, is_admin, is_member, balance, receipt_pref
FROM users
WHERE touchkey IS NOT NULL OR NOT :must_have_touchkey
ORDER BY username COLLATE NOCASE ASC
''', {
'must_have_touchkey': with_touchkey
}):

View file

@ -36,7 +36,7 @@
<div id="transfer-userlist">
<div id="scroll-up" onclick="scrollUserlist(-130);"></div>
<ul id="transfer-userlist-list">
{% for user in ((users if user != authuser) | sort(attribute='name')) %}
{% for user in (users if user != authuser) %}
<li onclick="set_transfer_user(this, {{ user.id }})">{{ user.name }}</li>
{% endfor %}
</ul>