Commit 36cab000 authored by Marc Duez's avatar Marc Duez
Browse files

server.js : add info about deletion side effect in the confirmation views

parent 892d1391
......@@ -5,7 +5,7 @@
<h3>{{=message}}</h3>
Are you sure you want to delete this config</br>
All data file using this config will also be deleted.</br>
All data file using this config will also be deleted ({{=db(db.data_file.config_id==request.vars["id"]).count()}} data file(s) will be deleted).</br>
<div class="center">
<button onclick="db.call('config/index')">back</button>
......
......@@ -5,7 +5,7 @@
<h3>{{=message}}</h3>
Are you sure you want to delete this sequence file?</br>
All data using this sequence file will also be deleted.</br>
All data using this sequence file will also be deleted ({{=db(db.data_file.sequence_file_id==request.vars["id"]).count()}} data file(s) will be deleted).</br>
<div class="center">
<button onclick="db.call('patient/info', {'id' :'{{=request.vars["patient_id"]}}'} )">back</button>
......
{{('message' in globals())}}
{{if 'message' in globals():}}
{{
data_count = 0
query = db( (db.sequence_file.patient_id==request.vars["id"])).select()
for row in query :}}
{{data_count += db(db.data_file.sequence_file_id == row.id).count()}}
{{pass}}
<div>
<h3>{{=message}}</h3>
Are you sure you want to delete this patient</br>
All sequence file of this patientwill also be deleted.</br>
All sequence file of this patient will also be deleted ({{=db(db.sequence_file.patient_id==request.vars["id"]).count()}} sequence file(s) will be deleted).</br>
All data file of this patient will also be deleted ({{=data_count}} data file(s) will be deleted).</br>
<div class="center">
<button onclick="db.call('patient/index')">back</button>
......
{{('message' in globals())}}
{{if 'message' in globals():}}
{{
data_count=0
query = db( (db.config.standard_id==request.vars["id"])).select()
for row in query :}}
{{data_count += db(db.data_file.config_id == row.id).count()}}
{{pass}}
<div>
<h3>{{=message}}</h3>
Are you sure you want to delete this standard file?</br>
All config and data file using this standard will also be deleted.</br>
All config using this standard will also be deleted ({{=db(db.config.standard_id==request.vars["id"]).count()}} config(s) will be deleted).</br>
All data file using this standard will also be deleted ({{=data_count}} data file(s) will be deleted).</br>
<div class="center">
<button onclick="db.call('standard/index')">back</button>
......
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