Commit 250651b0 authored by Ryan Herbert's avatar Ryan Herbert

my account: sort by number of sets

parent 9f9a2289
......@@ -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)
......
......@@ -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']}})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment