aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/populations
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/populations')
-rw-r--r--uploader/templates/populations/macro-display-population-card.html32
-rw-r--r--uploader/templates/populations/macro-select-population.html30
-rw-r--r--uploader/templates/populations/view-population.html6
3 files changed, 67 insertions, 1 deletions
diff --git a/uploader/templates/populations/macro-display-population-card.html b/uploader/templates/populations/macro-display-population-card.html
new file mode 100644
index 0000000..e68f8e3
--- /dev/null
+++ b/uploader/templates/populations/macro-display-population-card.html
@@ -0,0 +1,32 @@
+{%from "species/macro-display-species-card.html" import display_species_card%}
+
+{%macro display_population_card(species, population)%}
+{{display_species_card(species)}}
+
+<div class="card">
+ <div class="card-body">
+ <h5 class="card-title">Population</h5>
+ <div class="card-text">
+ <dl>
+ <dt>Name</dt>
+ <dd>{{population.Name}}</dd>
+
+ <dt>Full Name</dt>
+ <dd>{{population.FullName}}</dd>
+
+ <dt>Code</dt>
+ <dd>{{population.InbredSetCode}}</dd>
+
+ <dt>Genetic Type</dt>
+ <dd>{{population.GeneticType}}</dd>
+
+ <dt>Family</dt>
+ <dd>{{population.Family}}</dd>
+
+ <dt>Description</dt>
+ <dd>{{population.Description or "-"}}</dd>
+ </dl>
+ </div>
+ </div>
+</div>
+{%endmacro%}
diff --git a/uploader/templates/populations/macro-select-population.html b/uploader/templates/populations/macro-select-population.html
new file mode 100644
index 0000000..af4fd3a
--- /dev/null
+++ b/uploader/templates/populations/macro-select-population.html
@@ -0,0 +1,30 @@
+{%macro select_population_form(form_action, populations)%}
+<form method="GET" action="{{form_action}}">
+ <legend>Select Population</legend>
+
+ <div class="form-group">
+ <label for="select-population" class="form-label">Select Population</label>
+ <select id="select-population"
+ name="population_id"
+ class="form-control"
+ required="required">
+ <option value="">Select Population</option>
+ {%for family in populations%}
+ <optgroup {%if family[0][1] is not none%}
+ label="{{family[0][1]}}"
+ {%else%}
+ label="Undefined"
+ {%endif%}>
+ {%for population in family[1]%}
+ <option value="{{population.Id}}">{{population.FullName}}</option>
+ {%endfor%}
+ </optgroup>
+ {%endfor%}
+ </select>
+ </div>
+
+ <div class="form-group">
+ <input type="submit" value="Select" class="btn btn-primary" />
+ </div>
+</form>
+{%endmacro%}
diff --git a/uploader/templates/populations/view-population.html b/uploader/templates/populations/view-population.html
index 52dadc4..31db54f 100644
--- a/uploader/templates/populations/view-population.html
+++ b/uploader/templates/populations/view-population.html
@@ -59,7 +59,11 @@
<nav class="nav">
<ul>
<li>
- <a href="#" title="Upload samples">upload samples</a>
+ <a href="{{url_for('species.populations.samples.list_samples',
+ species_id=species.SpeciesId,
+ population_id=population.Id)}}"
+ title="Manage samples: Add new or delete existing.">
+ manage samples</a>
</li>
<li>
<a href="#" title="Upload expression data">upload expression data</a>