Changed trials-in-common page to use a single database query to get analyses. Changed...
[sgn.git] / mason / breeders_toolbox / cross / cross_properties_crossingtrial.mas
blob0f5503d3286ea7c0d0e983e0bc715d660c2ae97b
1 <%args>
2 $trial_id
3 </%args>
5 <& /util/import_javascript.mas, classes => [ 'jquery', 'jquery.dataTables' ] &>
6 <& /util/import_css.mas, paths => ['/documents/inc/datatables/jquery.dataTables.css'] &>
8 <div style="overflow:scroll">
9     <table class="table table-hover table-bordered" id="cross_properties_crossingtrial_table">
10         <thead>
11             <tr>
12                 <th>Cross Unique ID</th>
13                 <th>Cross Combination</th>
14 % my $cross_properties = $c->config->{cross_properties};
15 % my @column_header = split ',',$cross_properties;
16 % foreach my $column_header(@column_header){
17                 <th><%$column_header%></th>
19             </tr>
20         </thead>
21     </table>
22 </div>
25 <script>
27 jQuery(document).ready(function(){
29     jQuery('#cross_properties_crossingtrial_section_onswitch').click(function(){
30         jQuery('#cross_properties_crossingtrial_table').DataTable({
31             'destroy': true,
32             'ajax':'/ajax/breeders/trial/'+ <% $trial_id %> + '/cross_properties_trial',
33         });
34     });
36 });
38 </script>