From 98700fb44015852798fa7baabf727e8dcd2cd7a7 Mon Sep 17 00:00:00 2001
From: Frederick Muriuki Muriithi
Date: Tue, 10 Dec 2024 15:42:06 -0600
Subject: Improve breadcrumbs
Update the breadcrumb links such that each will lead back the parent
section rather than to generic section pages. This is updated for the
relevant parts of the UI.
---
uploader/templates/genotypes/base.html | 7 +++++++
uploader/templates/phenotypes/base.html | 7 +++++++
uploader/templates/populations/base.html | 6 ++++++
uploader/templates/species/base.html | 5 +++++
4 files changed, 25 insertions(+)
(limited to 'uploader')
diff --git a/uploader/templates/genotypes/base.html b/uploader/templates/genotypes/base.html
index 1b274bf..56819e5 100644
--- a/uploader/templates/genotypes/base.html
+++ b/uploader/templates/genotypes/base.html
@@ -6,7 +6,14 @@
{%else%}
class="breadcrumb-item"
{%endif%}>
+ {%if dataset is mapping%}
+ {{dataset.Name}}
+ {%else%}
Genotypes
+ {%endif%}
{%block lvl4_breadcrumbs%}{%endblock%}
{%endblock%}
diff --git a/uploader/templates/phenotypes/base.html b/uploader/templates/phenotypes/base.html
index 3bc5dea..adbc012 100644
--- a/uploader/templates/phenotypes/base.html
+++ b/uploader/templates/phenotypes/base.html
@@ -6,7 +6,14 @@
{%else%}
class="breadcrumb-item"
{%endif%}>
+ {%if dataset is mapping%}
+ {{dataset.Name}}
+ {%else%}
Phenotypes
+ {%endif%}
{%block lvl4_breadcrumbs%}{%endblock%}
{%endblock%}
diff --git a/uploader/templates/populations/base.html b/uploader/templates/populations/base.html
index d763fc1..9db8083 100644
--- a/uploader/templates/populations/base.html
+++ b/uploader/templates/populations/base.html
@@ -6,7 +6,13 @@
{%else%}
class="breadcrumb-item"
{%endif%}>
+ {%if population is mapping%}
+ {{population.Name}}
+ {%else%}
Populations
+ {%endif%}
{%block lvl3_breadcrumbs%}{%endblock%}
{%endblock%}
diff --git a/uploader/templates/species/base.html b/uploader/templates/species/base.html
index 04391db..f64f72b 100644
--- a/uploader/templates/species/base.html
+++ b/uploader/templates/species/base.html
@@ -6,7 +6,12 @@
{%else%}
class="breadcrumb-item"
{%endif%}>
+ {%if species is mapping%}
+
+ {{species.Name}}
+ {%else%}
Species
+ {%endif%}
{%block lvl2_breadcrumbs%}{%endblock%}
{%endblock%}
--
cgit v1.2.3