diff options
Diffstat (limited to 'uploader/templates/samples')
| -rw-r--r-- | uploader/templates/samples/base.html | 29 | ||||
| -rw-r--r-- | uploader/templates/samples/list-samples.html | 72 | ||||
| -rw-r--r-- | uploader/templates/samples/upload-failure.html | 5 | ||||
| -rw-r--r-- | uploader/templates/samples/upload-progress.html | 5 | ||||
| -rw-r--r-- | uploader/templates/samples/upload-samples.html | 99 | ||||
| -rw-r--r-- | uploader/templates/samples/upload-success.html | 5 |
6 files changed, 86 insertions, 129 deletions
diff --git a/uploader/templates/samples/base.html b/uploader/templates/samples/base.html index 291782b..7fd5020 100644 --- a/uploader/templates/samples/base.html +++ b/uploader/templates/samples/base.html @@ -1,12 +1,25 @@ {%extends "populations/base.html"%} +{%from "populations/macro-display-population-card.html" import display_sui_population_card%} -{%block lvl3_breadcrumbs%} -<li {%if activelink=="samples"%} - class="breadcrumb-item active" - {%else%} - class="breadcrumb-item" - {%endif%}> - <a href="{{url_for('species.populations.samples.index')}}">Samples</a> +{%block breadcrumbs%} +{{super()}} +<li class="breadcrumb-item"> + <a href="{{url_for('species.populations.samples.list_samples', + species_id=species['SpeciesId'], + population_id=population.Id)}}"> + Samples + </a> </li> -{%block lvl4_breadcrumbs%}{%endblock%} +{%endblock%} + +{%block contents%} +<div class="row"> + <h2 class="heading">{{population.FullName}} ({{population.Name}})</h2> +</div> +{%endblock%} + + + +{%block sidebarcontents%} +{{display_sui_population_card(species, population)}} {%endblock%} diff --git a/uploader/templates/samples/list-samples.html b/uploader/templates/samples/list-samples.html index 185e784..3aac984 100644 --- a/uploader/templates/samples/list-samples.html +++ b/uploader/templates/samples/list-samples.html @@ -1,40 +1,34 @@ {%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 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%} - {%block contents%} -{{flash_all_messages()}} +{{super()}} <div class="row"> - <p> - You selected the population "{{population.FullName}}" from the - "{{species.FullName}}" species. - </p> + <h3 class="subheading">manage samples</h3> + {{flash_all_messages()}} +</div> + +<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> - 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. + 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> @@ -93,40 +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> </div> - {%else%} - <div class="row"> - <p> - There are no samples entered for this population. Do please go ahead and add - the samples for this population by clicking on the button below. - </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> + <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%} -{{display_population_card(species, population)}} -{%endblock%} diff --git a/uploader/templates/samples/upload-failure.html b/uploader/templates/samples/upload-failure.html index 2cf8053..75192ec 100644 --- a/uploader/templates/samples/upload-failure.html +++ b/uploader/templates/samples/upload-failure.html @@ -1,6 +1,5 @@ {%extends "base.html"%} {%from "cli-output.html" import cli_output%} -{%from "populations/macro-display-population-card.html" import display_population_card%} {%block title%}Samples Upload Failure{%endblock%} @@ -31,7 +30,3 @@ {{cli_output(job, "stderr")}} </div> {%endblock%} - -{%block sidebarcontents%} -{{display_population_card(species, population)}} -{%endblock%} diff --git a/uploader/templates/samples/upload-progress.html b/uploader/templates/samples/upload-progress.html index 677d457..38f931b 100644 --- a/uploader/templates/samples/upload-progress.html +++ b/uploader/templates/samples/upload-progress.html @@ -1,6 +1,5 @@ {%extends "samples/base.html"%} {%from "cli-output.html" import cli_output%} -{%from "populations/macro-display-population-card.html" import display_population_card%} {%block extrameta%} <meta http-equiv="refresh" content="5"> @@ -25,7 +24,3 @@ </div> {%endblock%} - -{%block sidebarcontents%} -{{display_population_card(species, population)}} -{%endblock%} 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%} diff --git a/uploader/templates/samples/upload-success.html b/uploader/templates/samples/upload-success.html index 881d466..d6318e9 100644 --- a/uploader/templates/samples/upload-success.html +++ b/uploader/templates/samples/upload-success.html @@ -1,6 +1,5 @@ {%extends "samples/base.html"%} {%from "cli-output.html" import cli_output%} -{%from "populations/macro-display-population-card.html" import display_population_card%} {%block title%}Job Status{%endblock%} @@ -30,7 +29,3 @@ </div> {%endblock%} - -{%block sidebarcontents%} -{{display_population_card(species, population)}} -{%endblock%} |
