From c9b3db62655eb31d2229aba988b86da666163329 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 29 Dec 2025 10:55:01 -0600 Subject: Species: Move feature to new UI templates. --- uploader/species/views.py | 4 +- uploader/templates/species/base.html | 19 +-- uploader/templates/species/sui-base.html | 10 -- uploader/templates/species/sui-view-species.html | 127 ----------------- uploader/templates/species/view-species.html | 171 ++++++++++++++--------- 5 files changed, 111 insertions(+), 220 deletions(-) delete mode 100644 uploader/templates/species/sui-base.html delete mode 100644 uploader/templates/species/sui-view-species.html diff --git a/uploader/species/views.py b/uploader/species/views.py index 9b14d01..4bfa7ae 100644 --- a/uploader/species/views.py +++ b/uploader/species/views.py @@ -8,8 +8,6 @@ from flask import (flash, Blueprint, current_app as app) -from uploader.sui import sui_template - from uploader.population import popbp from uploader.platforms import platformsbp from uploader.flask_extensions import url_for @@ -56,7 +54,7 @@ def view_species(species_id: int): species_id=species_id, population_id=population["Id"])) return render_template( - sui_template("species/view-species.html"), + "species/view-species.html", species=species, activelink="view-species", populations=populations_by_species(conn, species["SpeciesId"])) diff --git a/uploader/templates/species/base.html b/uploader/templates/species/base.html index f64f72b..a7c1a8f 100644 --- a/uploader/templates/species/base.html +++ b/uploader/templates/species/base.html @@ -1,17 +1,10 @@ {%extends "base.html"%} -{%block lvl1_breadcrumbs%} - -{%block lvl2_breadcrumbs%}{%endblock%} {%endblock%} diff --git a/uploader/templates/species/sui-base.html b/uploader/templates/species/sui-base.html deleted file mode 100644 index f7b4fef..0000000 --- a/uploader/templates/species/sui-base.html +++ /dev/null @@ -1,10 +0,0 @@ -{%extends "sui-base.html"%} - -{%block breadcrumbs%} -{{super()}} - -{%endblock%} diff --git a/uploader/templates/species/sui-view-species.html b/uploader/templates/species/sui-view-species.html deleted file mode 100644 index 4b6402e..0000000 --- a/uploader/templates/species/sui-view-species.html +++ /dev/null @@ -1,127 +0,0 @@ -{%extends "species/sui-base.html"%} -{%from "flash_messages.html" import flash_all_messages%} -{%from "macro-forms.html" import add_http_feature_flags%} -{%from "macro-step-indicator.html" import step_indicator%} -{%from "species/macro-display-species-card.html" import display_sui_species_card%} - -{%block title%}View Species{%endblock%} - -{%macro add_form_buttons()%} -
-
- -
- -
- - Create a new population - -
-
-{%endmacro%} - - -{%block contents%} -
-

{{species.FullName}} ({{species.Name}})

-
- -
- -
- -
-
-
-

Data belonging to a particular species is further divided into one or more - populations for easier handling. Please select the population you want to work - with.

- -
- {{add_http_feature_flags()}} - {{add_form_buttons()}} - - {%if populations | length != 0%} -
- - - - - - - - - -
Population
-
- - {%else%} -

- There are no populations currently defined for {{species['FullName']}} - ({{species['SpeciesName']}}).

- {%endif%} - - {{add_form_buttons()}} - -
-
-
-

Upload and manage the sequencing platforms for species - '{{species.Name | title}} ({{species.FullName}})' - here. -

-
-
-
-{%endblock%} - -{%block sidebarcontents%} -
-

You can manage species' populations and sequencing platforms here. Select - the tab for the feature you wish to continue working on.

-
-{{display_sui_species_card(species)}} -{%endblock%} - - -{%block javascript%} - -{%endblock%} diff --git a/uploader/templates/species/view-species.html b/uploader/templates/species/view-species.html index 2d02f7e..48fd6cc 100644 --- a/uploader/templates/species/view-species.html +++ b/uploader/templates/species/view-species.html @@ -1,90 +1,127 @@ {%extends "species/base.html"%} {%from "flash_messages.html" import flash_all_messages%} +{%from "macro-forms.html" import add_http_feature_flags%} +{%from "macro-step-indicator.html" import step_indicator%} +{%from "species/macro-display-species-card.html" import display_sui_species_card%} {%block title%}View Species{%endblock%} -{%block pagetitle%}View Species{%endblock%} +{%macro add_form_buttons()%} +
+
+ +
+ +
+ + Create a new population + +
+
+{%endmacro%} -{%block lvl2_breadcrumbs%} - -{%endblock%} {%block contents%} -{{flash_all_messages()}}
-

Details on species {{species.FullName}}

+

{{species.FullName}} ({{species.Name}})

+
-
-
Common Name
-
{{species.SpeciesName}}
+
+ +
-
Scientific Name
-
{{species.FullName}}
+
+
+
+

Data belonging to a particular species is further divided into one or more + populations for easier handling. Please select the population you want to work + with.

-
Taxonomy ID
-
{{species.TaxonomyId}}
-
+
+ {{add_http_feature_flags()}} + {{add_form_buttons()}} -

Actions

+ {%if populations | length != 0%} +
+ + + + + + + -

- You can proceed to perform any of the following actions for species - {{species.FullName}} -

+ +
Population
+
-
    -
  1. - - Manage populations -
  2. -
  3. - - Manage sequencing platforms -
  4. -
+ {%else%} +

+ There are no populations currently defined for {{species['FullName']}} + ({{species['SpeciesName']}}).

+ {%endif%} - + {{add_form_buttons()}} + +
+ +
+

Upload and manage the sequencing platforms for species + '{{species.Name | title}} ({{species.FullName}})' + here. +

+
+ {%endblock%} {%block sidebarcontents%} -
-
-
Species Extras
-
-

Some extra internal-use details (mostly for UI concerns on GeneNetwork)

-

- - If you do not understand what the following are about, simply ignore them - — - They have no bearing whatsoever on your data, or its analysis. - -

-
-
Family
-
{{species.Family}}
+
+

You can manage species' populations and sequencing platforms here. Select + the tab for the feature you wish to continue working on.

+
+{{display_sui_species_card(species)}} +{%endblock%} -
FamilyOrderId
-
{{species.FamilyOrderId}}
-
OrderId
-
{{species.OrderId}}
-
-
- Edit -
-
+{%block javascript%} + {%endblock%} -- cgit 1.4.1