4 $stock_uniquename => undef
8 % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){
10 <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trials', collapsible=>1, collapsed=>1 &>
11 <div class="well well-sm">
12 <div class="panel panel-default">
13 <div class="panel-body">
14 <table id = "trial_related_stock" class="table table-hover table-striped">
26 <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the stock names showing in table to a new or exisiting list</i>'&>
28 <div style="text-align:right" id="trial_stocks_to_list_menu"></div>
29 <div id="trial_stock_names" style="display: none;"></div>
36 % if ($stock_type eq 'accession'){
38 <& /breeders_toolbox/seedlots_section.mas, stock_id=>$stock_id, stock_type=>$stock_type, stock_uniquename=>$stock_uniquename &>
42 % if ($stock_type eq 'accession'){
44 <&| /page/info_section.mas, id=>'related_stock_progenies', title => 'Progenies of this Accession (as female or male parent)', collapsible=>1, collapsed=>1 &>
45 <div class="well well-sm">
46 <div class="panel panel-default">
47 <div class="panel-body">
48 <table id = "progenies" class="table table-hover table-striped">
51 <th>As female or male parent</th>
60 <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the stock names showing in table to a new or exisiting list</i>'&>
62 <div style="text-align:right" id="progenies_to_list_menu"></div>
63 <div id="progeny_names" style="display: none;"></div>
70 % if ($stock_type eq 'accession' || $stock_type eq 'backcross population' || $stock_type eq 'f2 population' || $stock_type eq 'mutant population' || $stock_type eq 'population' || $stock_type eq 'training population'){
72 <&| /page/info_section.mas, id=>'related_stock_groups', title => 'Groups / members', collapsible=>1, collapsed=>1 &>
73 <div class="well well-sm">
74 <div class="panel panel-default">
75 <div class="panel-body">
76 <table id = "group" class="table table-hover table-striped">
88 <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the stock names showing in table to a new or exisiting list</i>'&>
90 <div style="text-align:right" id="groups_and_members_to_list_menu"></div>
91 <div id="group_and_member_names" style="display: none;"></div>
98 % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){
100 <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related stocks for tissue sample', collapsible=>1, collapsed=>1 &>
101 <div class="well well-sm">
102 <div class="panel panel-default">
103 <div class="panel-body">
104 <table id = "tissue_sample" class="table table-hover table-striped">
116 <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the stock names showing in table to a new or exisiting list</i>'&>
118 <div style="text-align:right" id="tissue_samples_to_list_menu"></div>
119 <div id="tissue_sample_names" style="display: none;"></div>
128 jQuery(document).ready(function(){
131 jQuery('#related_stocks_in_trial_onswitch').one("click", function(){
132 var trial_stock_table = jQuery('#trial_related_stock').DataTable({
133 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/trial_related_stock',
134 "fnInitComplete": function(oSettings, json) {
137 jQuery('#trial_stocks_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
140 for(var i=0; i<json.data.length; i++){
141 html += json.data[i][2]+"\n";
143 jQuery("#trial_stock_names").html(html);
144 addToListMenu("trial_stocks_to_list_menu", "trial_stock_names", {
153 jQuery('#related_stock_progenies_onswitch').one("click", function(){
154 var progeny_table = jQuery('#progenies').DataTable({
156 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/progenies',
157 "fnInitComplete": function(oSettings, json) {
160 jQuery('#progenies_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
163 for(var i=0; i<json.data.length; i++){
164 html += json.data[i][2]+"\n";
166 jQuery("#progeny_names").html(html);
167 addToListMenu("progenies_to_list_menu", "progeny_names", {
169 listType:'accessions'
176 jQuery('#related_stock_groups_onswitch').one("click", function(){
177 var group_and_member_table = jQuery('#group').DataTable({
178 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/group_and_member',
179 "fnInitComplete": function(oSettings, json) {
182 jQuery('#groups_and_members_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
185 for(var i=0; i<json.data.length; i++){
186 html += json.data[i][2]+"\n";
188 jQuery("#group_and_member_names").html(html);
189 addToListMenu("groups_and_members_to_list_menu", "group_and_member_names", {
198 jQuery('#related_stock_tissues_onswitch').one("click", function(){
199 var tissue_sample_table = jQuery('#tissue_sample').DataTable({
200 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/stock_for_tissue',
201 "fnInitComplete": function(oSettings, json) {
204 jQuery('#tissue_samples_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
207 for(var i=0; i<json.data.length; i++){
208 html += json.data[i][2]+"\n";
210 jQuery("#tissue_sample_names").html(html);
211 addToListMenu("tissue_samples_to_list_menu", "tissue_sample_names", {