graphical filtering of accession search
[sgn.git] / mason / breeders_toolbox / breeder_search.mas
blobd87b6802e928e77740fe447a7f1dfb894e468650
2 <%args>
3 $dataset_id => undef;
4 </%args>
6 <& /util/import_javascript.mas, classes => [ 'jqueryui', 'jquery.cookie', 'CXGN.BreederSearch', 'CXGN.List', 'CXGN.BreedersToolbox.HTMLSelect' ] &>
8 <table class="table borderless" alt="breeder search" border="0" >
10 <tr>
11 <td style="white-space:nowrap;">
12   <div class="form-group" id="paste_list"></div>
13   <p style="margin: 0; padding: 0;" align="center"><i>or</i></p>
14 </td>
15 <td></td>
16 <td></td>
17 <td id="wizard_refresh"></td>
18 </tr>
19 <tr>
20 <td>
21   <select class="form-control input-sm" id="select1" name="1"></select>
22 </td>
23 <td>
24   <select style="vertical-align:text-bottom;" class="form-control input-sm" id="select2" name="2"></select>
25 </td>
26 <td>
27   <select class="form-control input-sm" id="select3" name="3"></select>
28 </td>
29 <td>
30   <select class="form-control input-sm" id="select4" name="4"></select>
31 </td>
32 </tr>
33 <tr>
34 <td >
35   <select multiple class="form-control" id="c1_data" name="1" size="10" style="min-width: 200px;overflow:auto;"></select>
36 </td>
37 <td>
38   <select multiple class="form-control" id="c2_data" name="2" size="10" style="min-width: 200px;overflow:auto;"></select>
39 </td>
40 <td>
41   <select multiple class="form-control" id="c3_data" name="3" size="10" style="min-width: 200px;overflow:auto;"></select>
42 </td>
43 <td>
44   <select multiple class="form-control" id="c4_data" name="4" size="10" style="min-width: 200px;overflow:auto;"></select>
45 </td>
46 </tr>
47 <tr>
48 <td>
49 <button class="btn btn-default btn-sm" id="c1_select_all" name="1"/>Select All</button>
50 <div class="pull-right"><input type="checkbox" id="c2_querytype" data-size="small" data-toggle="toggle" data-on="AND (&cap;)" data-off="OR (&cup;)"></div>
51 <hr style="margin-top:4px;margin-bottom:4px" />
52 <div class="well well-sm"><div id="c1_data_count" name="1">No Selection</div></div>
53 <div id="c1_to_list_menu"></div>
54 </td>
55 <td>
56 <button class="btn btn-default btn-sm" id="c2_select_all" name="2"/>Select All</button>
57 <div class="pull-right"><input type="checkbox" id="c3_querytype" data-size="small" data-toggle="toggle" data-on="AND (&cap;)" data-off="OR (&cup;)"></div>
58 <hr style="margin-top:4px;margin-bottom:4px" />
59 <div class="well well-sm"><div id="c2_data_count" name="2">No Selection</div></div>
60 <div id="c2_to_list_menu"></div>
61 </td>
62 <td>
63 <button class="btn btn-default btn-sm" id="c3_select_all" name="3"/>Select All</button>
64 <div class="pull-right"><input type="checkbox" id="c4_querytype" data-size="small" data-toggle="toggle" data-on="AND (&cap;)" data-off="OR (&cup;)"></div>
65 <hr style="margin-top:4px;margin-bottom:4px" />
66 <div class="well well-sm"><div id="c3_data_count" name="3">No Selection</div></div>
67 <div id="c3_to_list_menu"></div>
68 </td>
69 <td>
70 <button class="btn btn-default btn-sm" id="c4_select_all" name="4"/>Select All</button>
71 <hr style="margin-top:4px;margin-bottom:4px" />
72 <div class="well well-sm"><div id="c4_data_count" name="4">No Selection</div></div>
73 <div id="c4_to_list_menu"></div>
74 </td></tr>
75 </table>
77 <div class="modal fade" id="update_wizard_dialog" name="update_wizard_dialog" tabindex="-1" role="dialog" aria-labelledby="updateWizardDialog">
78   <div class="modal-dialog" role="document">
79     <div class="modal-content">
80       <div class="modal-header">
81         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
82         <h3 class="modal-title" id="updateWizardDialog">Update Search Wizard</h3>
83       </div>
84       <div class="modal-body">
85         <div class="container-fluid">
86              <h4>How the wizard works</h4>
87                      <p>For the search wizard to be fast and flexible, it avoids querying the database directly. Instead, it stores a copy of the data from the database in a temporary format that is optimized for the types of queries the wizard makes.</p><p>For this to be practical, the copy must be updated regularly. Updates usually start every time new data is uploaded, however users with submitter status or higher can also initiate them manually.</p><p>If an update isn't already in progress, you can initiate one below. It will run independently on the server without any additional input required from the user. Depending on the size of the database, it will take from a few minutes to a few hours to complete.</p>
88         <div><h4>Current status:</h4><p id="wizard_status"></p></div>
89         </div>
90       </div>
91       <div class="modal-footer">
92         <div id="update_wizard_error"></div>
93         <p id="update_wizard"></p>
94         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
95       </div>
96     </div>
97   </div>
98 </div>
100 <style>
101 .borderless tbody tr td, .borderless tbody tr th, .borderless thead tr th {
102     border: none;
104 </style>
106 <script>
107 jQuery(document).ready(function() {
109     initialize_first_select();
110     jQuery('select').mouseenter(function() {this.tooltip});
112     if (!isLoggedIn()) {
113       create_list_start('Login to start from a list');
114     //   create_dataset_start('Login to start from a dataset');
115       var login_message = '<div class="well well-sm">Login to use lists</div>';
117       jQuery('#c1_to_list_menu').html(login_message);
118       jQuery('#c2_to_list_menu').html(login_message);
119       jQuery('#c3_to_list_menu').html(login_message);
120       jQuery('#c4_to_list_menu').html(login_message);
122     } else {
123       create_list_start('Start from a list');
124       add_data_refresh();
125     }
126     addToggleIds();
128 </script>