aboutsummaryrefslogtreecommitdiff
path: root/inst/app/templates/content/estimators/add-estimators/components
diff options
context:
space:
mode:
authorNaeem Model <me@nmode.ca>2024-05-09 20:22:45 +0000
committerNaeem Model <me@nmode.ca>2024-05-09 20:22:45 +0000
commitdce01ac19a0298388089ce4297a44ef2aa2c4c46 (patch)
tree1dbc74e9f7e9139f14a517b33a0e3c82c6e04dd0 /inst/app/templates/content/estimators/add-estimators/components
parente06a56581d43cb3c59d51b9b39e6d0fb36efe31c (diff)
Revamp Shiny app
Diffstat (limited to 'inst/app/templates/content/estimators/add-estimators/components')
-rw-r--r--inst/app/templates/content/estimators/add-estimators/components/mu.html20
-rw-r--r--inst/app/templates/content/estimators/add-estimators/components/panel.html21
2 files changed, 41 insertions, 0 deletions
diff --git a/inst/app/templates/content/estimators/add-estimators/components/mu.html b/inst/app/templates/content/estimators/add-estimators/components/mu.html
new file mode 100644
index 0000000..f25a1c8
--- /dev/null
+++ b/inst/app/templates/content/estimators/add-estimators/components/mu.html
@@ -0,0 +1,20 @@
+<!-- Serial interval label and help tooltip. -->
+<label class="form-label" for="mu_{{ id }}">
+ Serial interval (&#956;)
+ <sup data-bs-toggle="tooltip" data-bs-placement="right"
+ data-bs-title="The serial interval is the time between when an infected individual (the infector) becomes
+ symptomatic, to when another individual (who is infected by the infector) becomes symptomatic.">
+ [?]
+ </sup>
+</label>
+<div class="input-group">
+ <!-- Serial interval input field. -->
+ <input name="mu_{{ id }}" class="form-control" type="text">
+ <!-- Days/weeks dropdown. -->
+ <select name="mu_{{ id }}_units" class="form-select">
+ <option value="Days" selected>Days</option>
+ <option value="Weeks">Weeks</option>
+ </select>
+</div>
+<!-- Warning text for incorrect values. -->
+<small id="mu_{{ id }}_warn" class="form-text text-primary shiny-text-output"></small>
diff --git a/inst/app/templates/content/estimators/add-estimators/components/panel.html b/inst/app/templates/content/estimators/add-estimators/components/panel.html
new file mode 100644
index 0000000..b1e0378
--- /dev/null
+++ b/inst/app/templates/content/estimators/add-estimators/components/panel.html
@@ -0,0 +1,21 @@
+<div class="accordion-item">
+ <h2 class="accordion-header">
+ <button class="accordion-button collapsed" type="button"
+ data-bs-toggle="collapse" data-bs-target="#{{ id }}">
+ <h4>{{ header }}</h4>
+ </button>
+ </h2>
+ <div id="{{ id }}" class="accordion-collapse collapse" data-bs-parent="#estimators-accordion">
+ <div class="accordion-body">
+ <p>Reference: <a href="{{ reference_url }}" target="_blank"><em>{{ reference_label }}</em></a></p>
+ <p>{{ htmlTemplate(paste0("templates/content/estimators/add-estimators/descriptions/", id, ".html")) }}</p>
+ <h5>Parameters</h5>
+ <form class="my-3">
+ {{ htmlTemplate(paste0("templates/content/estimators/add-estimators/parameters/", id, ".html")) }}
+ </form>
+ <button id="add_{{ id }}" type="button" class="btn btn-outline-primary btn-sm action-button">
+ <span class="glyphicon glyphicon-plus"></span> Add
+ </button>
+ </div>
+ </div>
+</div>