From a8af2d89b380da71b8df658ff60178fe51288bb2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 5 Apr 2023 16:14:40 +0300 Subject: oauth2: UI - Retain look and feel without using jQuery DataTables Simplify the implementation by dropping the use of the jQuery DataTables plugin - this avoids a lot of arising bugs while retaining the UI look and feel until we have something working. --- wqflask/wqflask/oauth2/data.py | 4 +- .../templates/oauth2/data-list-genotype.html | 157 +++++++++------------ 2 files changed, 69 insertions(+), 92 deletions(-) diff --git a/wqflask/wqflask/oauth2/data.py b/wqflask/wqflask/oauth2/data.py index 96acb2c2..1dcacb7e 100644 --- a/wqflask/wqflask/oauth2/data.py +++ b/wqflask/wqflask/oauth2/data.py @@ -31,9 +31,7 @@ def __search_genotypes__(query, template, **kwargs): "species_name": species_name }).either( lambda err: {"datasets_error": process_error(err)}, - lambda datasets: {"datasets": tuple({ - "index": idx, **dataset - } for idx,dataset in enumerate(datasets, start=1))}) + lambda datasets: {"datasets": datasets}) return __render_template__(template, **datasets, **kwargs) def __search_phenotypes__(query, template, **kwargs): diff --git a/wqflask/wqflask/templates/oauth2/data-list-genotype.html b/wqflask/wqflask/templates/oauth2/data-list-genotype.html index 54c2a9fd..fd39a86a 100644 --- a/wqflask/wqflask/templates/oauth2/data-list-genotype.html +++ b/wqflask/wqflask/templates/oauth2/data-list-genotype.html @@ -13,7 +13,7 @@ {%endblock%} {%block content%} -
+
{{profile_nav("data", user_privileges)}} {{flash_me()}} @@ -37,27 +37,52 @@
- + + + + + + + + + + + {%for dataset in selected_datasets%} - + + + + + {%else%} + + + {%endfor%} +
- {%if groups | length > 0%} - - {%else%} - - {%endif%} +
+ +
@@ -83,14 +108,41 @@
- + + + + + + + + + + {%for dataset in datasets:%} + + + + + + + + {%else%} + {%endfor%} +
SelectGroupDataset NameDataset FullNameDataset ShortName
+ + {{dataset.InbredSetName}}{{dataset.dataset_name}}{{dataset.dataset_fullname}}{{dataset.dataset_shortname}}
-
Loading...
+ +   + No datasets available for selection.
@@ -99,83 +151,14 @@ {%endblock%} {%block js%} - - - - - - - - - - - -