Changed trials-in-common page to use a single database query to get analyses. Changed...
[sgn.git] / mason / breeders_toolbox / cross / intercross_file_info.mas
blob91417f3c55584d00e616c0a605ec1b609755b3a2
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 class="panel panel-default">
9     <div class="panel-body">
10         <&| /page/info_section.mas, title=>"Downloaded Intercross Files (Parents and Wishlist Files)", is_subsection => 1, collapsible=>1, collapsed=>1 &>
11             <table class="table table-hover table-bordered" id="downloaded_intercross_files_table">
12             </table>
13         </&>
14     </div>
15 </div>
16 <div class="panel panel-default">
17     <div class="panel-body">
18         <&| /page/info_section.mas, title=>"Uploaded Intercross Files", is_subsection => 1, collapsible=>1, collapsed=>1 &>
19             <table class="table table-hover table-bordered" id="uploaded_intercross_files_table">
20             </table>
21         </&>
22     </div>
23 </div>
26 <script>
28 jQuery(document).ready(function(){
30 jQuery('#intercross_section_onswitch').click(function(){
32     jQuery('#downloaded_intercross_files_table').DataTable({
33         'autoWidth': false,
34         'destroy': true,
35         'ajax': { 'url': '/ajax/breeders/trial/<% $trial_id %>/downloaded_intercross_file_metadata' },
36         columns: [
37             { title: "Filename", "data": null, "render": function ( data, type, row ) { return row[4]; } },
38             { title: "Create Date", "data": null, "render": function ( data, type, row ) { return row[1]; } },
39             { title: "Created By", "data": null, "render": function ( data, type, row ) { return '<a href="/solpeople/profile/'+row[2]+'">'+row[3]+'</a>'; } },
40             { title: "File Type", "data": null, "render": function ( data, type, row ) { return row[6]; } },
41             { title: "Options", "data": null, "render": function ( data, type, row ) { return '<a href="/breeders/phenotyping/view/'+row[0]+'">View</a> | <a href="/breeders/phenotyping/download/'+row[0]+'">Download</a>'; } },
42         ]
43     });
45     jQuery('#uploaded_intercross_files_table').DataTable({
46         'autoWidth': false,
47         'destroy': true,
48         'ajax': { 'url': '/ajax/breeders/trial/<% $trial_id %>/uploaded_intercross_file_metadata' },
49         columns: [
50             { title: "Filename", "data": null, "render": function ( data, type, row ) { return row[4]; } },
51             { title: "Create Date", "data": null, "render": function ( data, type, row ) { return row[1]; } },
52             { title: "Created By", "data": null, "render": function ( data, type, row ) { return '<a href="/solpeople/profile/'+row[2]+'">'+row[3]+'</a>'; } },
53             { title: "File Type", "data": null, "render": function ( data, type, row ) { return row[6]; } },
54             { title: "Options", "data": null, "render": function ( data, type, row ) { return '<a href="/breeders/phenotyping/view/'+row[0]+'">View</a> | <a href="/breeders/phenotyping/download/'+row[0]+'">Download</a>'; } },
55         ]
56     });
59 });
62 });
64 </script>