Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
250651b0
Commit
250651b0
authored
Nov 11, 2020
by
Ryan Herbert
Browse files
my account: sort by number of sets
parent
9f9a2289
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/controllers/my_account.py
View file @
250651b0
...
...
@@ -224,8 +224,11 @@ def index():
involved_group_ids
=
get_involved_groups
()
# for search autocomplete
keys
=
sorted
(
result
.
keys
(),
key
=
lambda
x
:
(
result
[
x
][
'patient'
][
'count'
][
'num_sets'
]
+
result
[
x
][
'run'
][
'count'
][
'num_sets'
]
+
result
[
x
][
'set'
][
'count'
][
'num_sets'
]),
reverse
=
True
)
log
.
debug
(
"my account list (%.3fs)"
%
(
time
.
time
()
-
start
))
return
dict
(
result
=
result
,
return
dict
(
keys
=
keys
,
result
=
result
,
group_ids
=
group_list
,
involved_group_ids
=
involved_group_ids
)
...
...
server/web2py/applications/vidjil/views/my_account/index.html
View file @
250651b0
...
...
@@ -10,7 +10,7 @@
</div>
</div>
<div
class=
"db_block"
>
{{ for role in
result
: }}
{{ for role in
keys
: }}
<div
id=
"{{=role}}_info"
class=
"set_group"
>
<div
class=
"set_group_header"
>
{{=role}} ({{=result[role]['permissions']}})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment