diff --git a/omero_vitessce/templates/omero_vitessce/vitessce_open_with.html b/omero_vitessce/templates/omero_vitessce/vitessce_open_with.html
new file mode 100644
index 0000000..5a40e74
--- /dev/null
+++ b/omero_vitessce/templates/omero_vitessce/vitessce_open_with.html
@@ -0,0 +1,192 @@
+
+{% extends "webgateway/base/base_header.html" %}
+{% block content %}
+
+
+ {% if json_configs %}
+
Please select an attached config file from the list below:
+
+ {% for file, url in json_configs.items%}
+
+ {% endfor %}
+
+ {% else %}
+
There are no config files attached!
+
To use the viewer you can attach a .json config file and refresh the panel.
+ {% endif %}
+
+ {% if form %}
+
Or use the form below to generate a new config file:
+
+ {% else %}
+
Autogenerating config files requires the
+ omero-web-zarr
+ plugin which seems not to be available.
+ {% endif %}
+
+{% endblock %}
diff --git a/omero_vitessce/views.py b/omero_vitessce/views.py
index 72cf577..220d971 100644
--- a/omero_vitessce/views.py
+++ b/omero_vitessce/views.py
@@ -73,13 +73,9 @@ def vitessce_open(request, conn=None, **kwargs):
if request.GET.get("dataset") is not None:
obj_type = "dataset"
obj_id = int(request.GET.get("dataset"))
- elif request.GET.get("image") is not None:
+ if request.GET.get("image") is not None:
obj_type = "image"
obj_id = int(request.GET.get("image"))
- else:
- context = {"json_configs": dict(),
- "obj_type": obj_type, "obj_id": obj_id}
- return render(request, "omero_vitessce/vitessce_panel.html", context)
_, config_urls = get_attached_configs(obj_type, obj_id, conn)
@@ -88,4 +84,12 @@ def vitessce_open(request, conn=None, **kwargs):
else:
context = {"json_configs": dict(),
"obj_type": obj_type, "obj_id": obj_id}
- return render(request, "omero_vitessce/vitessce_panel.html", context)
+ if OMERO_WEB_ZARR:
+ files, urls, img_files, img_urls = get_files_images(
+ obj_type, obj_id, conn)
+ form = ConfigForm(file_names=files, file_urls=urls,
+ img_names=img_files, img_urls=img_urls)
+ context["form"] = form
+ else:
+ context["form"] = None
+ return render(request, "omero_vitessce/vitessce_open_with.html", context)
diff --git a/setup.py b/setup.py
index cde44fd..e19759f 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
setup(
name="omero-vitessce",
- version="1.0.5",
+ version="1.0.6",
description="OMERO Vitessce multimodal data viewer plugin for OMERO.web",
long_description=open('README.md').read(),
long_description_content_type='text/markdown',