about summary refs log tree commit diff
path: root/uploader/templates/samples
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/samples')
-rw-r--r--uploader/templates/samples/index.html10
-rw-r--r--uploader/templates/samples/list-samples.html113
-rw-r--r--uploader/templates/samples/select-population.html18
-rw-r--r--uploader/templates/samples/upload-failure.html2
-rw-r--r--uploader/templates/samples/upload-samples.html9
5 files changed, 83 insertions, 69 deletions
diff --git a/uploader/templates/samples/index.html b/uploader/templates/samples/index.html
index 7c88c01..ee98734 100644
--- a/uploader/templates/samples/index.html
+++ b/uploader/templates/samples/index.html
@@ -11,11 +11,13 @@
 {{flash_all_messages()}}
 
 <div class="row">
-  <p>Here, you can upload the samples/individuals that were used in your
-    experiments.</p>
-  <p>Since the samples are linked to specific species and populations, we will
-    need to first select them in the next few steps.</p>
+  <p>GeneNetwork has a selection of different species of organisms to choose from. Within those species, there are the populations of interest for a variety of experiments, from which you, the researcher, picked your samples (or individuals or cases) from. Here you can provide some basic details about your samples.</p>
+  <p>To start off, we will need to know what species and population your samples belong to. Please provide that information in the next sections.</p>
 
   {{select_species_form(url_for("species.populations.samples.index"), species)}}
 </div>
 {%endblock%}
+
+{%block javascript%}
+<script type="text/javascript" src="/static/js/species.js"></script>
+{%endblock%}
diff --git a/uploader/templates/samples/list-samples.html b/uploader/templates/samples/list-samples.html
index 8f1bf16..aed27c3 100644
--- a/uploader/templates/samples/list-samples.html
+++ b/uploader/templates/samples/list-samples.html
@@ -24,45 +24,69 @@
 
 <div class="row">
   <p>
-    Samples for population "{{population.FullName}}" from the
+    You selected the population "{{population.FullName}}" from the
     "{{species.FullName}}" species.
   </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">
+  <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>
+</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>
+{%if samples | length > 0%}
+<div class="row">
+  <p>
+    This population already has <strong>{{total_samples}}</strong>
+    samples/individuals entered. You can explore the list of samples in this
+    population in the table below.
+  </p>
+</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="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-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 +97,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>
@@ -84,30 +109,20 @@
 
   <p>
     <a href="#"
-       title="Add samples for population '{{population.FullName}}' from species
+       title="Delete samples from population '{{population.FullName}}' from species
               '{{species.FullName}}'."
-       class="btn btn-danger">
+       class="btn btn-danger not-implemented">
       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>
+{%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%}
+
 {%endblock%}
 
 {%block sidebarcontents%}
diff --git a/uploader/templates/samples/select-population.html b/uploader/templates/samples/select-population.html
index 8e22ac1..1cc7573 100644
--- a/uploader/templates/samples/select-population.html
+++ b/uploader/templates/samples/select-population.html
@@ -12,23 +12,15 @@
 {{flash_all_messages()}}
 
 <div class="row">
-  <p>Select the population to use with your samples:</p>
   {{select_population_form(
-  url_for("species.populations.samples.select_population", species_id=species.SpeciesId),
-  populations)}}
-</div>
-<div class="row">
-  <p><strong>Cannot find your population in the list?</strong></p>
-
-  <p>If you cannot find the population you want in the drop-down above, you can
-    instead,
-    <a href="{{url_for('species.populations.create_population',
-             species_id=species.SpeciesId)}}"
-       title="Create a new population for species '{{species.FullName}},">
-      create a new population</a>.
+  url_for("species.populations.samples.select_population", species_id=species.SpeciesId), species, populations)}}
 </div>
 {%endblock%}
 
 {%block sidebarcontents%}
 {{display_species_card(species)}}
 {%endblock%}
+
+{%block javascript%}
+<script type="text/javascript" src="/static/js/populations.js"></script>
+{%endblock%}
diff --git a/uploader/templates/samples/upload-failure.html b/uploader/templates/samples/upload-failure.html
index 458ab55..2cf8053 100644
--- a/uploader/templates/samples/upload-failure.html
+++ b/uploader/templates/samples/upload-failure.html
@@ -15,7 +15,7 @@
 
 <h3>Debugging Information</h3>
 <ul>
-  <li><strong>job id</strong>: {{job.job_id}}</li>
+  <li><strong>job id</strong>: {{job.jobid}}</li>
   <li><strong>status</strong>: {{job.status}}</li>
   <li><strong>job type</strong>: {{job["job-type"]}}</li>
 </ul>
diff --git a/uploader/templates/samples/upload-samples.html b/uploader/templates/samples/upload-samples.html
index b101b2e..6422094 100644
--- a/uploader/templates/samples/upload-samples.html
+++ b/uploader/templates/samples/upload-samples.html
@@ -23,7 +23,12 @@
 {{flash_all_messages()}}
 
 <div class="row">
-  <p>You can now upload a character-separated value (CSV) file that contains
+  <p>
+    You can now upload the samples for the "{{population.FullName}}" population
+    from the "{{species.FullName}}" species here.
+  </p>
+  <p>
+    Upload a <strong>character-separated value (CSV)</strong> file that contains
     details about your samples. The CSV file should have the following fields:
     <dl>
       <dt>Name</dt>
@@ -61,7 +66,7 @@
     <div class="form-group">
       <label for="file-samples" class="form-label">select file</label>
       <input type="file" name="samples_file" id="file:samples"
-	     accept="text/csv, text/tab-separated-values"
+	     accept="text/csv, text/tab-separated-values, text/plain"
 	     class="form-control" />
     </div>