From 17af2a6b12ee4ddd4b4861319c2fc03dc73f9e19 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 29 Dec 2025 10:32:37 -0600 Subject: Move index/home page to new UI templates. --- uploader/base_routes.py | 9 +- uploader/templates/base.html | 94 +++------------- uploader/templates/index.html | 229 +++++++++++++++++++++++--------------- uploader/templates/login.html | 12 -- uploader/templates/sui-base.html | 103 ----------------- uploader/templates/sui-index.html | 161 --------------------------- uploader/templates/sui-login.html | 1 - 7 files changed, 163 insertions(+), 446 deletions(-) delete mode 100644 uploader/templates/login.html delete mode 100644 uploader/templates/sui-base.html delete mode 100644 uploader/templates/sui-index.html delete mode 120000 uploader/templates/sui-login.html diff --git a/uploader/base_routes.py b/uploader/base_routes.py index e9f1165..72a8402 100644 --- a/uploader/base_routes.py +++ b/uploader/base_routes.py @@ -11,12 +11,8 @@ from flask import (flash, current_app as app, send_from_directory) - -from uploader.sui import sui_template - from uploader.flask_extensions import url_for from uploader.ui import make_template_renderer -from uploader.oauth2.client import user_logged_in from uploader.species.models import all_species, species_by_id base = Blueprint("base", __name__) @@ -40,10 +36,11 @@ def index(): print("We found a species ID. Processing...") if not bool(request.args.get("species_id")): return render_template( - sui_template("index.html" if user_logged_in() else "login.html"), + "index.html", gn2server_intro=urljoin(app.config["GN2_SERVER_URL"], "/intro"), species=all_species(conn), - streamlined_ui=streamlined_ui) + view_under_construction=request.args.get( + "view_under_construction", False)) species = species_by_id(conn, request.args.get("species_id")) if not bool(species): diff --git a/uploader/templates/base.html b/uploader/templates/base.html index d521ccb..719a646 100644 --- a/uploader/templates/base.html +++ b/uploader/templates/base.html @@ -16,7 +16,11 @@ - + + + + + {%block css%}{%endblock%} @@ -42,91 +46,29 @@ -
+ -
- Data Upload and Quality Control: {%block pagetitle%}{%endblock%} - -
- -
-
+
{%block contents%}{%endblock%}
-
+ + diff --git a/uploader/templates/index.html b/uploader/templates/index.html index aa1414e..e426732 100644 --- a/uploader/templates/index.html +++ b/uploader/templates/index.html @@ -1,107 +1,162 @@ {%extends "base.html"%} {%from "flash_messages.html" import flash_all_messages%} +{%from "macro-forms.html" import add_http_feature_flags%} {%block title%}Home{%endblock%} {%block pagetitle%}Home{%endblock%} -{%block contents%} - -
- {{flash_all_messages()}} -
-

Welcome to the GeneNetwork Data Upload and Quality Control - System.

-

This tool helps you prepare and upload research data to GeneNetwork for - analysis.

- -

Getting Started

-

The sections below explain the features of the system. Review this guide - to learn how to use the system.

- - {%block extrapageinfo%}{%endblock%} - -

Species

- -

GeneNetwork supports genetic studies across multiple species (e.g. mice - [Mus musculus], human [homo sapiens], rats [Rattus norvegicus], etc.) . - Here you can:

- - -

Populations

- -

A "population" refers to a specific subgroup within a species that you’re - studying (e.g., BXD mice). Here you can:

- - -

Samples

- -

Manage individual specimens or cases used in your experiments. These - include:

- - - - -

Genotype Data

- -

Upload and review genetic markers and allele encodings for your - population. Key details:

+{%block extra_breadcrumbs%}{%endblock%} - - -

Requirement: Samples must already have been registered - in the system before uploading genotype data.

- -

Phenotype Data

+{%block contents%} -

Phenotypes are the visible traits or features of a living thing. For - example, phenotypes include:

+{%macro add_form_buttons()%} +
+
+ +
+ +
+{%endmacro%} - +
{{flash_all_messages()}}
-

This part of the system will allow you to upload and manage the values - for different phenotypes from various samples in your studies.

+{%if user_logged_in()%} - -
+
+
+ Quick Navigation +
+ + +
+
+
+ {%endif%} + {%endblock%} + -{%endblock%} + {%block javascript%} + + {%endblock%} diff --git a/uploader/templates/login.html b/uploader/templates/login.html deleted file mode 100644 index e76c644..0000000 --- a/uploader/templates/login.html +++ /dev/null @@ -1,12 +0,0 @@ -{%extends "index.html"%} - -{%block title%}Data Upload{%endblock%} - -{%block pagetitle%}log in{%endblock%} - -{%block extrapageinfo%} -

- You need to - sign in to use this system.

-{%endblock%} diff --git a/uploader/templates/sui-base.html b/uploader/templates/sui-base.html deleted file mode 100644 index 719a646..0000000 --- a/uploader/templates/sui-base.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - {%block extrameta%}{%endblock%} - - Data Upload and Quality Control: {%block title%}{%endblock%} - - - - - - - - - - {%block css%}{%endblock%} - - - - - - - -
- - -
- {%block contents%}{%endblock%} -
- - -
- - - - - - - - - - - - - - - - - - {%block javascript%}{%endblock%} - - diff --git a/uploader/templates/sui-index.html b/uploader/templates/sui-index.html deleted file mode 100644 index b93bf40..0000000 --- a/uploader/templates/sui-index.html +++ /dev/null @@ -1,161 +0,0 @@ -{%extends "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%} - -{%block title%}Home{%endblock%} - -{%block pagetitle%}Home{%endblock%} - -{%block extra_breadcrumbs%}{%endblock%} - -{%block contents%} - -{%macro add_form_buttons()%} -
-
- -
- -
-{%endmacro%} - -
{{flash_all_messages()}}
- -{%if user_logged_in()%} - -
- -
- -
-
-
-

Species

- -

Select the species you want to work with.

- -
- {{add_http_feature_flags()}} - - {{add_form_buttons()}} - - {%if species | length != 0%} -
- - - - - - - - - -
Species Name
-
- - {%else%} - - - -
- -
- - {%endif%} - - {{add_form_buttons()}} - -
-
- -
-

View, edit and delete existing publications, and add new - publications by clicking on the button below.

- - manage publications -
-
-
- - {%else%} - -
-

The Genenetwork Uploader (gn-uploader) enables upload of new data - into the Genenetwork System. It provides Quality Control over data, and - guidance in case you data does not meet the standards for acceptance.

-

- Sign in - to get started.

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

The data in Genenetwork is related to one species or another. Use the form - provided to select from existing species, or click on the - "Create a New Species" button if you cannot find the species you want to - work with.

-
-
-
- Quick Navigation -
- - -
-
-
- {%endblock%} - - - {%block javascript%} - - {%endblock%} diff --git a/uploader/templates/sui-login.html b/uploader/templates/sui-login.html deleted file mode 120000 index 733bbd3..0000000 --- a/uploader/templates/sui-login.html +++ /dev/null @@ -1 +0,0 @@ -sui-index.html \ No newline at end of file -- cgit 1.4.1