{{extend 'db_layout.html'}} {{import vidjil_utils}} {{total_file_count = 0 ; total_size = 0}}

search
page: {{ if page > 0: }}
<
{{ pass }} {{= page + 1 }} {{if len(query) > step : }}
>
{{ pass }}
{{ for header in fields: }} {{if isAdmin or header['public']:}} {{ pass }} {{ pass }} {{for data in query :}} {{ for field in fields: }} {{ pass }} {{ total_file_count += data.file_count ; total_size += data.size }} {{if isAdmin:}} {{else:}} {{pass}} {{if data.has_permission:}} {{else:}} {{pass}} {{pass}}
{{=header['name']}}
{{= field['call'](data)}}
{{if auth.can_create_patient():}} + new {{=type}} compare samples/patients {{else:}} {{pass}}

{{ =len(query) }} {{=type}}s, {{ =total_file_count }} files ({{ =vidjil_utils.format_size(total_size) }})