about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-11-12 20:02:56 +0000
committerFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-11-12 14:28:39 -0600
commitf9166b3b98614b41ad5902005eecbd7eb5aff776 (patch)
tree3e6f46ba238374fc5fc71626d6c22645eefe9620
parentbffbd4d09948f5a5f0ad2f72bf5f39bcd1509f91 (diff)
downloadgn-uploader-f9166b3b98614b41ad5902005eecbd7eb5aff776.tar.gz
Add the sample-order review page
Present the proposed sample order in an editable textarea (one sample per line)
with instructions, and submit it to the sample-order view.

Co-authored-by: pi coding agent <pi@pi.dev>
-rw-r--r--uploader/templates/genotypes/sample-order.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/uploader/templates/genotypes/sample-order.html b/uploader/templates/genotypes/sample-order.html
new file mode 100644
index 0000000..eb2f5d4
--- /dev/null
+++ b/uploader/templates/genotypes/sample-order.html
@@ -0,0 +1,54 @@
+{%extends "genotypes/base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+
+{%block title%}Genotypes: Sample Order{%endblock%}
+{%block pagetitle%}Genotypes: Sample Order{%endblock%}
+
+{%block breadcrumbs%}
+{{super()}}
+<li class="breadcrumb-item">
+  <a href="{{url_for('species.populations.genotypes.view_dataset',
+           species_id=species.SpeciesId,
+           population_id=population.Id,
+           dataset_id=dataset.Id)}}">dataset</a>
+</li>
+{%endblock%}
+
+{%block contents%}
+{{flash_all_messages()}}
+
+<div class="row">
+  <h2>Sample Order</h2>
+</div>
+
+<div class="row">
+  <p>
+    Review the order of the {{ samples|length }} sample(s) found in the file.
+    The population's existing order is kept where possible, with new samples
+    appended alphabetically. Reorder by editing the lines below—one sample name
+    per line—then continue.
+  </p>
+</div>
+
+<form method="POST"
+      action="{{url_for('species.populations.genotypes.sample_order',
+               species_id=species.SpeciesId,
+               population_id=population.Id,
+               dataset_id=dataset.Id,
+               job_id=job_id)}}">
+  <div class="mb-3">
+    <label for="txt-sample-order" class="form-label">
+      Samples ({{ samples|length }})</label>
+    <textarea id="txt-sample-order"
+              name="sample_order"
+              class="form-control"
+              rows="20"
+              spellcheck="false">{{ samples|join("\n") }}</textarea>
+    <span class="form-text text-muted">
+      Each sample must appear exactly once.
+    </span>
+  </div>
+
+  <button type="submit" class="btn btn-primary">Continue</button>
+</form>
+{%endblock%}