aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/collections/view_anonymous.html
blob: 16d792e8b6414ee2897f1d3819d5711da3551674 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{% extends "index_page.html" %}
{% block title %}View Collection{% endblock %}
{% block content %}
<!-- Start of body -->
    {% if uc %}
        {{ header(uc.name,
            'This collection has {}.'.format(numify(trait_obs|count, "record", "records"))) }}
    {% else %}
        {{ header('Your Collection',
            'This collection has {}.'.format(numify(trait_obs|count, "record", "records"))) }}
    {% endif %}
    <div class="container">
        <div class="page-header">
            <h1>Your Collection</h1>
            {% if uc %}
            <h2>{{ uc.name }}</h2>
            {% endif %}

            <div class="form-group">
            <form action="/collections/delete" method="post">
                {% if uc %}
                <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
                {% endif %}
                <div class="col-xs-3 controls">
                    <input type="submit" class="btn btn-danger" value="Delete this collection" />
                </div>
            </form>
            <form action="/corr_matrix" method="post">
                {% if uc %}
                <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
                {% endif %}
                <input type="hidden" name="trait_list" id="trait_list" value= "
                {% for this_trait in trait_obs %}
                    {{ this_trait.name }}:{{ this_trait.dataset.name }},
                {% endfor %}" >
                <div class="col-xs-2 controls">
                    <input type="submit" class="btn btn-primary" value="Correlation Matrix" />
                </div>
            </form>
            <form action="/heatmap" method="post">
                {% if uc %}
                <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
                {% endif %}
                <input type="hidden" name="trait_list" id="trait_list" value= "
                {% for this_trait in trait_obs %}
                    {{ this_trait.name }}:{{ this_trait.dataset.name }},
                {% endfor %}" >
                <div class="col-xs-2 controls">
                    <input type="submit" class="btn btn-primary" value="Heatmap" />
                </div>
            </form>
            </div>

            <!--
            <form action="/corr_matrix" method="post">
                {% if uc %}
                <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
                {% endif %}
                <input type="hidden" name="trait_list" id="trait_list" value= "
                {% for this_trait in trait_obs %}
                    {{ this_trait.name }}:{{ this_trait.dataset.name }},
                {% endfor %}" >
                <input type="submit"
                       class="btn btn-small"
                       value="Correlation Matrix" />
            </form>
            <form action="/heatmap" method="post">
                {% if uc %}
                <input type="hidden" name="uc_id" id="uc_id" value="{{ uc.id }}" />
                {% endif %}
                <input type="hidden" name="trait_list" id="trait_list" value= "
                {% for this_trait in trait_obs %}
                    {{ this_trait.name }}:{{ this_trait.dataset.name }},
                {% endfor %}" >
                <input type="submit"
                       class="btn btn-small"
                       value="Heatmap" />
            </form>
            -->
        </div>



        <div class="bs-docs-example">
        <table class="table table-hover" id='trait_table'>
            <thead>
                <tr>
                    <th></th>
                    <th>Record</th>
                    <th>Description</th>
                    <th>Location</th>
                    <th>Mean</th>
                    <th>Max LRS</th>
                    <th>Max LRS Location</th>
                </tr>
            </thead>

            <tbody>
                {% for this_trait in trait_obs %}
                <TR id="trait:{{ this_trait.name }}:{{ this_trait.dataset.name }}">
                    <TD>
                        <INPUT TYPE="checkbox" NAME="searchResult" class="checkbox trait_checkbox"
                               VALUE="{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }}">
                    </TD>
                    <TD>
                        <a href="{{ url_for('show_trait_page',
                                trait_id = this_trait.name,
                                dataset = this_trait.dataset.name
                                )}}">
                            {{ this_trait.name }}
                        </a>
                    </TD>

                    <TD>{{ this_trait.description_display }}</TD>
                    <TD>{{ this_trait.location_repr }}</TD>
                    <TD>{{ this_trait.mean }}</TD>
                    <TD>{{ this_trait.LRS_score_repr }}</TD>
                    <TD>{{ this_trait.LRS_location_repr }}</TD>

                </TR>
            {% endfor %}
            </tbody>

        </table>

        <br />

        <button class="btn" id="select_all"><i class="icon-ok"></i> Select All</button>
        <button class="btn" id="deselect_all"><i class="icon-remove"></i> Deselect All</button>
        <button class="btn" id="invert"><i class="icon-resize-vertical"></i> Invert</button>
        <button class="btn" id="add" disabled="disabled"><i class="icon-plus-sign"></i> Add Record to Other Collection</button>
        <button class="btn" id="remove" disabled="disabled"><i class="icon-minus-sign"></i> Remove Record</button>
        <button class="btn btn-primary pull-right"><i class="icon-download icon-white"></i> Download Table</button>
        </div>
    </div>

<!-- End of body -->

{% endblock %}

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