Commit e5d274b4 authored by Marc Duez's avatar Marc Duez

server : update views style

-add footer to db_layout
-change button style / array size / ...
parent f52b0c64
......@@ -35,7 +35,7 @@
<table class="db_table" id="db_fixed_header"></table>
</div>
<span class="button" onclick="db.call('config/add')"> new config </span>
<span class="button2" onclick="db.call('config/add')"> + new config </span>
</div>
{{elif 'content' in globals():}}
......
......@@ -13,15 +13,10 @@
</div>
<div id="db_auth">
<div>
{{if auth.user:}}
<a class="button" onclick="db.call('default/user/profile');">{{=auth.user.first_name}}</a>
<a class="button" onclick="db.request('default/user/logout');">disconnect</a>
{{pass}}
</div>
<div>
<a class="button" onclick="db.reload();">reload</a>
</div>
</div>
</div>
......@@ -30,3 +25,14 @@
<div>
{{include}}
</div>
<div class="db_footer">
<div class="db_block_left">
<span class="button" onclick="db.back();"> << back</span>
<span class="button" onclick="db.reload();">reload</span>
</div>
<div class="db_block_right">
</div>
</div>
......@@ -38,7 +38,7 @@ query = db(
<table class="db_table" id="db_fixed_header"></table>
</div>
<span class="button" onclick="db.call('group/add')"> new group </span>
<span class="button2" onclick="db.call('group/add')"> + new group </span>
</div>
{{elif 'content' in globals():}}
......
......@@ -51,7 +51,14 @@ query = db(
<table class="db_table" id="db_fixed_header"></table>
</div>
<span class="button" onclick="db.call('patient/add')"> add patient </span>
{{if auth.has_permission("create", "patient") :}}
<span class="button2" onclick="db.call('patient/add')"> + new 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}}
</div>
{{elif 'content' in globals():}}
......
......@@ -13,6 +13,22 @@
{{
patient = db.patient[request.vars["id"]]
query = db(
(db.sequence_file.patient_id==db.patient.id)
& (db.patient.id==request.vars["id"])
).select(
left=db.data_file.on(
(db.data_file.sequence_file_id==db.sequence_file.id)
& (db.data_file.config_id==str(config_id) )
)
)
fused_file = db(
(db.fused_file.patient_id == patient)
& (db.fused_file.config_id == config_id)
).count()
}}
......@@ -46,11 +62,11 @@ patient = db.patient[request.vars["id"]]
<table class="db_table" id="table">
<thead>
<tr><td class="column1"> file_name </td>
<td class="column5"> </td>
<td class="column2"> sampling date </td>
<td> info </td>
<td class="column5"> </td>
<td class="column5"> </td>
<td class="column5"> </td>
<td class="column_sep"></td>
......@@ -60,18 +76,7 @@ patient = db.patient[request.vars["id"]]
</tr>
</thead>
<tbody>
{{
query = db(
(db.sequence_file.patient_id==db.patient.id)
& (db.patient.id==request.vars["id"])
).select(
left=db.data_file.on(
(db.data_file.sequence_file_id==db.sequence_file.id)
& (db.data_file.config_id==str(config_id) )
)
)
for row in query :}}
{{for row in query :}}
{{if row.sequence_file.data_file is None :}}
{{filename = ''}}
......@@ -81,9 +86,9 @@ patient = db.patient[request.vars["id"]]
<tr>
<td id="sequence_file_{{=row.sequence_file.id}}"> {{=filename}}</td>
<td> {{if filename != '':}}<a href="{{=URL('download', scheme='https', args=row.sequence_file.data_file)}}" >dl</a>{{pass}}</td>
<td> {{=row.sequence_file.sampling_date}} </td>
<td> {{=row.sequence_file.info}} </td>
<td> {{if filename != '':}}<a href="{{=URL('download', scheme='https', args=row.sequence_file.data_file)}}" >dl</a>{{pass}}</td>
<td onclick="db.call('file/edit', {'id' :'{{=row.sequence_file.id}}', 'patient_id' :'{{=request.vars['id']}}'} )" > e </td>
<td onclick="db.call('file/confirm', {'id' :'{{=row.sequence_file.id}}', 'patient_id' :'{{=request.vars['id']}}'} )" > X </td>
......@@ -91,7 +96,7 @@ patient = db.patient[request.vars["id"]]
<td> {{if row.data_file.run_date :}}{{=row.data_file.run_date }}{{pass}} </td>
<td>
{{if filename != '':}}
{{if filename != '' and config_id != -1:}}
{{if row.data_file.id == None or row.data_file.status == "ready" :}}
<span class="button" onclick="db.call('default/run_request', { 'sequence_file_id' : '{{=row.sequence_file.id}}', 'config_id' : {{=config_id}} } )"> run >> </span>
{{else:}}
......@@ -108,16 +113,23 @@ patient = db.patient[request.vars["id"]]
<div class="db_block">
<div class="db_block_left">
<span class="button" onclick="db.call('patient/index')"> back to list </span>
<span class="button" onclick="db.call('file/add', { 'id' : '{{=request.vars["id"]}}' } )"> add file </span>
<span class="button2" onclick="db.call('file/add', { 'id' : '{{=request.vars["id"]}}' } )"> add file </span>
</div>
{{if fused_file >0:}}
<div class="db_block_right">
<span class="button2" onclick="db.load_data( { 'patient_id' : '{{=request.vars["id"]}}' , 'config_id' : {{=config_id}} } )" > see result </span>
</div>
{{pass}}
</div>
{{if fused_file >0:}}
<div class="db_block">
<div class="db_block_right">
<span class="button" onclick="db.load_data( { 'patient_id' : '{{=request.vars["id"]}}' , 'config_id' : {{=config_id}} } )" > see result </span>
<span class="button" onclick="" > get .data </span>
<span class="button" onclick="" > get .analysis </span>
</div>
</div>
{{pass}}
</div>
......
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