diff options
author | Frederick Muriuki Muriithi | 2024-12-10 16:49:35 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-12-10 16:49:35 -0600 |
commit | fbf9a5c77768645568de2a96a82d25f18a61e0b0 (patch) | |
tree | e6a123986aeb6d4fa3672a5a788dae7ee8a214e4 /uploader/genotypes | |
parent | d42804d717993457078d5d6f1a2010215d6183f0 (diff) | |
download | gn-uploader-fbf9a5c77768645568de2a96a82d25f18a61e0b0.tar.gz |
Retain population for "List Markers" page
For UI consistency, and as a convenience to the users, retain the
population details for the "List Markers" page to help them navigate
more easily using the breadcrumbs.
Diffstat (limited to 'uploader/genotypes')
-rw-r--r-- | uploader/genotypes/views.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py index e6b1ba7..0433420 100644 --- a/uploader/genotypes/views.py +++ b/uploader/genotypes/views.py @@ -96,16 +96,24 @@ def list_genotypes(species: dict, population: dict, **kwargs):# pylint: disable= activelink="list-genotypes") -@genotypesbp.route("/<int:species_id>/genotypes/list-markers", methods=["GET"]) +@genotypesbp.route( + "/<int:species_id>/populations/<int:population_id>/genotypes/list-markers", + methods=["GET"]) @require_login -@with_species(redirect_uri="species.populations.genotypes.index") -def list_markers(species: dict, **kwargs):# pylint: disable=[unused-argument] +@with_population(species_redirect_uri="species.populations.genotypes.index", + redirect_uri="species.populations.genotypes.select_population") +def list_markers( + species: dict, + population: dict, + **kwargs +):# pylint: disable=[unused-argument] """List a species' genetic markers.""" with database_connection(app.config["SQL_URI"]) as conn: start_from = max(safe_int(request.args.get("start_from") or 0), 0) count = safe_int(request.args.get("count") or 20) return render_template("genotypes/list-markers.html", species=species, + population=population, total_markers=genotype_markers_count( conn, species["SpeciesId"]), start_from=start_from, |