{{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 i in range(0, min(len(query), step)) :}} {{data = query[i]}} {{ 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 {{=helper.get_type()}} compare samples/patients {{else:}} {{pass}}

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