upload fieldbook from manage phenotyping
[sgn.git] / mason / breeders_toolbox / breeder_search.mas
blobdb045abb4b8d7900bc4e2c8758d1da5d9c20391d
2 <%args>
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 style="margin-bottom:5;display:inline-block;" class="form-group form-group-sm" id="paste_list"></div>
13   <p style="margin: 0; padding: 0;" align="center"><i>or</i></p>
14 </td>
15 <td id ="list_message">
16 </td>
17 <td></td>
18 <td id="wizard_refresh"></td>
19 </tr>
20 <tr>
21 <td>
22   <select class="form-control input-sm" id="select1" name="1"></select>
23 </td>
24 <td>
25   <select style="vertical-align:text-bottom;" class="form-control input-sm" id="select2" name="2"></select>
26 </td>
27 <td>
28   <select class="form-control input-sm" id="select3" name="3"></select>
29 </td>
30 <td>
31   <select class="form-control input-sm" id="select4" name="4"></select>
32 </td>
33 </tr>
34 <tr>
35 <td >
36   <select multiple class="form-control" id="c1_data" name="1" size="10" style="min-width: 200px;overflow:auto;"></select>
37 </td>
38 <td>
39   <select multiple class="form-control" id="c2_data" name="2" size="10" style="min-width: 200px;overflow:auto;"></select>
40 </td>
41 <td>
42   <select multiple class="form-control" id="c3_data" name="3" size="10" style="min-width: 200px;overflow:auto;"></select>
43 </td>
44 <td>
45   <select multiple class="form-control" id="c4_data" name="4" size="10" style="min-width: 200px;overflow:auto;"></select>
46 </td>
47 </tr>
48 <tr>
49 <td>
50 <button class="btn btn-default btn-sm" id="c1_select_all" name="1"/>Select All</button>
51 <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>
52 <hr style="margin-top:4px;margin-bottom:4px" />
53 <div class="well well-sm"><div id="c1_data_count" name="1">No Selection</div></div>
54 <div id="c1_to_list_menu"></div>
55 </td>
56 <td>
57 <button class="btn btn-default btn-sm" id="c2_select_all" name="2"/>Select All</button>
58 <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>
59 <hr style="margin-top:4px;margin-bottom:4px" />
60 <div class="well well-sm"><div id="c2_data_count" name="2">No Selection</div></div>
61 <div id="c2_to_list_menu"></div>
62 </td>
63 <td>
64 <button class="btn btn-default btn-sm" id="c3_select_all" name="3"/>Select All</button>
65 <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>
66 <hr style="margin-top:4px;margin-bottom:4px" />
67 <div class="well well-sm"><div id="c3_data_count" name="3">No Selection</div></div>
68 <div id="c3_to_list_menu"></div>
69 </td>
70 <td>
71 <button class="btn btn-default btn-sm" id="c4_select_all" name="4"/>Select All</button>
72 <hr style="margin-top:4px;margin-bottom:4px" />
73 <div class="well well-sm"><div id="c4_data_count" name="4">No Selection</div></div>
74 <div id="c4_to_list_menu"></div>
75 </td></tr>
76 </table>
78 <div class="modal fade" id="update_wizard_dialog" name="update_wizard_dialog" tabindex="-1" role="dialog" aria-labelledby="updateWizardDialog">
79   <div class="modal-dialog" role="document">
80     <div class="modal-content">
81       <div class="modal-header">
82         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
83         <h3 class="modal-title" id="updateWizardDialog">Update Search Wizard</h3>
84       </div>
85       <div class="modal-body">
86         <div class="container-fluid">
87              <h4>How the wizard works</h4>
88                      <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>
89         <div><h4>Current status:</h4><p id="wizard_status"></p></div>
90         </div>
91       </div>
92       <div class="modal-footer">
93         <div id="update_wizard_error"></div>
94         <p id="update_wizard"></p>
95         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
96       </div>
97     </div>
98   </div>
99 </div>
101 <style>
102 .borderless tbody tr td, .borderless tbody tr th, .borderless thead tr th {
103     border: none;
105 </style>
107 <script>
108 jQuery(document).ready(function() {
110     initialize_first_select();
111     jQuery('select').mouseenter(function() {this.tooltip});
113     if (!isLoggedIn()) {
114       create_list_start('Login to start from a list');
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');
125       jQuery('#paste_list').after('<button type="button" id="refresh_lists" class="btn btn-default" title="Refresh lists" style="margin-bottom:5;display:inline-block;"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>');
127       add_data_refresh();
128     }
129     addToggleIds();
131 </script>