diff options
author | Frederick Muriuki Muriithi | 2024-09-03 14:55:48 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-09-03 16:51:26 -0500 |
commit | 61688c00e8734adee4d825571a9c43d926dca001 (patch) | |
tree | 0a53c7eff5ec2bb1376be2eb2bdd2333c606ba11 /uploader/templates | |
parent | 2876fe6251bd4dfceef06f638ee74c2728ad1207 (diff) | |
download | gn-uploader-61688c00e8734adee4d825571a9c43d926dca001.tar.gz |
Initialise the populations package and update references.
Diffstat (limited to 'uploader/templates')
-rw-r--r-- | uploader/templates/base.html | 1 | ||||
-rw-r--r-- | uploader/templates/populations/base.html | 12 | ||||
-rw-r--r-- | uploader/templates/populations/index.html | 16 | ||||
-rw-r--r-- | uploader/templates/populations/list-populations.html | 87 | ||||
-rw-r--r-- | uploader/templates/species/view-species.html | 3 |
5 files changed, 118 insertions, 1 deletions
diff --git a/uploader/templates/base.html b/uploader/templates/base.html index 7431767..fd6010b 100644 --- a/uploader/templates/base.html +++ b/uploader/templates/base.html @@ -45,6 +45,7 @@ <ul class="nav flex-column"> <li><a href="/" >Home</a></li> <li><a href="{{url_for('species.list_species')}}" >Species</a></li> + <li><a href="{{url_for('populations.index')}}">Populations</a></li> <li><a href="{{url_for('expression-data.index.index')}}" >Expression Data</a></li> </ul> </aside> diff --git a/uploader/templates/populations/base.html b/uploader/templates/populations/base.html new file mode 100644 index 0000000..1033927 --- /dev/null +++ b/uploader/templates/populations/base.html @@ -0,0 +1,12 @@ +{%extends "base.html"%} + +{%block breadcrumbs%} +<li {%if activelink=="populations"%} + class="breadcrumb-item active" + {%else%} + class="breadcrumb-item" + {%endif%}> + <a href="{{url_for('populations.index')}}">Populations</a> +</li> +{%block lvl3_breadcrumbs%}{%endblock%} +{%endblock%} diff --git a/uploader/templates/populations/index.html b/uploader/templates/populations/index.html new file mode 100644 index 0000000..14cf547 --- /dev/null +++ b/uploader/templates/populations/index.html @@ -0,0 +1,16 @@ +{%extends "populations/base.html"%} +{%from "flash_messages.html" import flash_all_messages%} +{%from "species/macro-select-species.html" import select_species_form%} + +{%block title%}Populations{%endblock%} + +{%block pagetitle%}Populations{%endblock%} + + +{%block contents%} +<div class="row"> + To continue, you need to select the species: + + {{select_species_form(url_for("populations.index"), species)}} +</div> +{%endblock%} diff --git a/uploader/templates/populations/list-populations.html b/uploader/templates/populations/list-populations.html new file mode 100644 index 0000000..bf6cf98 --- /dev/null +++ b/uploader/templates/populations/list-populations.html @@ -0,0 +1,87 @@ +{%extends "populations/base.html"%} +{%from "flash_messages.html" import flash_all_messages%} +{%from "species/macro-select-species.html" import select_species_form%} + +{%block title%}Populations{%endblock%} + +{%block pagetitle%}Populations{%endblock%} + +{%block lvl3_breadcrumbs%} +<li {%if activelink=="list-populations"%} + class="breadcrumb-item active" + {%else%} + class="breadcrumb-item" + {%endif%}> + <a href="{{url_for('populations.list_species_populations', + species_id=species.SpeciesId)}}">List</a> +</li> +{%endblock%} + + +{%block contents%} +<div class="row"> + <p> + The following populations/groups exist for the '{{species.FullName}}' + species. + </p> + <p> + Click on the population's name to select and continue using the population. + </p> +</div> + +<div class="row"> + <p> + If the population you need for the species '{{species.FullName}}' does not + exist, click on the "Create Population" button below to create a new one. + </p> + <p> + <a href="{{url_for('populations.create_population', + species_id=species.SpeciesId)}}" + title="Create a new population for species '{{species.FullName}}'." + class="btn btn-danger"> + Create Population + </a> + </p> +</div> + +<div class="row"> + <table class="table"> + <caption>Populations for {{species.FullName}}</caption> + <thead> + <tr> + <th>Name</th> + <th>Full Name</th> + <th>Description</th> + </tr> + </thead> + + <tbody> + {%for population in populations%} + <tr> + <td> + <a href="#{{population.InbredSetId}}" + title="Population '{{population.FullName}}' for species '{{species.FullName}}'."> + {{population.Name}} + </a> + </td> + <td>{{population.FullName}}</td> + <td>{{population.Description}}</td> + </tr> + {%else%} + <tr> + <td colspan="3"> + <p class="text-danger"> + <span class="glyphicon glyphicon-exclamation-mark"></span> + There were no populations found for {{species.FullName}}! + </p> + </td> + </tr> + {%endfor%} + </tbody> + </table> +</div> +{%endblock%} + +{%block sidebarcontents%} +… maybe provide species details here, perhaps? … +{%endblock%} diff --git a/uploader/templates/species/view-species.html b/uploader/templates/species/view-species.html index a0eb54b..0a3b0dd 100644 --- a/uploader/templates/species/view-species.html +++ b/uploader/templates/species/view-species.html @@ -60,7 +60,8 @@ title="Upload genotypes for {{species.FullName}}">Upload Genotypes</a> </li> <li> - <a href="#" + <a href="{{url_for('species.populations.list_species_populations', + species_id=species.SpeciesId)}}" title="Create/Edit populations for {{species.FullName}}"> Manage populations</a> </li> |