aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/phenotypes/view-dataset.html
blob: b136bb63f4fd71ac5e1a4c14991986094f381ba5 (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
93
94
95
96
{%extends "phenotypes/base.html"%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "macro-table-pagination.html" import table_pagination%}
{%from "populations/macro-display-population-card.html" import display_population_card%}

{%block title%}Phenotypes{%endblock%}

{%block pagetitle%}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 Datasets</a>
</li>
{%endblock%}

{%block contents%}
{{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>

    <tbody>
      <tr>
        <td>{{dataset.Name}}</td>
        <td>{{dataset.FullName}}</td>
        <td>{{dataset.ShortName}}</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="row">
  <p><a href="{{url_for('species.populations.phenotypes.add_phenotypes',
              species_id=species.SpeciesId,
              population_id=population.Id,
              dataset_id=dataset.Id)}}"
        title="Add a bunch of phenotypes"
        class="btn btn-primary">Add phenotypes</a></p>
</div>

<div class="row">
  <h2>Phenotype Data</h2>

  <p>This dataset has a total of {{phenotype_count}} phenotypes.</p>

  {{table_pagination(start_from, count, phenotype_count, url_for('species.populations.phenotypes.view_dataset', species_id=species.SpeciesId, population_id=population.Id, dataset_id=dataset.Id), "phenotypes")}}

  <table class="table">
    <thead>
      <tr>
        <th>#</th>
        <th>Record</th>
        <th>Description</th>
      </tr>
    </thead>

    <tbody>
      {%for pheno in phenotypes%}
      <tr>
        <td>{{pheno.sequence_number}}</td>
        <td><a href="{{url_for('species.populations.phenotypes.view_phenotype',
                     species_id=species.SpeciesId,
                     population_id=population.Id,
                     dataset_id=dataset.Id,
                     xref_id=pheno['pxr.Id'])}}"
               title="View phenotype details">
            {{pheno.InbredSetCode}}_{{pheno["pxr.Id"]}}</a></td>
        <td>{{pheno.Post_publication_description or pheno.Pre_publication_abbreviation or pheno.Original_description}}</td>
      </tr>
      {%else%}
      <tr><td colspan="5"></td></tr>
      {%endfor%}
    </tbody>
  </table>
</div>
{%endblock%}

{%block sidebarcontents%}
{{display_population_card(species, population)}}
{%endblock%}