Commit 89772413 authored by Marc Duez's avatar Marc Duez

server: custom result file views

parent 27f03c18
{{extend 'db_layout.html'}}
{{import vidjil_utils}}
<div>
<h3>Custom</h3>
<div class="db_block">
<div class="db_block_left">
</div>
<div class="db_block_right">
{{if auth.has_permission("run", "results_file") :}}
config
<span>
<select id="choose_config" name="config" onchange="db.call('patient/custom', {'config_id' : this.value})">
<option value="-1" {{if not config :}}selected{{pass}}> --- </option>
{{for row in db(db.config).select(orderby=~db.config.name) :}}
<option value="{{=row.id }}" {{if row.id==config_id:}}selected{{pass}} >
{{=row.name}}
</option>
{{pass}}
</select>
</span>
{{pass}}
</div>
</div>
</div>
<div id="db_table_container">
<table class="db_table" id="table">
<thead>
<tr><td class="column1"> </td>
<td class="column_200"> patient </td>
<td class="column_200"> file name </td>
<td class="column2"> sampling date </td>
<td> info </td>
<td> pcr </td>
<td class="column1"> size </td>
<td class="column_sep"></td>
<td class="column2">last processing</td>
</tr>
</thead>
<tbody>
{{for row in query :}}
<tr>
<td> <input type="checkbox" name="custom_result[]" value="{{=row.results_file.id}}"> </td>
<td> {{=vidjil_utils.anon(row.sequence_file.patient_id, auth.user_id)}}</td>
<td {{if row.sequence_file.data_file == None :}} {{=XML("class='inactive' title='file is missing' ")}} {{pass}} id="sequence_file_{{=row.sequence_file.id}}">
{{=row.sequence_file.filename}}
</td>
<td> {{=row.sequence_file.sampling_date}} </td>
<td> {{=row.sequence_file.info}} </td>
<td> {{=row.sequence_file.pcr}} </td>
<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>
<td class="column_sep"></td>
{{if row.results_file.run_date :}}
<td class="button" onclick="db.call('results_file/info', { 'results_file_id' : '{{=row.results_file.id}}' } )"> {{=row.results_file.run_date }}</td>
{{else:}}<td></td>{{pass}}
</tr>
{{pass}}
</tbody>
</table>
<table class="db_table" id="db_fixed_header"></table>
</div>
<div class="db_block">
<div class="db_block_left">
</div>
<div class="db_block_right">
<span class="button2" onclick="db.load_custom_data()" > see results </span>
</div>
</div>
</div>
......@@ -61,7 +61,7 @@
{{if auth.has_permission("create", "patient") :}}
<span class="button2" onclick="db.call('patient/add')"> + new patient </span>
<span class="button2" onclick="db.call('patient/add')"> + new patient </span> <span class="button2" onclick="db.call('patient/custom')"> custom patient </span>
{{else:}}
<span class="button2 inactive" onclick="db.call('patient/add')" title="you don't have permission to create new patient"> add patient </span>
{{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