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/list-samples.html | 114 +++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 uploader/templates/samples/list-samples.html (limited to 'uploader/templates/samples/list-samples.html') diff --git a/uploader/templates/samples/list-samples.html b/uploader/templates/samples/list-samples.html new file mode 100644 index 0000000..a29dc1c --- /dev/null +++ b/uploader/templates/samples/list-samples.html @@ -0,0 +1,114 @@ +{%extends "samples/base.html"%} +{%from "flash_messages.html" import flash_all_messages%} +{%from "populations/macro-select-population.html" import select_population_form%} +{%from "populations/macro-display-population-card.html" import display_population_card%} + +{%block title%}Samples — List Samples{%endblock%} + +{%block pagetitle%}Samples — List Samples{%endblock%} + +{%block lvl4_breadcrumbs%} + +{%endblock%} + +{%block contents%} +{{flash_all_messages()}} + +
+

+ Samples for population "{{population.FullName}}" from the + "{{species.FullName}}" species. +

+ + {%if samples | length > 0%} +
+
+ {%if offset > 0:%} + + + Previous + + {%endif%} +
+ +
+ Samples {{offset}} — {{offset+(count if offset + count < total_samples else total_samples - offset)}} / {{total_samples}} +
+ +
+ {%if offset + count < total_samples:%} + + Next + + + {%endif%} +
+
+ + + + + + + + + + + + {%for sample in samples%} + + + + + + + {%endfor%} + +
NameAuxilliary NameSymbolAlias
{{sample.Name}}{{sample.Name2}}{{sample.Symbol or "-"}}{{sample.Alias or "-"}}
+ +

+ + delete all samples + +

+ {%else%} +

+ + There are no samples for this population at this time. +

+ +

+ + add samples + +

+ {%endif%} +
+{%endblock%} + +{%block sidebarcontents%} +{{display_population_card(species, population)}} +{%endblock%} + -- cgit v1.2.3