aboutsummaryrefslogtreecommitdiff
path: root/uploader
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-09-09 10:48:29 -0500
committerFrederick Muriuki Muriithi2024-09-09 10:48:29 -0500
commit707c715d1e336ee45bdcced031881ed603b9297a (patch)
tree9f4b39c20d595be5c531c70d001f932676342a46 /uploader
parentb74911f15a9f9a9ff3cca0e25fcd761bf41652b5 (diff)
downloadgn-uploader-707c715d1e336ee45bdcced031881ed603b9297a.tar.gz
Display species details in populations views.
Diffstat (limited to 'uploader')
-rw-r--r--uploader/static/css/styles.css9
-rw-r--r--uploader/templates/populations/create-population.html3
-rw-r--r--uploader/templates/populations/list-populations.html3
-rw-r--r--uploader/templates/populations/view-population.html4
-rw-r--r--uploader/templates/species/macro-display-species-card.html16
-rw-r--r--uploader/templates/species/view-species.html13
6 files changed, 31 insertions, 17 deletions
diff --git a/uploader/static/css/styles.css b/uploader/static/css/styles.css
index 7754213..834c563 100644
--- a/uploader/static/css/styles.css
+++ b/uploader/static/css/styles.css
@@ -104,3 +104,12 @@ dd {
input[type="submit"] {
text-transform: capitalize;
}
+
+.card {
+ margin-top: 0.3em;
+ border-width: 1px;
+ border-style: solid;
+ border-radius: 0.3em;
+ border-color: #AAAAAA;
+ padding: 0.5em;
+}
diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html
index 12811fd..b57afba 100644
--- a/uploader/templates/populations/create-population.html
+++ b/uploader/templates/populations/create-population.html
@@ -1,6 +1,7 @@
{%extends "populations/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "species/macro-select-species.html" import select_species_form%}
+{%from "species/macro-display-species-card.html" import display_species_card%}
{%block title%}Create Population{%endblock%}
@@ -219,5 +220,5 @@
{%endblock%}
{%block sidebarcontents%}
-<p>&hellip; maybe provide species details here, perhaps? &hellip;</p>
+{{display_species_card(species)}}
{%endblock%}
diff --git a/uploader/templates/populations/list-populations.html b/uploader/templates/populations/list-populations.html
index f0e3d50..c83c18c 100644
--- a/uploader/templates/populations/list-populations.html
+++ b/uploader/templates/populations/list-populations.html
@@ -1,6 +1,7 @@
{%extends "populations/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "species/macro-select-species.html" import select_species_form%}
+{%from "species/macro-display-species-card.html" import display_species_card%}
{%block title%}Populations{%endblock%}
@@ -86,5 +87,5 @@
{%endblock%}
{%block sidebarcontents%}
-&hellip; maybe provide species details here, perhaps? &hellip;
+{{display_species_card(species)}}
{%endblock%}
diff --git a/uploader/templates/populations/view-population.html b/uploader/templates/populations/view-population.html
index 3ae76ab..52dadc4 100644
--- a/uploader/templates/populations/view-population.html
+++ b/uploader/templates/populations/view-population.html
@@ -1,6 +1,7 @@
{%extends "populations/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "species/macro-select-species.html" import select_species_form%}
+{%from "species/macro-display-species-card.html" import display_species_card%}
{%block title%}Populations{%endblock%}
@@ -78,6 +79,5 @@
{%endblock%}
{%block sidebarcontents%}
-<p>&hellip; maybe provide species details here, perhaps? &hellip;</p>
-<p>&hellip; maybe provide extra population details here, perhaps? &hellip;</p>
+{{display_species_card(species)}}
{%endblock%}
diff --git a/uploader/templates/species/macro-display-species-card.html b/uploader/templates/species/macro-display-species-card.html
new file mode 100644
index 0000000..857c0f0
--- /dev/null
+++ b/uploader/templates/species/macro-display-species-card.html
@@ -0,0 +1,16 @@
+{%macro display_species_card(species)%}
+<div class="card">
+ <div class="card-body">
+ <h5 class="card-title">Species</h5>
+ <div class="card-text">
+ <dl>
+ <dt>Common Name</dt>
+ <dd>{{species.SpeciesName}}</dd>
+
+ <dt>Scientific Name</dt>
+ <dd>{{species.FullName}}</dd>
+ </dl>
+ </div>
+ </div>
+</div>
+{%endmacro%}
diff --git a/uploader/templates/species/view-species.html b/uploader/templates/species/view-species.html
index bf5f0c1..6942168 100644
--- a/uploader/templates/species/view-species.html
+++ b/uploader/templates/species/view-species.html
@@ -5,19 +5,6 @@
{%block pagetitle%}View Species{%endblock%}
-{%block css%}
-<style type="text/css">
- .card {
- margin-top: 0.3em;
- border-width: 1px;
- border-style: solid;
- border-radius: 0.3em;
- border-color: #AAAAAA;
- padding: 0.5em;
- }
-</style>
-{%endblock%}
-
{%block lvl2_breadcrumbs%}
<li {%if activelink=="view-species"%}
class="breadcrumb-item active"