Commit 9c2965bf authored by Mikaël Salson's avatar Mikaël Salson

controllers/sample_set.py + view: displayed associated sets only if needed

parent 99e95416
Pipeline #159716 passed with stages
in 16 minutes and 56 seconds
......@@ -158,6 +158,7 @@ def index():
'table_name': "sample_set"})
#if (auth.can_view_patient(request.vars["id"]) ):
return dict(query=query,
has_shared_sets = len(shared_sets) > 0,
pre_process_list=pre_process_list,
config_id=config_id,
info=info_file,
......
......@@ -50,7 +50,9 @@
<td class="column_100"> sampling date </td>
<td> info </td>
<td> size </td>
{{if has_shared_sets: }}
<td> associated sets </td>
{{pass}}
<td> pre-process </td>
{{if auth.is_admin():}} <td> uploader </td> {{pass}}
<td class="column5"> </td>
......@@ -89,16 +91,17 @@
<td {{if row.sequence_file.data_file == None :}} {{=XML("class='inactive' title='file is missing' ")}} {{pass}} >
{{=vidjil_utils.format_size(row.sequence_file.size_file)}} </td>
{{ has_pre_process = row.sequence_file.pre_process_id != None}}
{{if has_shared_sets:}}
<td>
<!-- Select set with this sample -->
{{ for sample_set in row.list_share_set:}}
{{ print(sample_set) }}
<!-- Show values -->
<span class="{{ =sample_set['sample_type'] }}_token set_token" title="{{ =sample_set['title'] }}" onclick="db.call('sample_set/index', {'id': '{{ =int(sample_set['id']) }}', 'config_id': -1 })" >
{{ =sample_set['title'] }}
</span>
{{ pass }}
</td>
{{pass}}
<td {{if has_pre_process:}} class="pointer"
title="View more information on the pre-process {{=pre_process_list[row.sequence_file.pre_process_id]}}"{{pass}}
{{if has_pre_process:}} onclick="db.call('pre_process/info', {'sequence_file_id' :'{{=row.sequence_file.id }}', 'sample_set_id' : '{{=request.vars["id"]}}'} )" {{pass}}
......
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