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'){
9 <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trial', collapsible=>1, collapsed=>1 &>
10 <div class="well well-sm">
11 <div class="panel panel-default">
12 <div class="panel-body">
13 <table id = "trial_related_stock" class="table table-hover table-striped">
25 <&| /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>'&>
27 <div style="text-align:right" id="trial_stocks_to_list_menu"></div>
28 <div id="trial_stock_names" style="display: none;"></div>
34 % if ($stock_type eq 'plot' || $stock_type eq 'plant'){
35 <&| /page/info_section.mas, id=>'related_seedlots', title => 'Related seedlots', collapsible=>1, collapsed=>1 &>
36 <div class="well well-sm">
37 <div class="panel panel-default">
38 <div class="panel-body">
39 <table id = "plot_plant_related_seedlots" class="table table-hover table-striped">
42 <th>Transaction Type</th>
52 <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the seedlot names showing in table to a new or exisiting list</i>'&>
54 <div style="text-align:right" id="seedlots_to_list_menu"></div>
55 <div id="seedlot_names" style="display: none;"></div>
61 % if ($stock_type eq 'accession') {
62 <& /breeders_toolbox/seedlots_section.mas, stock_id=>$stock_id, stock_type=>$stock_type, stock_uniquename=>$stock_uniquename &>
65 % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot'){
67 <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related tissue samples', collapsible=>1, collapsed=>1 &>
68 <div class="well well-sm">
69 <div class="panel panel-default">
70 <div class="panel-body">
71 <table id = "tissue_sample" class="table table-hover table-striped">
83 <&| /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>'&>
85 <div style="text-align:right" id="tissue_samples_to_list_menu"></div>
86 <div id="tissue_sample_names" style="display: none;"></div>
93 % if ($stock_type eq 'accession'){
95 <&| /page/info_section.mas, id=>'related_stock_progenies', title => 'Progenies of this Accession (as female or male parent)', collapsible=>1, collapsed=>1 &>
96 <div class="well well-sm">
97 <div class="panel panel-default">
98 <div class="panel-body">
99 <table id = "progenies" class="table table-hover table-striped">
102 <th>As female or male parent</th>
104 <th>Progeny name</th>
112 <&| /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>'&>
114 <div style="text-align:right" id="progenies_to_list_menu"></div>
115 <div id="progeny_names" style="display: none;"></div>
121 <&| /page/info_section.mas, id=>'related_stock_parents', title => 'Parents of this Accession', collapsible=>1, collapsed=>1 &>
122 <div class="well well-sm">
123 <div class="panel panel-default">
124 <div class="panel-body">
125 <table id = "parents" class="table table-hover table-striped">
128 <th>Female Parent</th>
143 <&| /page/info_section.mas, id=>'related_stock_siblings', title => 'Siblings of this Accession', collapsible=>1, collapsed=>1 &>
144 <div class="well well-sm">
145 <div class="panel panel-default">
146 <div class="panel-body">
147 <table id = "siblings" class="table table-hover table-striped">
150 <th>Accession Name</th>
151 <th>Female Parent</th>
161 <&| /page/info_section.mas, title => 'Copy siblings to a List', collapsible=>1, collapsed=>1, subtitle=>'<i>Copy the sibling names showing in table to a new or exisiting list</i>'&>
163 <div style="text-align:right" id="siblings_to_list_menu"></div>
164 <div id="sibling_names" style="display: none;"></div>
171 % 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'){
173 <&| /page/info_section.mas, id=>'related_stock_groups', title => 'Groups / members', collapsible=>1, collapsed=>1 &>
174 <div class="well well-sm">
175 <div class="panel panel-default">
176 <div class="panel-body">
177 <table id = "group" class="table table-hover table-striped">
189 <&| /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>'&>
191 <div style="text-align:right" id="groups_and_members_to_list_menu"></div>
192 <div id="group_and_member_names" style="display: none;"></div>
202 jQuery(document).ready(function(){
205 jQuery('#related_stocks_in_trial_onswitch').one("click", function(){
206 var trial_stock_table = jQuery('#trial_related_stock').DataTable({
208 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/trial_related_stock',
209 "fnInitComplete": function(oSettings, json) {
212 jQuery('#trial_stocks_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
215 for(var i=0; i<json.data.length; i++){
216 html += json.data[i][2]+"\n";
218 jQuery("#trial_stock_names").html(html);
219 addToListMenu("trial_stocks_to_list_menu", "trial_stock_names", {
228 jQuery('#related_seedlots_onswitch').one("click", function(){
229 var related_seedlots_table = jQuery('#plot_plant_related_seedlots').DataTable({
231 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/plot_plant_related_seedlots',
232 "fnInitComplete": function(oSettings, json) {
235 jQuery('#seedlots_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
238 for(var i=0; i<json.data.length; i++){
239 html += json.data[i][3]+"\n";
241 jQuery("#seedlot_names").html(html);
242 addToListMenu("seedlots_to_list_menu", "seedlot_names", {
251 jQuery('#related_stock_progenies_onswitch').one("click", function(){
252 var progeny_table = jQuery('#progenies').DataTable({
254 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/progenies',
255 "fnInitComplete": function(oSettings, json) {
258 jQuery('#progenies_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
261 for(var i=0; i<json.data.length; i++){
262 html += json.data[i][3]+"\n";
264 jQuery("#progeny_names").html(html);
265 addToListMenu("progenies_to_list_menu", "progeny_names", {
267 listType:'accessions'
274 jQuery('#related_stock_groups_onswitch').one("click", function(){
275 var group_and_member_table = jQuery('#group').DataTable({
276 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/group_and_member',
277 "fnInitComplete": function(oSettings, json) {
280 jQuery('#groups_and_members_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
283 for(var i=0; i<json.data.length; i++){
284 html += json.data[i][2]+"\n";
286 jQuery("#group_and_member_names").html(html);
287 addToListMenu("groups_and_members_to_list_menu", "group_and_member_names", {
296 jQuery('#related_stock_tissues_onswitch').one("click", function(){
297 var tissue_sample_table = jQuery('#tissue_sample').DataTable({
298 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/stock_for_tissue',
299 "fnInitComplete": function(oSettings, json) {
302 jQuery('#tissue_samples_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
305 for(var i=0; i<json.data.length; i++){
306 html += json.data[i][2]+"\n";
308 jQuery("#tissue_sample_names").html(html);
309 addToListMenu("tissue_samples_to_list_menu", "tissue_sample_names", {
311 listType:'tissue_samples'
319 jQuery('#related_stock_siblings_onswitch').one("click", function(){
320 var siblings_table = jQuery('#siblings').DataTable({
322 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/siblings',
323 "fnInitComplete": function(oSettings, json) {
326 jQuery('#siblings_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
329 for(var i=0; i<json.data.length; i++){
330 html += json.data[i][4]+"\n";
332 jQuery("#sibling_names").html(html);
333 addToListMenu("siblings_to_list_menu", "sibling_names", {
335 listType:'accessions'
342 jQuery('#related_stock_parents_onswitch').one("click", function(){
343 var siblings_table = jQuery('#parents').DataTable({
345 'ajax':'/stock/'+ <% $stock_id %> + '/datatables/parents',
346 // "fnInitComplete": function(oSettings, json) {
347 // //console.log(json);
348 // if (!isLoggedIn()) {
349 // jQuery('#siblings_to_list_menu').html("<div class='well well-sm'><h3>Please login to use lists!</h3></div>");
352 // for(var i=0; i<json.data.length; i++){
353 // html += json.data[i][4]+"\n";
355 // jQuery("#sibling_names").html(html);
356 // addToListMenu("siblings_to_list_menu", "sibling_names", {
358 // listType:'accessions'