From 9cd33ddac3d6848c5443962d66494635feadef51 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 9 Sep 2024 14:06:31 -0500 Subject: Initialise samples uploads * Move existing code to new module * Rework the UI: create new templates * Rework the routes: Select species and populations before attempting an upload. --- uploader/templates/samples/select-population.html | 117 +++++----------------- 1 file changed, 26 insertions(+), 91 deletions(-) (limited to 'uploader/templates/samples/select-population.html') diff --git a/uploader/templates/samples/select-population.html b/uploader/templates/samples/select-population.html index da19ddc..8e22ac1 100644 --- a/uploader/templates/samples/select-population.html +++ b/uploader/templates/samples/select-population.html @@ -1,99 +1,34 @@ -{%extends "base.html"%} -{%from "flash_messages.html" import flash_messages%} +{%extends "samples/base.html"%} +{%from "flash_messages.html" import flash_all_messages%} +{%from "populations/macro-select-population.html" import select_population_form%} +{%from "species/macro-display-species-card.html" import display_species_card%} -{%block title%}Select Grouping/Population{%endblock%} +{%block title%}Samples — Select Population{%endblock%} -{%block contents%} -
We organise the samples/cases/strains in a hierarchichal form, starting - with species at the very top. Under species, we have a - grouping in terms of the relevant population - (e.g. Inbred populations, cell tissue, etc.)
-OR
- - +{%block contents%} +{{flash_all_messages()}} +Select the population to use with your samples:
+ {{select_population_form( + url_for("species.populations.samples.select_population", species_id=species.SpeciesId), + populations)}} +Cannot find your population in the list?
+ +If you cannot find the population you want in the drop-down above, you can + instead, + + create a new population. +