Commit d18c304f authored by Marc Duez's avatar Marc Duez

server : downloaded analysis/data file have correct name "patientName_configName.data"

-maybe add timestamp ??
parent 0cf61ed1
......@@ -14,7 +14,6 @@
{{
patient = db.patient[request.vars["id"]]
configh = db.config[request.vars["config_id"]]
query = db(
(db.sequence_file.patient_id==db.patient.id)
......@@ -26,12 +25,16 @@ query = db(
)
)
patient_name = patient.first_name + " " + patient.last_name
config_name = db.config[request.vars["config_id"]].name
fused = db(
(db.fused_file.patient_id == patient)
& (db.fused_file.config_id == config_id)
)
fused_count = fused.count()
fused_file = fused.select()
fused_filename = patient_name +"_"+ config_name + ".data"
analysis = db(
......@@ -40,6 +43,7 @@ analysis = db(
)
analysis_count = analysis.count()
analysis_file = analysis.select()
analysis_filename = patient_name +"_"+ config_name + ".analysis"
}}
......@@ -137,9 +141,9 @@ analysis_file = analysis.select()
<div class="db_block">
<div class="db_block_right">
download
<a class="button" href={{=URL('default', 'download', scheme='https', args=fused_file[0].fused_file, vars=dict(filename='test'))}} type="application/octet-stream" download> .data </a>
<a class="button" href={{=URL('default', 'download', scheme='https', args=fused_file[0].fused_file, vars=dict(filename=fused_filename))}} type="application/octet-stream" download> .data </a>
{{if analysis_count >0:}}
<a class="button" href={{=URL('default', 'download', scheme='https', args=analysis_file[0].analysis_file, vars=dict(filename='test'))}} type="application/octet-stream" download> .analysis </a>
<a class="button" href={{=URL('default', 'download', scheme='https', args=analysis_file[0].analysis_file, vars=dict(filename=analysis_filename))}} type="application/octet-stream" download> .analysis </a>
{{pass}}
</div>
</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