aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/samples/upload-samples.html
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/samples/upload-samples.html')
-rw-r--r--uploader/templates/samples/upload-samples.html99
1 files changed, 46 insertions, 53 deletions
diff --git a/uploader/templates/samples/upload-samples.html b/uploader/templates/samples/upload-samples.html
index 25d3290..1f665a3 100644
--- a/uploader/templates/samples/upload-samples.html
+++ b/uploader/templates/samples/upload-samples.html
@@ -1,21 +1,16 @@
{%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 — Upload Samples{%endblock%}
-{%block pagetitle%}Samples — Upload Samples{%endblock%}
-
-{%block lvl4_breadcrumbs%}
-<li {%if activelink=="uploade-samples"%}
- class="breadcrumb-item active"
- {%else%}
- class="breadcrumb-item"
- {%endif%}>
+{%block breadcrumbs%}
+{{super()}}
+<li class="breadcrumb-item">
<a href="{{url_for('species.populations.samples.upload_samples',
- species_id=species.SpeciesId,
- population_id=population.Id)}}">List</a>
+ species_id=species['SpeciesId'],
+ population_id=population.Id)}}">
+ Upload
+ </a>
</li>
{%endblock%}
@@ -23,35 +18,6 @@
{{flash_all_messages()}}
<div class="row">
- <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>
- <dd>The primary name/identifier for the sample/individual.</dd>
-
- <dt>Name2</dt>
- <dd>A secondary name for the sample. This can simply be the same as
- <strong>Name</strong> above. This field <strong>MUST</strong> contain a
- value.</dd>
-
- <dt>Symbol</dt>
- <dd>A symbol for the sample. This can be a strain name, e.g. 'BXD60' for
- species that have strains. This field can be left empty for species like
- Humans that do not have strains..</dd>
-
- <dt>Alias</dt>
- <dd>An alias for the sample. Can be an empty field, or take on the same
- value as that of the Symbol.</dd>
- </dl>
- </p>
-</div>
-
-<div class="row">
<form id="form-samples"
method="POST"
action="{{url_for('species.populations.samples.upload_samples',
@@ -65,14 +31,17 @@
<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"
+ <input type="file" name="samples_file" id="file-samples"
+ accept="text/csv, text/tab-separated-values, text/plain"
class="form-control" />
+ <small class="form-text text-muted">
+ See the <a href="#docs-samples-upload">documentation below</a> for
+ details on expected file format.</small>
</div>
<div class="form-group">
- <label for="select:separator" class="form-label">field separator</label>
- <select id="select:separator"
+ <label for="select-separator" class="form-label">field separator</label>
+ <select id="select-separator"
name="separator"
required="required"
class="form-control">
@@ -83,7 +52,7 @@
<option value=";">Semicolon</option>
<option value="other">Other</option>
</select>
- <input id="txt:separator"
+ <input id="txt-separator"
type="text"
name="other_separator"
class="form-control" />
@@ -95,11 +64,11 @@
</div>
<div class="form-group form-check">
- <input id="chk:heading"
+ <input id="chk-heading"
type="checkbox"
name="first_line_heading"
class="form-check-input" />
- <label for="chk:heading" class="form-check-label">
+ <label for="chk-heading" class="form-check-label">
first line is a heading?</label>
<small class="form-text text-muted">
Select this if the first line in your file contains headings for the
@@ -108,8 +77,8 @@
</div>
<div class="form-group">
- <label for="txt:delimiter" class="form-label">field delimiter</label>
- <input id="txt:delimiter"
+ <label for="txt-delimiter" class="form-label">field delimiter</label>
+ <input id="txt-delimiter"
type="text"
name="field_delimiter"
maxlength="1"
@@ -149,10 +118,34 @@
</tbody>
</table>
</div>
-{%endblock%}
-{%block sidebarcontents%}
-{{display_population_card(species, population)}}
+
+
+<div class="row" id="docs-samples-upload">
+ <h3 class="subheading">File Format</h3>
+ <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>
+ <dd>The primary name/identifier for the sample/individual.</dd>
+
+ <dt>Name2</dt>
+ <dd>A secondary name for the sample. This can simply be the same as
+ <strong>Name</strong> above. This field <strong>MUST</strong> contain a
+ value.</dd>
+
+ <dt>Symbol</dt>
+ <dd>A symbol for the sample. This can be a strain name, e.g. 'BXD60' for
+ species that have strains. This field can be left empty for species like
+ Humans that do not have strains..</dd>
+
+ <dt>Alias</dt>
+ <dd>An alias for the sample. Can be an empty field, or take on the same
+ value as that of the Symbol.</dd>
+ </dl>
+ </p>
+</div>
{%endblock%}
{%block javascript%}