From 9ee7f2eee907d0d073097ae3c0112b8b24419730 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 17 Feb 2025 17:26:39 -0600 Subject: Select from searchable list and allow new species creation. Select the species to use from a searchable list. In case the species does not exist in the list, allow creation of the list. --- uploader/phenotypes/views.py | 2 +- uploader/static/css/styles.css | 4 ++ uploader/templates/phenotypes/index.html | 28 +++++++---- .../templates/species/macro-select-species.html | 54 ++++++++++------------ 4 files changed, 47 insertions(+), 41 deletions(-) (limited to 'uploader') diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index ddec54c..e0ce521 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -62,7 +62,7 @@ def index(): with database_connection(app.config["SQL_URI"]) as conn: if not bool(request.args.get("species_id")): return render_template("phenotypes/index.html", - species=order_by_family(all_species(conn)), + species=all_species(conn), activelink="phenotypes") species = species_by_id(conn, request.args.get("species_id")) diff --git a/uploader/static/css/styles.css b/uploader/static/css/styles.css index 6f26621..bf7305e 100644 --- a/uploader/static/css/styles.css +++ b/uploader/static/css/styles.css @@ -144,3 +144,7 @@ body { border-bottom: solid #88BBEE; text-transform: capitalize; } + +input[type="search"] { + border-radius: 5px; +} diff --git a/uploader/templates/phenotypes/index.html b/uploader/templates/phenotypes/index.html index 0c691e6..93159be 100644 --- a/uploader/templates/phenotypes/index.html +++ b/uploader/templates/phenotypes/index.html @@ -6,21 +6,29 @@ {%block pagetitle%}Phenotypes{%endblock%} +{%block css%} + +{%endblock%} + {%block contents%} {{flash_all_messages()}}
This section deals with phenotypes that - - - … what are the characteristics of these phenotypes? …
-Select the species to begin the process of viewing/uploading data about - your phenotypes
+ {{select_species_form(url_for("species.populations.phenotypes.index"), species)}}