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

search
{{if isAdmin:}} {{pass}} {{if isAdmin:}} {{pass}} {{for row in query :}} {{if isAdmin:}} {{pass}} {{if isAdmin:}} {{pass}} {{ total_file_count += row['file_count'] ; total_size += row['size'] }} {{if isAdmin:}} {{else:}} {{pass}} {{if row['has_admin_permission']:}} {{else:}} {{pass}} {{pass}}
name date info configs groups creator files
{{=row['name']}} {{ if row['run_date'] is not None: }} {{=row['run_date'] }} {{ pass }} {{=row['info']}} {{ configs = [] }} {{for conf in row['conf_list'] :}} {{filename = row['name'] + " (" + conf['name'] + ")"}} {{if conf['fused_file'] is not None :}} {{ configs.append(str(A(conf['name'], _href="index.html?sample_set=" + str(row['sample_set_id']) + "&config=" + str(conf['id']), _type="text/html", _onclick="event.preventDefault();event.stopPropagation();if( event.which == 2 ) { window.open(this.href); } else { myUrl.loadUrl(db, { 'sample_set_id' : '" + str(row['sample_set_id']) + "' , 'config' : " + str(conf['id']) + " }, '" + filename + "' ); }"))) }} {{else:}} {{ configs.append(conf['name']) }} {{pass}} {{pass}} {{= XML(", ".join(configs)) }} {{=row['groups']}} {{=row['creator']}} {{=row['file_count']}} ({{=vidjil_utils.format_size(row['size'])}})
{{if auth.can_create_patient():}} + new runs compare samples/runs {{else:}} {{pass}}

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