about summary refs log tree commit diff
path: root/uploader/templates/species/sui-view-species.html
blob: c7ac956d5ac87aabcc40e3f66fec232845acaaa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{%extends "species/sui-base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "macro-forms.html" import add_http_feature_flags%}
{%from "macro-step-indicator.html" import step_indicator%}
{%from "species/macro-display-species-card.html" import display_sui_species_card%}

{%block title%}View Species{%endblock%}


{%block contents%}
<div class="row">
  <h2>{{step_indicator("2(a)")}} Select the Population</h2>

  <p>Data belonging to a particular species is further divided into one or more
    populations for easier handling. Please select the population you want to work
    with.</p>

  <form method="GET"
        action="{{url_for('species.view_species', species_id=species.SpeciesId)}}"
        class="form-horizontal">
    <input type="hidden" name="streamlined_ui" value="{{streamlined_ui}}" />
    {%if populations | length != 0%}

    <p class="form-text">Search for, and select the population from the table
      below.</p>

    <div style="margin-top:3em;">
      <table id="tbl-select-population" class="table compact stripe"
             data-populations-list='{{populations | tojson}}'>
        <thead>
          <tr>
            <th></th>
            <th>Population</th>
          </tr>
        </thead>

        <tbody></tbody>
      </table>
    </div>

    {%else%}
    <p class="form-text">
      There are no populations currently defined for {{species['FullName']}}
      ({{species['SpeciesName']}}).</p>
    {%endif%}

    <div class="row form-buttons">
      <div class="col">
        <input type="submit"
               value="use selected population"
               class="btn btn-primary" />
      </div>

      <div class="col"><strong>OR</strong></div>

      <div class="col">
        <a href="url_for('species.population.create_population',
                 species_id=species.SpeciesId,
                 return_to='species.view_species',
                 streamlined_ui=streamlined_ui)"
           title="Create a new population for species '{{species.Name}}'."
           class="btn btn-outline-info">
          Create a new population
        </a>
      </div>
    </div>

  </form>
</div>

<div class="row">&nbsp;</div>

<div class="row">
  <h2>{{step_indicator("2(b)")}} Manage sequencing platforms</h2>
  <p>Upload and manage the sequencing platforms for species
    '{{species.Name | title}} ({{species.FullName}})'
    <a href="{{url_for('species.platforms.list_platforms',
             species_id=species.SpeciesId,
             streamlined_ui=streamlined_ui)}}"
       title="Manage sequencing platforms for {{species.Name}}">here</a>.
  </p>
</div>
{%endblock%}

{%block sidebarcontents%}
{{display_sui_species_card(species)}}
{%endblock%}


{%block javascript%}
<script type="text/javascript" src="/static/js/populations.js"></script>
{%endblock%}