about summary refs log tree commit diff
path: root/uploader
diff options
context:
space:
mode:
Diffstat (limited to 'uploader')
-rw-r--r--uploader/phenotypes/views.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index 8a8ca42..c4aa67a 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -2,6 +2,7 @@
 import sys
 import uuid
 import json
+import datetime
 from pathlib import Path
 from functools import wraps
 from logging import INFO, ERROR, DEBUG, FATAL, CRITICAL, WARNING
@@ -329,11 +330,24 @@ def add_phenotypes(species: dict, population: dict, dataset: dict, **kwargs):# p
           # conn.cursor(cursorclass=DictCursor) as cursor
           ):
         if request.method == "GET":
-            return render_template("phenotypes/add-phenotypes.html",
-                                   species=species,
-                                   population=population,
-                                   dataset=dataset,
-                                   activelink="add-phenotypes")
+            today = datetime.date.today()
+            return render_template(
+                ("phenotypes/add-phenotypes-with-rqtl2-bundle.html"
+                 if request.args.get("use_bundle", "").lower() == "true"
+                 else "phenotypes/add-phenotypes-raw-files.html"),
+                species=species,
+                population=population,
+                dataset=dataset,
+                monthnames=(
+                    "January", "February", "March", "April",
+                    "May", "June", "July", "August",
+                    "September", "October", "November",
+                    "December"),
+                current_month=today.strftime("%B"),
+                current_year=int(today.strftime("%Y")),
+                families_with_se_and_n=(
+                    "Reference Populations (replicate average, SE, N)",),
+                activelink="add-phenotypes")
 
         try:
             ## Handle huge files here...