Commit f068eb4f authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

views/my_account/index.html: do not display empty/zero fields

parent ffc9f0a8
......@@ -13,11 +13,15 @@
{{ for role in keys: }}
<div id="{{=role}}_info" class="set_group">
<div class="set_group_header">
Group <b>{{=role}}<b> <span style='font-size: 80%;'>({{=result[role]['permissions']}})</span>
Group <b>{{=role}}</b>
{{if result[role]['permissions']:}}
<span style='font-size: 80%;'>({{=result[role]['permissions']}})</span>
{{pass}}
<hr>
</div>
{{ for set_type in ['patient', 'run', 'set']: }}
{{ r = result[role][set_type]['count'] }}
{{ if r['num_sets']: }}
<div class="set_cell margined-bottom">
<span class="{{=set_type}}_num_sets">{{=r['num_sets']}}</span>
<span class="button_token {{=r['sample_type']}}_token">{{=set_type}}s</span>,
......@@ -27,11 +31,13 @@
</span>
</div>
{{pass}}
{{pass}}
<div class="set_data margined-bottom">
{{ for tag in result[role]['tags']: }}
<a onclick="event.preventDefault();event.stopPropagation();db.callLinkable($(this))" href="/my_account/index" class="tag-link" data-linkable-type="tag" data-linkable-target-param="filter" data-linkable-name="#{{=tag.split(' ')[0]}}">#{{=tag}}</a>
{{pass}}
</div>
{{ if result[role]['fuses']: }}
<div class="set_data">
<div>results:</div>
{{ for fuse in result[role]['fuses']: }}
......@@ -48,6 +54,8 @@
</div>
{{pass}}
</div>
{{pass}}
{{ if result[role]['analyses']: }}
<div class="set_data">
<div>saved analyses:</div>
{{ for analysis in result[role]['analyses']: }}
......@@ -65,6 +73,7 @@
</div>
{{pass}}
</div>
{{pass}}
</div>
{{pass}}
</div>
......
Supports Markdown
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