about summary refs log tree commit diff
path: root/uploader/templates/samples/list-samples.html
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/samples/list-samples.html')
-rw-r--r--uploader/templates/samples/list-samples.html133
1 files changed, 58 insertions, 75 deletions
diff --git a/uploader/templates/samples/list-samples.html b/uploader/templates/samples/list-samples.html
index 8f1bf16..3aac984 100644
--- a/uploader/templates/samples/list-samples.html
+++ b/uploader/templates/samples/list-samples.html
@@ -1,68 +1,73 @@
 {%extends "samples/base.html"%}
 {%from "flash_messages.html" import flash_all_messages%}
 {%from "populations/macro-select-population.html" import select_population_form%}
-{%from "populations/macro-display-population-card.html" import display_population_card%}
 
 {%block title%}Samples — List Samples{%endblock%}
 
-{%block pagetitle%}Samples — List Samples{%endblock%}
+{%block contents%}
+{{super()}}
 
-{%block lvl4_breadcrumbs%}
-<li {%if activelink=="list-samples"%}
-    class="breadcrumb-item active"
-    {%else%}
-    class="breadcrumb-item"
-    {%endif%}>
-  <a href="{{url_for('species.populations.samples.list_samples',
-           species_id=species.SpeciesId,
-           population_id=population.Id)}}">List</a>
-</li>
-{%endblock%}
+<div class="row">
+  <h3 class="subheading">manage samples</h3>
+  {{flash_all_messages()}}
+</div>
 
-{%block contents%}
-{{flash_all_messages()}}
+<div class="row">
+  <div class="col">
+    <a href="{{url_for('species.populations.samples.upload_samples',
+             species_id=species.SpeciesId,
+             population_id=population.Id)}}"
+       title="Add samples for population '{{population.FullName}}' from species
+              '{{species.FullName}}'."
+       class="btn btn-primary">add new samples</a>
+  </div>
+</div>
 
+{%if samples | length > 0%}
 <div class="row">
   <p>
-    Samples for population "{{population.FullName}}" from the
-    "{{species.FullName}}" species.
+    Population "{{population.FullName}} ({{population.Name}})" already has
+    <strong>{{total_samples}}</strong> samples/individuals entered. You can
+    explore the list of samples in the table below.
   </p>
+</div>
 
-  {%if samples | length > 0%}
-  <div class="row">
-    <div class="col-md-2">
-      {%if offset > 0:%}
-      <a href="{{url_for('species.populations.samples.list_samples',
-               species_id=species.SpeciesId,
-               population_id=population.Id,
-               from=offset-count,
-               count=count)}}">
-        <span class="glyphicon glyphicon-backward"></span>
-        Previous
-      </a>
-      {%endif%}
-    </div>
+<div class="row">
+  <div class="col-md-2">
+    {%if offset > 0:%}
+    <a href="{{url_for('species.populations.samples.list_samples',
+             species_id=species.SpeciesId,
+             population_id=population.Id,
+             from=offset-count,
+             count=count)}}">
+      <span class="glyphicon glyphicon-backward"></span>
+      Previous
+    </a>
+    {%endif%}
+  </div>
 
-    <div class="col-md-8" style="text-align: center;">
-      Samples {{offset}} &mdash; {{offset+(count if offset + count < total_samples else total_samples - offset)}} / {{total_samples}}
-    </div>
+  <div class="col-md-8" style="text-align: center;">
+    Samples {{offset}} &mdash; {{offset+(count if offset + count < total_samples else total_samples - offset)}} / {{total_samples}}
+                                                                   </div>
 
-    <div class="col-md-2">
-      {%if offset + count < total_samples:%}
-        <a href="{{url_for('species.populations.samples.list_samples',
-                 species_id=species.SpeciesId,
-                 population_id=population.Id,
-                 from=offset+count,
-                 count=count)}}">
-          Next
-          <span class="glyphicon glyphicon-forward"></span>
-        </a>
-        {%endif%}
-    </div>
+  <div class="col-md-2">
+    {%if offset + count < total_samples:%}
+    <a href="{{url_for('species.populations.samples.list_samples',
+             species_id=species.SpeciesId,
+             population_id=population.Id,
+             from=offset+count,
+             count=count)}}">
+      Next
+      <span class="glyphicon glyphicon-forward"></span>
+    </a>
+    {%endif%}
   </div>
+</div>
+<div class="row">
   <table class="table">
     <thead>
       <tr>
+        <th></th>
         <th>Name</th>
         <th>Auxilliary Name</th>
         <th>Symbol</th>
@@ -73,6 +78,7 @@
     <tbody>
       {%for sample in samples%}
       <tr>
+        <td>{{sample.sequence_number}}</td>
         <td>{{sample.Name}}</td>
         <td>{{sample.Name2}}</td>
         <td>{{sample.Symbol or "-"}}</td>
@@ -81,35 +87,12 @@
       {%endfor%}
     </tbody>
   </table>
-
-  <p>
-    <a href="#"
-       title="Add samples for population '{{population.FullName}}' from species
-              '{{species.FullName}}'."
-       class="btn btn-danger">
-      delete all samples
-    </a>
-  </p>
-  {%else%}
-  <p class="text-danger">
-    <span class="glyphicon glyphicon-exclamation-sign"></span>
-    There are no samples for this population at this time.
-  </p>
-
-  <p>
-    <a href="{{url_for('species.populations.samples.upload_samples',
-             species_id=species.SpeciesId,
-             population_id=population.Id)}}"
-       title="Add samples for population '{{population.FullName}}' from species
-              '{{species.FullName}}'."
-       class="btn btn-primary">
-      add samples
-    </a>
-  </p>
-  {%endif%}
 </div>
-{%endblock%}
+{%else%}
+<div class="row">
+  <p>There are no samples entered for this population. Click the "Add Samples"
+    button above, to add some new samples.</p>
+</div>
+{%endif%}
 
-{%block sidebarcontents%}
-{{display_population_card(species, population)}}
 {%endblock%}