aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/oauth2/data-list-mrna.html
blob: 728e95d41f772f754bcc8902260779fca70d434f (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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{%extends "base.html"%}
{%from "oauth2/profile_nav.html" import profile_nav%}
{%from "oauth2/display_error.html" import display_error%}

{%block title%}Link Data: Genotype{%endblock%}

{%block css%}
<link rel="stylesheet" type="text/css"
      href="/css/DataTables/css/jquery.dataTables.css" />
<link rel="stylesheet" type="text/css"
      href="{{ url_for('css', filename='jquery-ui/jquery-ui.theme.css') }}" />
<link rel="stylesheet" type="text/css" href="/static/new/css/show_trait.css" />
{%endblock%}

{%block content%}
<div class="container" style="width: 98%;">
  {{profile_nav("data", user_privileges)}}

  {{flash_me()}}

  <div class="row">
    <noscript>This page needs javascript to work correctly</noscript>
  </div>

  <div class="row">
    <form id="frm-link" method="POST"
	  action="{{url_for('oauth2.data.link_mrna_data')}}">
      <legend>Link mRNA Assay Datasets to Group</legend>

      <input type="hidden" name="species_name" value="{{species_name}}" />

      <div class="form-group">
	<label for="select-group">Group</label>
	<select id="select-group" name="group_id" required="required"
		class="form-control">
	  <option value="">Select group</option>
	  {%for group in groups%}
	  <option value="{{group.group_id}}">{{group.group_name}}</option>
	  {%endfor%}
	</select>
      </div>

      <div class="form-group">
      <table id="tbl-link"
	     class="table-hover table-striped cell-border dataTable no-footer"
	     data-datasets='{{selected_datasets | list | tojson}}'>
	<thead>
	  <tr>
	    <th>Deselect</th>
	    <th>Group</th>
	    <th>Dataset Name</th>
	    <th>Dataset FullName</th>
	    <th>Dataset ShortName</th>
	  </tr>
	</thead>
	<tbody>
	  {%for dataset in selected_datasets%}
	  <tr>
	    <td>
	      <input type="checkbox" class="checkbox checkbox-selected"
		     name="selected"
		     value='{{dataset | tojson}}' />
	    </td>
	    <td>{{dataset.dataset_name}}</td>
	    <td>{{dataset.dataset_fullname}}</td>
	    <td>{{dataset.dataset_shortname}}</td>
	  </tr>
	  {%else%}
	  <tr>
	    <td colspan="100%" align="center">
	      <span class="glyphicon glyphicon-info-sign text-info"></span>
	      &nbsp
	      No datasets selected for linking.
	    </td>
	  </tr>
	  {%endfor%}
	</tbody>
      </table>
      </div>

      <div class="form-group text-center">
	<input type="submit" value="Link Selected"
	       class="btn btn-primary"
	       style="border-top: 0.3em;"
	       {%if groups | length <= 0 or selected_datasets | length <= 0%}
	       disabled="disabled"
	       {%endif%} />
      </div>
    </form>
  </div>

  <div class="row">
    <span id="search-messages" class="alert-danger" style="display:none"></span>
    <form id="frm-search"
	  action="{{search_uri}}"
	  method="POST">
      <legend>Search: mRNA Assay</legend>
      <input type="hidden" value="{{species_name}}" name="species"
	     id="txt-species-name" />
      <input type="hidden" value="{{dataset_type}}" name="dataset_type"
	     id="txt-dataset-type"  />
      <input type="hidden" value="{{per_page}}" name="per_page"
	     id="txt-per-page"  />

      <div class="form-group">
	<label for="txt-query">Dataset Search String</label>
	<input type="text" id="txt-query" name="query" class="form-control"
	       value="{{query}}"/>
      </div>
    </form>
  </div>

  <div class="row">
    <div id="search-error" class="text-danger" style="display: none;">
      <span class="glyphicon glyphicon-exclamation-sign"></span>
      &nbsp
      <span id="search-error-text"></span>
    </div>
    <table id="tbl-search"
	   class="table-hover table-striped cell-border dataTable no-footer"
	   data-datasets='{{datasets | list | tojson}}'>
      <thead>
	<tr>
	  <th>Select</th>
	  <th>Group</th>
	  <th>Study Name</th>
	  <th>Dataset Name</th>
	  <th>Dataset FullName</th>
	  <th>Dataset ShortName</th>
	</tr>
      </thead>
      <tbody>
	{%for dataset in datasets:%}
	<tr>
	  <td>
	    <input type="checkbox" class="checkbox checkbox-search"
		   name="search_datasets"
		   value='{{dataset | tojson}}' />
	  </td>
	  <td>{{dataset.InbredSetName}}</td>
	  <td>{{dataset.StudyName}}</td>
	  <td>{{dataset.dataset_name}}</td>
	  <td>{{dataset.dataset_fullname}}</td>
	  <td>{{dataset.dataset_shortname}}</td>
	</tr>
        {%else%}
	<tr>
	  <td colspan="100%" align="center">
	      <span class="glyphicon glyphicon-info-sign text-info"></span>
	      &nbsp
	      No datasets available for selection.
	  </td>
	</tr>
	{%endfor%}
      </tbody>
    </table>
  </div>


</div>
{%endblock%}

{%block js%}
<script src="/static/new/javascript/auth/search.js"
	language="javascript" type="text/javascript"></script>
<script src="/static/new/javascript/auth/search_mrna.js"
	language="javascript" type="text/javascript"></script>
{%endblock%}