]> nmode's Git Repositories - Rnaught/commitdiff
entry.html (renamed bulk-entry)
authorkfiliyork <116465911+kfiliyork@users.noreply.github.com>
Thu, 6 Jun 2024 22:26:32 +0000 (18:26 -0400)
committerGitHub <noreply@github.com>
Thu, 6 Jun 2024 22:26:32 +0000 (18:26 -0400)
inst/app/templates/content/data/enter-data/entry.html [new file with mode: 0644]

diff --git a/inst/app/templates/content/data/enter-data/entry.html b/inst/app/templates/content/data/enter-data/entry.html
new file mode 100644 (file)
index 0000000..be43625
--- /dev/null
@@ -0,0 +1,48 @@
+\r
+<!-- Button to toggle help text. -->\r
+<button type="button" class="btn btn-outline-primary btn-sm" id="bulk-help-toggle"\r
+        data-bs-toggle="collapse" data-bs-target="#bulk-help">Show required format</button>\r
+<!-- Help text for bulk input format. -->\r
+<div class="collapse mt-2" id="bulk-help">\r
+  <div class="card card-body border-primary">\r
+    <p>Manually enter rows or upload a CSV file in the following format:</p>\r
+    <p class="overflow-x-scroll text-nowrap font-monospace">\r
+      <u>Dataset name</u>,<u>Time units</u>,<u>Case counts</u>\r
+    </p>\r
+    <p>\r
+      <u class="font-monospace">Time units</u> must be one of\r
+      <u class="font-monospace">Days</u> or \r
+      <u class="font-monospace">Weeks</u>, and\r
+      <u class="font-monospace">Case counts</u>\r
+      must be a comma-separated list of one or more non-negative integers.\r
+    </p>\r
+    <p>Example:</p>\r
+    <p class="overflow-x-scroll text-nowrap font-monospace lh-sm">\r
+      Montreal,Days,1,2,3,4,5,6,7,8,9,19<br>\r
+      Ottawa,Weeks,1,2,3,4,5,6,7,8,9,19<br>\r
+      Toronto,Days,1,2,3,4,5,6,7,8,9,19\r
+    </p>\r
+  </div>\r
+</div>\r
+<!-- Data input area. -->\r
+<div class="my-4">\r
+  <label class="form-label" for="data_area">Enter manually</label>\r
+  <textarea id="data_area" class="form-control" rows="3" wrap="off"></textarea>\r
+  <div>\r
+    <small id="data_area_warn" class="form-text text-primary shiny-html-output"></small>\r
+  </div>\r
+  <button id="data_bulk" type="button" class="btn btn-outline-primary btn-sm action-button mt-3">\r
+    <span class="glyphicon glyphicon-plus"></span> Add\r
+  </button>\r
+</div>\r
+<!-- File input for data upload (hidden). -->\r
+<input class="form-control" type="file" id="data_upload" accept="text/csv,text/comma-separated-values,text/plain,.csv">\r
+<!-- Custom button to trigger file selector for data upload (visible). -->\r
+<label class="form-label" for="data-upload-select">Upload a CSV file</label>\r
+<div class="input-group">\r
+  <button id="data-upload-select" type="button" class="btn btn-outline-primary btn-sm">\r
+    <span class="glyphicon glyphicon-file"></span> Select file\r
+  </button>\r
+  <input type="text" id="data-upload-name" class="form-control" placeholder="No file selected" disabled>\r
+</div>\r
+<small id="data_upload_warn" class="form-text text-primary shiny-html-output"></small>\r