From 8b5400fa04d4ca2e60d7e926800816245e2ab809 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 14 Jul 2022 06:20:44 +0300 Subject: Enable creation of new dataset Enable the user to create a new dataset should the need arise. A few extra fixes were done, such as: - Provide list of average methods to choose from - Provide input elements for some expected fields - Add a new confirmation step before doing the actual data update --- qc_app/templates/continue_from_create_dataset.html | 56 +++++++++++++++ qc_app/templates/dbupdate_hidden_fields.html | 3 + qc_app/templates/select_dataset.html | 82 ++++++++++++++++++---- 3 files changed, 127 insertions(+), 14 deletions(-) create mode 100644 qc_app/templates/continue_from_create_dataset.html (limited to 'qc_app/templates') diff --git a/qc_app/templates/continue_from_create_dataset.html b/qc_app/templates/continue_from_create_dataset.html new file mode 100644 index 0000000..1e493c5 --- /dev/null +++ b/qc_app/templates/continue_from_create_dataset.html @@ -0,0 +1,56 @@ +{%extends "base.html"%} +{%from "dbupdate_hidden_fields.html" import hidden_fields%} + +{%block title%}Create Study{%endblock%} + +{%block css%} + +{%endblock%} + +{%block contents%} +

{{filename}}: create study

+ +{%with messages = get_flashed_messages(with_categories=true)%} +{%if messages:%} + +{%endif%} +{%endwith%} + +
+
+ continue with new dataset + {{hidden_fields( + filename, filetype, species=species, genechipid=genechipid, + studyid=studyid, datasetid=datasetid)}} + +
+ +
+
+ +

OR

+ +
+ Select from existing dataset + {{hidden_fields( + filename, filetype, species=species, genechipid=genechipid, + studyid=studyid, datasetid=datasetid)}} + +
+ +
+
+
+{%endblock%} diff --git a/qc_app/templates/dbupdate_hidden_fields.html b/qc_app/templates/dbupdate_hidden_fields.html index c66ebba..5a95cbb 100644 --- a/qc_app/templates/dbupdate_hidden_fields.html +++ b/qc_app/templates/dbupdate_hidden_fields.html @@ -19,5 +19,8 @@ {%if kwargs.get("studyid"):%} {%endif%} +{%if kwargs.get("datasetid"):%} + +{%endif%} {%endmacro%} diff --git a/qc_app/templates/select_dataset.html b/qc_app/templates/select_dataset.html index 59ead59..a16fc75 100644 --- a/qc_app/templates/select_dataset.html +++ b/qc_app/templates/select_dataset.html @@ -8,10 +8,10 @@ {%endblock%} {%block contents%} -

{{filename}}: select dataset

+

{{filename}}: select dataset

-
choose existing dataset {{hidden_fields( @@ -19,8 +19,8 @@ studyid=studyid)}}
- - @@ -44,37 +44,91 @@

OR

create new dataset {{hidden_fields( filename, filetype, species=species, genechipid=genechipid, studyid=studyid)}} + {%with messages = get_flashed_messages(with_categories=true)%} + {%if messages:%} +
    + {%for category, message in messages:%} +
  • {{message}}
  • + {%endfor%} +
+ {%endif%} + {%endwith%} +
- - + {%for method in avgmethods:%} + + {%endfor%}
- - + + +
+ +
+ + +
+ +
+ +
- - + +
- - + + +
+ +
+ + +
+ +
+ +
- - +
-- cgit v1.2.3