3 $stock_uniquename => undef
7 <& /util/import_javascript.mas, classes => [] &>
9 % if ($stock_type eq 'accession'){
10 <& /breeders_toolbox/add_seedlot_dialogs.mas, accession_uniquename=>$stock_uniquename &>
11 % } elsif ($stock_type eq 'cross'){
12 <& /breeders_toolbox/add_seedlot_dialogs.mas, cross_uniquename=>$stock_uniquename &>
15 <&| /page/info_section.mas, id=>'related_seedlots_to_accessions', title => 'Seedlots of this '.ucfirst($stock_type), collapsible=>1, collapsed=>1, subtitle=>"<button class='btn btn-sm btn-primary' style='margin:3px' name='add_seedlot_button' >Create New Seedlot</button>" &>
16 <div class="well well-sm">
17 <div class="panel panel-default">
18 <div class="panel-body" style="overflow:scroll">
19 <table id="seedlots_of_accession_table" class="table table-hover table-striped">
24 <&| /page/info_section.mas, title => 'Copy Seedlots to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the seedlot names showing in table to a new or exisiting list</i>'&>
26 <div style="text-align:right" id="accession_seedlots_to_list_menu">[LOADING...]</div>
27 <div id="accession_seedlot_names" style="display: none;"></div>
35 jQuery(document).ready(function(){
37 jQuery('#related_seedlots_to_accessions_onswitch').one("click", function(){
39 var seedlots_table = jQuery('#seedlots_of_accession_table').DataTable({
44 'lengthMenu': [10,20,50,100,1000],
45 'ajax': { 'url': '/ajax/breeders/seedlots',
47 % if ($stock_type eq 'accession'){
48 d.contents_accession = "<% $stock_uniquename %>";
49 % } elsif ($stock_type eq 'cross'){
50 d.contents_cross = "<% $stock_uniquename %>";
55 { title: "Seedlot Name", "data": null, "render": function ( data, type, row ) { return "<a href='/breeders/seedlot/"+row.seedlot_stock_id+"'>"+row.seedlot_stock_uniquename+"</a>"; } },
56 { title: "Breeding Program", "data": "breeding_program_name" },
57 { title: "Contents", "data": "contents_html" },
58 { title: "Seedlot Location", "data": "location" },
59 { title: "Count", "data": "count" },
60 { title: "Weight(g)", "data": "weight_gram" },
61 { title: "Box Name", "data": "box" },
62 { title: "Quality", "data": "seedlot_quality" },
63 { title: "", "data": "seedlot_stock_uniquename"}
67 seedlots_table.draw();
68 seedlots_table.column(8).visible(false);
70 jQuery('#seedlots_of_accession_table').on( 'draw.dt', function () {
71 var seedlot_names = seedlots_table.column(8).data();
74 for (var i = 0; i < seedlot_names.length; i++) {
75 names += seedlot_names[i]+'\n';
78 jQuery('#accession_seedlot_names').html(names);
79 addToListMenu('accession_seedlots_to_list_menu', 'accession_seedlot_names', {