From 6748236f00c85b86437b130350c7d710014218d5 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 17 Dec 2025 13:23:59 -0600 Subject: Update UI for platforms to the new streamlined UI form. --- uploader/platforms/views.py | 6 +- uploader/templates/platforms/sui-base.html | 17 +++ .../templates/platforms/sui-create-platform.html | 116 +++++++++++++++++++++ .../templates/platforms/sui-list-platforms.html | 88 ++++++++++++++++ 4 files changed, 225 insertions(+), 2 deletions(-) create mode 100644 uploader/templates/platforms/sui-base.html create mode 100644 uploader/templates/platforms/sui-create-platform.html create mode 100644 uploader/templates/platforms/sui-list-platforms.html diff --git a/uploader/platforms/views.py b/uploader/platforms/views.py index ba0f0ef..0092760 100644 --- a/uploader/platforms/views.py +++ b/uploader/platforms/views.py @@ -8,6 +8,8 @@ from flask import ( Blueprint, current_app as app) +from uploader.sui import sui_template + from uploader.flask_extensions import url_for from uploader.ui import make_template_renderer from uploader.authorisation import require_login @@ -60,7 +62,7 @@ def list_platforms(species_id: int): 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( - "platforms/list-platforms.html", + sui_template("platforms/list-platforms.html"), species=species, platforms=enumerate_sequence( platforms_by_species(conn, @@ -87,7 +89,7 @@ def create_platform(species_id: int): if request.method == "GET": return render_template( - "platforms/create-platform.html", + sui_template("platforms/create-platform.html"), species=species, activelink="create-platform") diff --git a/uploader/templates/platforms/sui-base.html b/uploader/templates/platforms/sui-base.html new file mode 100644 index 0000000..136b956 --- /dev/null +++ b/uploader/templates/platforms/sui-base.html @@ -0,0 +1,17 @@ +{%extends "species/sui-base.html"%} +{%from "species/macro-display-species-card.html" import display_sui_species_card%} + +{%block breadcrumbs%} +{{super()}} + +{%endblock%} + + +{%block sidebarcontents%} +{{display_sui_species_card(species)}} +{%endblock%} diff --git a/uploader/templates/platforms/sui-create-platform.html b/uploader/templates/platforms/sui-create-platform.html new file mode 100644 index 0000000..25977a7 --- /dev/null +++ b/uploader/templates/platforms/sui-create-platform.html @@ -0,0 +1,116 @@ +{%extends "platforms/sui-base.html"%} +{%from "flash_messages.html" import flash_all_messages%} + +{%block title%}Platforms — Create Platforms{%endblock%} + +{%block breadcrumbs%} +{{super()}} + +{%endblock%} + +{%block contents%} +{{flash_all_messages()}} + +
+

Create New Platform

+ +

You can create a new genetic sequencing platform below.

+
+ +
+
+ +
+ + + +

This is the platform's + + accession value on NCBI. If you do not know the value, click the + link and search on NCBI for species '{{species.FullName}}'.

+
+ +
+ + + +

This is name of the genetic sequencing platform.

+
+ +
+ + + +

Use the following conventions for this field: +

    +
  1. Start with a 4-letter vendor code, e.g. "Affy" for "Affymetrix", "Illu" for "Illumina", etc.
  2. +
  3. Append an underscore to the 4-letter vendor code
  4. +
  5. Use the name of the array given by the vendor, e.g. U74AV2, MOE430A, etc.
  6. +
+

+
+
+ +
+ + + +

The full platform title. Sometimes, this is the same as the Platform + Name above.

+
+ +
+ + + +

This is a Chip identification value useful for analysis with the + + GeneWeaver + and + + WebGestalt + tools.
+ This can be left blank for custom platforms.

+
+ +
+ +
+
+
+{%endblock%} diff --git a/uploader/templates/platforms/sui-list-platforms.html b/uploader/templates/platforms/sui-list-platforms.html new file mode 100644 index 0000000..f4c17e8 --- /dev/null +++ b/uploader/templates/platforms/sui-list-platforms.html @@ -0,0 +1,88 @@ +{%extends "platforms/sui-base.html"%} +{%from "flash_messages.html" import flash_all_messages%} + +{%block title%}Platforms — List Platforms{%endblock%} + +{%block pagetitle%}Platforms — List Platforms{%endblock%} + + +{%block contents%} +{{flash_all_messages()}} + +
+

View the list of the genetic sequencing platforms that are currently + supported by GeneNetwork.

+

If you cannot find the platform you wish to use, you can add it by clicking + the "New Platform" button below.

+

Create Platform

+
+ +
+

Supported Platforms

+ {%if platforms is defined and platforms | length > 0%} +

There are {{total_platforms}} platforms supported by GeneNetwork

+ +
+
+ {%if start_from > 0%} + + + Previous + + {%endif%} +
+
+ Displaying platforms {{start_from+1}} to {{start_from+count if start_from+count < total_platforms else total_platforms}} of + {{total_platforms}} +
+
+ {%if start_from + count < total_platforms%} + + Next + + + {%endif%} +
+
+ + + + + + + + + + + + + {%for platform in platforms%} + + + + + + + {%endfor%} + +
Platform NameGEO PlatformTitle
{{platform.sequence_number}}{{platform.GeneChipName}}{{platform.GeoPlatform}}{{platform.Title}}
+ {%else%} +

+ + There are no platforms supported at this time!

+ {%endif%} +
+{%endblock%} -- cgit 1.4.1