From 3c960f6cf885934e5f390390c9e0fae0d6b93d5d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 18 Feb 2025 11:10:29 -0600 Subject: Enable creating new populations on the "Phenotype Data" path. Enable creating new populations in the case where the population a user wants to use does not exist in the database. --- .../templates/phenotypes/select-population.html | 20 +++++--- .../templates/populations/create-population.html | 5 +- .../populations/macro-select-population.html | 55 ++++++++++++---------- 3 files changed, 47 insertions(+), 33 deletions(-) (limited to 'uploader/templates') diff --git a/uploader/templates/phenotypes/select-population.html b/uploader/templates/phenotypes/select-population.html index eafd4a7..d6e6aa1 100644 --- a/uploader/templates/phenotypes/select-population.html +++ b/uploader/templates/phenotypes/select-population.html @@ -11,18 +11,24 @@ {%block contents%} {{flash_all_messages()}} -
-

Select the population for your phenotypes to view and manage the phenotype - datasets that relate to it.

-
- {{select_population_form(url_for("species.populations.phenotypes.select_population", - species_id=species.SpeciesId), - populations)}} + {{select_population_form(url_for("species.populations.phenotypes.select_population", species_id=species.SpeciesId), species, populations)}}
{%endblock%} {%block sidebarcontents%} {{display_species_card(species)}} {%endblock%} + +{%block javascript%} + + + +{%endblock%} diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html index 86aebda..c0c4f45 100644 --- a/uploader/templates/populations/create-population.html +++ b/uploader/templates/populations/create-population.html @@ -37,12 +37,15 @@
+ species_id=species.SpeciesId, + return_to=return_to)}}"> Create Population {{flash_all_messages()}} + +
- Select Population -
- -
- -
+ {%if populations | length != 0%} + + + + + + + + + + + +
Population
+ +
+
+ {%else%} +

+ There are no populations currently defined for {{species['FullName']}} + ({{species['SpeciesName']}}).
+ Click "Continue" to create the first!

+ + {%endif%} +
- +
{%endmacro%} -- cgit v1.2.3