diff --git a/apps/labeling/downloadTable.html b/apps/labeling/downloadTable.html
index 45d34ead0..dbded30b5 100644
--- a/apps/labeling/downloadTable.html
+++ b/apps/labeling/downloadTable.html
@@ -364,6 +364,14 @@
document.getElementById("collectionName").innerText = collectionInfo[0].name
document.getElementById("collectionDesc").innerText = collectionInfo[0].description
}
+ if (collectionInfo[0].zip){
+ let zipButton = document.createElement("button")
+ zipButton.innerText = "Download Whole Collection";
+ zipButton.classList.add(["btn"]);
+ zipButton.dataset.zipurl = collectionInfo[0].zip;
+ zipButton.onclick = downloadCollection;
+ document.getElementById("collectionInfo").appendChild(zipButton)
+ }
// set slides
const slides = await store.findSlideLabelingStat(cid, getUserId());
if (slides && Array.isArray(slides)) {
@@ -450,6 +458,19 @@
}
}
+ async function downloadCollection(evt) {
+ console.log(evt)
+ let e = evt.target
+ let store = new Store("../../data/");
+ const zipUrl = e.dataset.zipurl;
+ const a = document.createElement('a');
+ a.href = zipUrl;
+ a.download = '';
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ }
+
function openGenericReview(e){
const oid = e.dataset.id;
if (oid) {