about summary refs log tree commit diff
path: root/uploader/templates
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates')
-rw-r--r--uploader/templates/background-jobs/job-status.html8
-rw-r--r--uploader/templates/background-jobs/job-summary.html8
-rw-r--r--uploader/templates/genotypes/list-markers.html2
-rw-r--r--uploader/templates/index.html80
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-base.html14
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html18
-rw-r--r--uploader/templates/phenotypes/base.html2
-rw-r--r--uploader/templates/phenotypes/confirm-delete-phenotypes.html196
-rw-r--r--uploader/templates/phenotypes/create-dataset.html5
-rw-r--r--uploader/templates/phenotypes/edit-phenotype.html2
-rw-r--r--uploader/templates/phenotypes/job-status.html30
-rw-r--r--uploader/templates/phenotypes/macro-display-preview-table.html24
-rw-r--r--uploader/templates/phenotypes/view-dataset.html81
-rw-r--r--uploader/templates/phenotypes/view-phenotype.html2
-rw-r--r--uploader/templates/publications/index.html4
-rw-r--r--uploader/templates/species/base.html2
16 files changed, 353 insertions, 125 deletions
diff --git a/uploader/templates/background-jobs/job-status.html b/uploader/templates/background-jobs/job-status.html
index 50cf6e5..2e75c6d 100644
--- a/uploader/templates/background-jobs/job-status.html
+++ b/uploader/templates/background-jobs/job-status.html
@@ -30,12 +30,16 @@
 
 <div class="row">
   <h3 class="subheading">STDOUT</h3>
-  <pre>{{job["stdout"]}}</pre>
+  <div style="max-width: 40em; overflow: scroll">
+    <pre>{{job["stdout"]}}</pre>
+  </div>
 </div>
 
 <div class="row">
   <h3 class="subheading">STDERR</h3>
-  <pre>{{job["stderr"]}}</pre>
+  <div style="max-width: 40em; overflow: scroll">
+    <pre>{{job["stderr"]}}</pre>
+  </div>
 </div>
 
 {%endblock%}
diff --git a/uploader/templates/background-jobs/job-summary.html b/uploader/templates/background-jobs/job-summary.html
index c2c2d6b..ef9ef6c 100644
--- a/uploader/templates/background-jobs/job-summary.html
+++ b/uploader/templates/background-jobs/job-summary.html
@@ -50,12 +50,16 @@
 
 <div class="row">
   <h3 class="subheading">Script Errors and Logging</h3>
-  <pre>{{job["stderr"]}}</pre>
+  <div style="max-width: 40em; overflow: scroll">
+    <pre>{{job["stderr"]}}</pre>
+  </div>
 </div>
 
 <div class="row">
   <h3 class="subheading">Script Output</h3>
-  <pre>{{job["stdout"]}}</pre>
+  <div style="max-width: 40em; overflow: scroll">
+    <pre>{{job["stdout"]}}</pre>
+  </div>
 </div>
 {%endblock%}
 
diff --git a/uploader/templates/genotypes/list-markers.html b/uploader/templates/genotypes/list-markers.html
index 5f3dd6f..22189c7 100644
--- a/uploader/templates/genotypes/list-markers.html
+++ b/uploader/templates/genotypes/list-markers.html
@@ -57,7 +57,7 @@
   <table class="table">
     <thead>
       <tr>
-        <th title="">#</th>
+        <th title="">Index</th>
         <th title="">Marker Name</th>
         <th title="Chromosome">Chr</th>
         <th title="Physical location of the marker in megabasepairs">
diff --git a/uploader/templates/index.html b/uploader/templates/index.html
index e426732..6e9c777 100644
--- a/uploader/templates/index.html
+++ b/uploader/templates/index.html
@@ -20,7 +20,7 @@
   <div class="col">
     <a href="{{url_for('species.create_species', return_to='base.index')}}"
        class="btn btn-outline-primary"
-       title="Create a new species.">Create a new Species</a>
+       title="Add a new species to Genenetwork.">add a new Species</a>
   </div>
 </div>
 {%endmacro%}
@@ -106,8 +106,8 @@
          id="publications-content"
          role="tabpanel"
          aria-labelledby="publications-content-tab">
-      <p>View, edit and delete existing publications, and add new
-        publications by clicking on the button below.</p>
+      <p>You can view, edit, and delete existing publications, as well as add
+        new ones, by clicking the button below.</p>
 
       <a href="{{url_for('publications.index')}}"
          title="Manage publications."
@@ -116,47 +116,55 @@
   </div>
 </div>
 
-  {%else%}
+{%else%}
 
-  <div class="row">
-    <p>The Genenetwork Uploader (<em>gn-uploader</em>) enables upload of new data
-      into the Genenetwork System. It provides Quality Control over data, and
-      guidance in case you data does not meet the standards for acceptance.</p>
-    <p>
+<div class="row">
+  <img src="/static/images/frontpage_banner.png"
+       alt="Banner image showing the process flow a user would follow." />
+</div>
+
+<div class="row">
+  <p>The GeneNetwork Uploader (gn-uploader) lets you easily add new data to the
+    GeneNetwork System. It automatically checks your data for quality and walks
+    you through fixing any issues before submission.</p>
+</div>
+
+<div class="row">
+  <div class="col">
       <a href="{{authserver_authorise_uri()}}"
          title="Sign in to the system"
          class="btn btn-primary">Sign in</a>
-      to get started.</p>
   </div>
-  {%endif%}
+</div>
+{%endif%}
 
-  {%endblock%}
+{%endblock%}
 
 
 
-  {%block sidebarcontents%}
-  {%if view_under_construction%}
-  <div class="row">
-    <p>The data in Genenetwork is related to one species or another. Use the form
-      provided to select from existing species, or click on the
-      "Create a New Species" button if you cannot find the species you want to
-      work with.</p>
-  </div>
-  <div class="row">
-    <form id="frm-quick-navigation">
-      <legend>Quick Navigation</legend>
-      <div class="form-group">
-        <label for="fqn-species-id">Species</label>
-        <select name="species_id">
-          <option value="">Select species</option>
-        </select>
-      </div>
-    </form>
-  </div>
-  {%endif%}
-  {%endblock%}
+{%block sidebarcontents%}
+{%if view_under_construction%}
+<div class="row">
+  <p>The data in Genenetwork is related to one species or another. Use the form
+    provided to select from existing species, or click on the
+    "Create a New Species" button if you cannot find the species you want to
+    work with.</p>
+</div>
+<div class="row">
+  <form id="frm-quick-navigation">
+    <legend>Quick Navigation</legend>
+    <div class="form-group">
+      <label for="fqn-species-id">Species</label>
+      <select name="species_id">
+        <option value="">Select species</option>
+      </select>
+    </div>
+  </form>
+</div>
+{%endif%}
+{%endblock%}
 
 
-  {%block javascript%}
-  <script type="text/javascript" src="/static/js/species.js"></script>
-  {%endblock%}
+{%block javascript%}
+<script type="text/javascript" src="/static/js/species.js"></script>
+{%endblock%}
diff --git a/uploader/templates/phenotypes/add-phenotypes-base.html b/uploader/templates/phenotypes/add-phenotypes-base.html
index 690c7e1..3207129 100644
--- a/uploader/templates/phenotypes/add-phenotypes-base.html
+++ b/uploader/templates/phenotypes/add-phenotypes-base.html
@@ -29,8 +29,7 @@
 
     {%block frm_add_phenotypes_elements%}{%endblock%}
 
-    <fieldset id="fldset-publication-info">
-      <legend>Publication Information</legend>
+      <h4>Publication Information</h4>
       <input type="hidden" name="publication-id" id="txt-publication-id" />
       <span class="form-text text-muted">
         Select a publication for your data. <br />
@@ -44,7 +43,7 @@
       <table id="tbl-select-publication" class="table compact stripe">
         <thead>
           <tr>
-            <th>#</th>
+            <th>Index</th>
             <th>PubMed ID</th>
             <th>Title</th>
             <th>Authors</th>
@@ -53,7 +52,6 @@
 
         <tbody></tbody>
       </table>
-    </fieldset>
 
     <div class="form-group">
       <input type="submit"
@@ -86,7 +84,8 @@
                       if(pub.PubMed_ID) {
                           return `<a href="https://pubmed.ncbi.nlm.nih.gov/` +
                               `${pub.PubMed_ID}/" target="_blank" ` +
-                              `title="Link to publication on NCBI.">` +
+                              `title="Link to publication on NCBI. This will ` +
+                              `open in a new tab.">` +
                               `${pub.PubMed_ID}</a>`;
                       }
                       return "";
@@ -99,10 +98,7 @@
                       if(pub.Title) {
                           title = pub.Title
                       }
-                      return `<a href="/publications/view/${pub.Id}" ` +
-                          `target="_blank" ` +
-                          `title="Link to view publication details">` +
-                          `${title}</a>`;
+                      return title;
                   }
               },
               {
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
index a02fae7..b1322b2 100644
--- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html
+++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
@@ -21,8 +21,7 @@
 {%endblock%}
 
 {%block frm_add_phenotypes_elements%}
-<fieldset id="fldset-file-metadata">
-  <legend>File(s) Metadata</legend>
+  <h4>File(s) Metadata</h4>
   <div class="form-group">
     <label for="txt-file-separator" class="form-label">File Separator</label>
     <div class="input-group">
@@ -89,12 +88,9 @@
       <a href="#docs-file-na" title="Documentation for no-value fields">
         documentation for more information</a>.</span>
   </div>
-</fieldset>
 
-<fieldset id="fldset-files">
   <legend>Data File(s)</legend>
 
-  <fieldset id="fldset-descriptions-file">
     <div class="form-group">
       <div class="form-check">
         <input id="chk-phenotype-descriptions-transposed"
@@ -145,10 +141,8 @@
       {{display_preview_table(
       "tbl-preview-pheno-desc", "phenotype descriptions")}}
     </div>
-  </fieldset>
 
-
-  <fieldset id="fldset-data-file">
+    
     <div class="form-group">
       <div class="form-check">
         <input id="chk-phenotype-data-transposed"
@@ -196,11 +190,9 @@
         on the expected format for the file provided here.</p>')}}
       {{display_preview_table("tbl-preview-pheno-data", "phenotype data")}}
     </div>
-  </fieldset>
 
   
   {%if population.Family in families_with_se_and_n%}
-  <fieldset id="fldset-se-file">
     <div class="form-group">
       <div class="form-check">
         <input id="chk-phenotype-se-transposed"
@@ -247,10 +239,8 @@
 
       {{display_preview_table("tbl-preview-pheno-se", "standard errors")}}
     </div>
-  </fieldset>
 
 
-  <fieldset id="fldset-n-file">
     <div class="form-group">
       <div class="form-check">
         <input id="chk-phenotype-n-transposed"
@@ -297,8 +287,6 @@
 
       {{display_preview_table("tbl-preview-pheno-n", "number of samples/individuals")}}
     </div>
-  </fieldset>
-</fieldset>
 {%endif%}
 {%endblock%}
 
@@ -477,7 +465,7 @@
               .map((field) => {
                   var value = field.trim();
                   if(navalues.includes(value)) {
-                      return "⋘NUL⋙";
+                      return "[NO-VALUE]";
                   }
                   return value;
               })
diff --git a/uploader/templates/phenotypes/base.html b/uploader/templates/phenotypes/base.html
index fe7ccd3..5959422 100644
--- a/uploader/templates/phenotypes/base.html
+++ b/uploader/templates/phenotypes/base.html
@@ -3,6 +3,7 @@
 
 {%block breadcrumbs%}
 {{super()}}
+{%if dataset%}
 <li class="breadcrumb-item">
   <a href="{{url_for('species.populations.phenotypes.view_dataset',
            species_id=species['SpeciesId'],
@@ -11,6 +12,7 @@
     {{dataset["Name"]}}
   </a>
 </li>
+{%endif%}
 {%endblock%}
 
 {%block contents%}
diff --git a/uploader/templates/phenotypes/confirm-delete-phenotypes.html b/uploader/templates/phenotypes/confirm-delete-phenotypes.html
new file mode 100644
index 0000000..3cf6e65
--- /dev/null
+++ b/uploader/templates/phenotypes/confirm-delete-phenotypes.html
@@ -0,0 +1,196 @@
+{%extends "phenotypes/base.html"%}
+{%from "flash_messages.html" import flash_all_messages%}
+
+{%block title%}Phenotypes{%endblock%}
+
+{%block pagetitle%}Delete Phenotypes{%endblock%}
+
+{%block lvl4_breadcrumbs%}
+<li {%if activelink=="view-dataset"%}
+    class="breadcrumb-item active"
+    {%else%}
+    class="breadcrumb-item"
+    {%endif%}>
+  <a href="{{url_for('species.populations.phenotypes.view_dataset',
+           species_id=species.SpeciesId,
+           population_id=population.Id,
+           dataset_id=dataset.Id)}}">View</a>
+</li>
+{%endblock%}
+
+{%block contents%}
+{{flash_all_messages()}}
+
+<div class="row"><h2>Delete Phenotypes</h2></div>
+
+{%if phenotypes | length > 0%}
+<div class="row">
+  <p>You have requested to delete the following phenotypes:</p>
+</div>
+
+<div class="row">
+  <div class="col">
+    <a id="btn-select-all-phenotypes"
+       href="#"
+       class="btn btn-info"
+       title="Select all phenotypes">select all</a>
+  </div>
+  <div class="col">
+    <a id="btn-deselect-all-phenotypes"
+       href="#"
+       class="btn btn-warning"
+       title="Deselect all phenotypes">deselect all</a>
+  </div>
+</div>
+
+<div class="row">
+  <table id="tbl-delete-phenotypes" class="table">
+    <thead>
+      <tr>
+        <th>Index</th>
+        <th>Record ID</th>
+        <th>Description</th>
+      </tr>
+    </thead>
+    <tbody>
+      {%for phenotype in phenotypes%}
+      <tr>
+        <td>
+          <input id="chk-xref-id-{{phenotype.xref_id}}"
+                 name="xref_ids"
+                 type="checkbox"
+                 value="{{phenotype.xref_id}}"
+                 class="chk-row-select" />
+        </td>
+        <td>{{phenotype.xref_id}}</td>
+        <td>{{phenotype.Post_publication_description or
+          phenotype.Pre_publication_description or
+          phenotype.original_description}}</td>
+      </tr>
+      {%endfor%}
+    </tbody>
+  </table>
+</div>
+
+<div class="row">
+  <form id="frm-delete-phenotypes-selected"
+        method="POST"
+        action="{{url_for('species.populations.phenotypes.delete_phenotypes',
+                species_id=species.SpeciesId,
+                population_id=population.Id,
+                dataset_id=dataset.Id)}}">
+    <div class="row">
+      <div class="col">
+        <input class="btn btn-info"
+               type="submit"
+               title="Cancel delete and return to dataset page."
+               name="action"
+               value="cancel" /></div>
+      <div class="col">
+        <input id="btn-delete-phenotypes-selected"
+               class="btn btn-danger"
+               type="submit"
+               title="Delete the selected phenotypes from this dataset."
+               name="action"
+               value="delete" />
+      </div>
+    </div>
+  </form>
+</div>
+{%else%}
+<div class="row">
+  <p>You did not select any phenotypes to delete. Delete everything?</p>
+</div>
+
+<div class="row">
+  <form id="frm-delete-phenotypes-all"
+        method="POST"
+        action="{{url_for('species.populations.phenotypes.delete_phenotypes',
+                species_id=species.SpeciesId,
+                population_id=population.Id,
+                dataset_id=dataset.Id)}}">
+    <div class="form-check">
+      <input class="form-check-input"
+             type="checkbox"
+             name="confirm_delete_all_phenotypes"
+             id="chk-confirm-delete-all-phenotypes" />
+      <label class="form-check-label"
+             for="chk-confirm-delete-all-phenotypes">
+        delete all phenotypes?</label>
+    </div>
+
+    <div class="row">
+      <div class="col">
+        <input class="btn btn-info"
+               type="submit"
+               title="Cancel delete and return to dataset page."
+               name="action"
+               value="cancel" /></div>
+      <div class="col">
+        <input class="btn btn-danger"
+               type="submit"
+               title="Delete all phenotypes in this dataset."
+               name="action"
+               value="delete" />
+      </div>
+    </div>
+  </form>
+</div>
+{%endif%}
+
+{%endblock%}
+
+{%block javascript%}
+<script type="text/javascript">
+  $(function() {
+      var dt = buildDataTable(
+          "#tbl-delete-phenotypes",
+          data=[],
+          columns=[],
+          userSettings={
+              responsive: true,
+              select: {
+                  style: "os",
+                  info: false
+              },
+              initComplete: function(setting, json) {
+                  var api = this.api();
+                  api.rows().select();
+                  api.rows({selected: true}).nodes().each((node, index) => {
+                      setRowChecked(node);
+                  });
+              }
+          });
+
+      $("#btn-select-all-phenotypes").on("click", function(event) {
+          dt.selectAll();
+      });
+
+      $("#btn-deselect-all-phenotypes").on("click", function(event) {
+          dt.deselectAll();
+      });
+
+      $("#btn-delete-phenotypes-selected").on("click", function(event) {
+          event.preventDefault();
+          form = $("#frm-delete-phenotypes-selected");
+          form.find(".dynamically-added-element").remove();
+          dt.rows({selected: true}).nodes().each(function(node, index) {
+              var xref_id = $(node)
+                  .find('input[type="checkbox"]:checked')
+                  .val();
+              var chk = $('<input type="checkbox">');
+              chk.attr("class", "dynamically-added-element");
+              chk.attr("value", xref_id);
+              chk.attr("name", "xref_ids");
+              chk.attr("style", "display: none");
+              chk.prop("checked", true);
+              form.append(chk);
+          });
+          form.append(
+              $('<input type="hidden" name="action" value="delete" />'));
+          form.submit();
+      })
+  });
+</script>
+{%endblock%}
+
diff --git a/uploader/templates/phenotypes/create-dataset.html b/uploader/templates/phenotypes/create-dataset.html
index 19a2b34..6eced05 100644
--- a/uploader/templates/phenotypes/create-dataset.html
+++ b/uploader/templates/phenotypes/create-dataset.html
@@ -48,7 +48,8 @@
              {%else%}
              class="form-control"
              {%endif%}
-             required="required" />
+             required="required"
+             disabled="disabled" />
       <small class="form-text text-muted">
         <p>A short representative name for the dataset.</p>
         <p>Recommended: Use the population name and append "Publish" at the end.
@@ -66,7 +67,7 @@
       <input id="txt-dataset-fullname"
              name="dataset-fullname"
              type="text"
-             value="{{original_formdata.get('dataset-fullname', '')}}"
+             value="{{original_formdata.get('dataset-fullname', '') or population.Name + ' Phenotypes'}}"
              {%if errors["dataset-fullname"] is defined%}
              class="form-control danger"
              {%else%}
diff --git a/uploader/templates/phenotypes/edit-phenotype.html b/uploader/templates/phenotypes/edit-phenotype.html
index 115d6af..1b3ee9d 100644
--- a/uploader/templates/phenotypes/edit-phenotype.html
+++ b/uploader/templates/phenotypes/edit-phenotype.html
@@ -142,7 +142,7 @@
       <table class="table table-striped table-responsive table-form-table">
         <thead style="position: sticky; top: 0;">
           <tr>
-            <th>#</th>
+            <th>Index</th>
             <th>Sample</th>
             <th>Value</th>
             {%if population.Family in families_with_se_and_n%}
diff --git a/uploader/templates/phenotypes/job-status.html b/uploader/templates/phenotypes/job-status.html
index 0bbe8e0..951907f 100644
--- a/uploader/templates/phenotypes/job-status.html
+++ b/uploader/templates/phenotypes/job-status.html
@@ -52,10 +52,10 @@
   <p>
     {%if errors | length == 0%}
     <a href="{{url_for('species.populations.phenotypes.review_job_data',
-           species_id=species.SpeciesId,
-           population_id=population.Id,
-           dataset_id=dataset.Id,
-           job_id=job_id)}}"
+             species_id=species.SpeciesId,
+             population_id=population.Id,
+             dataset_id=dataset.Id,
+             job_id=job_id)}}"
        class="btn btn-primary"
        title="Continue to process data">Continue</a>
     {%else%}
@@ -70,13 +70,28 @@
 </div>
 
 <h3 class="subheading">upload errors</h3>
+{%if errors | length == 0 %}
 <div class="row" style="max-height: 20em; overflow: scroll;">
-  {%if errors | length == 0 %}
   <p class="text-info">
     <span class="glyphicon glyphicon-info-sign"></span>
     No errors found so far
   </p>
-  {%else%}
+</div>
+{%else%}
+{%if errors | length > 0%}
+<div class="row">
+  <div class="col">
+    <a href="{{url_for('species.populations.phenotypes.download_errors',
+             species_id=species.SpeciesId,
+             population_id=population.Id,
+             dataset_id=dataset.Id,
+             job_id=job_id)}}"
+       class="btn btn-info"
+       title="Download the errors as a CSV file.">download errors CSV</a>
+  </div>
+</div>
+{%endif%}
+<div class="row" style="max-height: 20em; overflow: scroll;">
   <table class="table table-responsive">
     <thead style="position: sticky; top: 0; background: white;">
       <tr>
@@ -111,7 +126,8 @@
       {%endfor%}
     </tbody>
   </table>
-  {%endif%}
+</div>
+{%endif%}
 </div>
 
 <div class="row">
diff --git a/uploader/templates/phenotypes/macro-display-preview-table.html b/uploader/templates/phenotypes/macro-display-preview-table.html
index 5a4c422..6dffe9f 100644
--- a/uploader/templates/phenotypes/macro-display-preview-table.html
+++ b/uploader/templates/phenotypes/macro-display-preview-table.html
@@ -1,19 +1,11 @@
 {%macro display_preview_table(tableid, filetype)%}
-<div class="card">
-  <div class="card-body">
-    <h5 class="card-title">{{filetype | title}}: File Preview</h5>
-    <div class="card-text" style="overflow: scroll;">
-      <table id="{{tableid}}" class="table table-condensed table-responsive">
-        <thead>
-          <tr>
-          </tr>
-        <tbody>
-          <tr>
-            <td class="data-row-template text-info"></td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
-  </div>
+<div class="table-responsive"
+     style="max-width:39.2em;border-radius:5px;border: solid 1px;overflow-x: scroll;">
+  <h5>{{filetype | title}}: File Preview</h5>
+  <table id="{{tableid}}" class="table">
+    <thead><tr></tr></thead>
+
+    <tbody></tbody>
+  </table>
 </div>
 {%endmacro%}
diff --git a/uploader/templates/phenotypes/view-dataset.html b/uploader/templates/phenotypes/view-dataset.html
index 1fd15b2..3bb2586 100644
--- a/uploader/templates/phenotypes/view-dataset.html
+++ b/uploader/templates/phenotypes/view-dataset.html
@@ -23,25 +23,12 @@
 {{flash_all_messages()}}
 
 <div class="row">
-  <p>The basic dataset details are:</p>
-
-  <table class="table">
-    <thead>
-      <tr>
-        <th>Name</th>
-        <th>Full Name</th>
-        <th>Short Name</th>
-      </tr>
-    </thead>
+  <h2>Phenotype Data</h2>
 
-    <tbody>
-      <tr>
-        <td>{{dataset.Name}}</td>
-        <td>{{dataset.FullName}}</td>
-        <td>{{dataset.ShortName}}</td>
-      </tr>
-    </tbody>
-  </table>
+  <p>Click on any of the phenotypes in the table below to view and edit that
+    phenotype's data.</p>
+  <p>Use the search to filter through all the phenotypes and find specific
+    phenotypes of interest.</p>
 </div>
 
 <div class="row">
@@ -67,7 +54,7 @@
       <input type="submit"
              title="Compute/Recompute the means for all phenotypes."
              class="btn btn-info"
-             value="(rec/c)ompute means"
+             value="compute means"
              id="submit-frm-recompute-phenotype-means" />
     </form>
   </div>
@@ -85,24 +72,29 @@
       <input type="submit"
              title="Run/Rerun QTLReaper."
              class="btn btn-info"
-             value="(re)run QTLReaper"
+             value="run QTLReaper"
              id="submit-frm-rerun-qtlreaper" />
     </form>
   </div>
-</div>
-
-<div class="row">
-  <h2>Phenotype Data</h2>
 
-  <p>Click on any of the phenotypes in the table below to view and edit that
-    phenotype's data.</p>
-  <p>Use the search to filter through all the phenotypes and find specific
-    phenotypes of interest.</p>
+  <div class="col">
+    <form id="frm-delete-phenotypes"
+          method="POST"
+          action="{{url_for(
+                  'species.populations.phenotypes.delete_phenotypes',
+                  species_id=species['SpeciesId'],
+                  population_id=population['Id'],
+                  dataset_id=dataset['Id'])}}">
+      <input type="submit"
+             class="btn btn-danger"
+             id="btn-delete-phenotypes"
+             title="Delete phenotypes from this dataset. If no phenotypes are selected in the table, this will delete ALL the phenotypes."
+             value="delete phenotypes" />
+    </form>
+  </div>
 </div>
 
-
-<div class="row">
-
+<div class="row" style="margin-top: 0.5em;">
   <table id="tbl-phenotypes-list" class="table compact stripe cell-border">
     <thead>
       <tr>
@@ -202,6 +194,33 @@
               });
               form.submit();
           });
+
+      $("#btn-delete-phenotypes").on(
+          "click",
+          function(event) {
+              // Collect selected phenotypes for deletion, if any.
+              event.preventDefault();
+              form = $("#frm-delete-phenotypes");
+              form.find(".dynamically-added-element").remove();
+              $("#tbl-phenotypes-list")
+                  .DataTable()
+                  .rows({selected: true}).
+                  nodes().each(function(node, index) {
+                      var parts = $(node)
+                          .find(".chk-row-select")
+                          .val()
+                          .split("_");
+                      var xref_id = parts[parts.length - 1].trim();
+                      var chk = $('<input type="checkbox">');
+                      chk.attr("class", "dynamically-added-element");
+                      chk.attr("value", xref_id);
+                      chk.attr("name", "xref_ids");
+                      chk.attr("style", "display: none");
+                      chk.prop("checked", true);
+                      form.append(chk);
+                  });
+              form.submit();
+          });
   });
 </script>
 {%endblock%}
diff --git a/uploader/templates/phenotypes/view-phenotype.html b/uploader/templates/phenotypes/view-phenotype.html
index a69b024..a59949e 100644
--- a/uploader/templates/phenotypes/view-phenotype.html
+++ b/uploader/templates/phenotypes/view-phenotype.html
@@ -103,7 +103,7 @@ or "group:resource:delete-resource" in privileges%}
     <table class="table">
       <thead>
         <tr>
-          <th>#</th>
+          <th>Index</th>
           <th>Sample</th>
           <th>Value</th>
           {%if has_se%}
diff --git a/uploader/templates/publications/index.html b/uploader/templates/publications/index.html
index 54d3fc0..eb2e81b 100644
--- a/uploader/templates/publications/index.html
+++ b/uploader/templates/publications/index.html
@@ -17,7 +17,7 @@
 </div>
 
 <div class="row">
-  <p>Click on title to view more details and to edit details for that
+  <p>Click on the title to view more details or to edit the information for that
     publication.</p>
 </div>
 
@@ -25,7 +25,7 @@
   <table id="tbl-list-publications" class="table compact stripe">
     <thead>
       <tr>
-        <th>#</th>
+        <th>Index</th>
         <th>PubMed ID</th>
         <th>Title</th>
         <th>Authors</th>
diff --git a/uploader/templates/species/base.html b/uploader/templates/species/base.html
index a7c1a8f..3be79f0 100644
--- a/uploader/templates/species/base.html
+++ b/uploader/templates/species/base.html
@@ -2,9 +2,11 @@
 
 {%block breadcrumbs%}
 {{super()}}
+{%if species%}
 <li class="breadcrumb-item">
   <a href="{{url_for('species.view_species', species_id=species['SpeciesId'])}}">
     {{species["Name"]|title}}
   </a>
 </li>
+{%endif%}
 {%endblock%}