diff --git a/lib/CXGN/Stock/RelatedStocks.pm b/lib/CXGN/Stock/RelatedStocks.pm index d0235e5c76..1b02404ed8 100644 --- a/lib/CXGN/Stock/RelatedStocks.pm +++ b/lib/CXGN/Stock/RelatedStocks.pm @@ -24,14 +24,14 @@ sub get_trial_related_stock { my $plant_of_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'plant_of', 'stock_relationship')->cvterm_id(); my $subplot_of_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'subplot_of', 'stock_relationship')->cvterm_id(); my $plant_of_subplot_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'plant_of_subplot', 'stock_relationship')->cvterm_id(); - my $seed_transaction_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seed transaction', 'stock_relationship')->cvterm_id(); +# my $seed_transaction_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seed transaction', 'stock_relationship')->cvterm_id(); my $tissue_sample_of_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'tissue_sample_of', 'stock_relationship')->cvterm_id(); my $q = "SELECT stock.stock_id, stock.uniquename, cvterm.name FROM stock_relationship INNER JOIN stock ON (stock_relationship.subject_id = stock.stock_id) INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) WHERE stock_relationship.object_id = ? AND (stock_relationship.type_id = ? - OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ?) + OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? ) UNION ALL @@ -39,11 +39,11 @@ sub get_trial_related_stock { INNER JOIN stock ON (stock_relationship.object_id = stock.stock_id) INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) WHERE stock_relationship.subject_id = ? AND (stock_relationship.type_id = ? - OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ?) "; + OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? OR stock_relationship.type_id = ? ) "; my $h = $schema->storage->dbh()->prepare($q); - $h->execute($stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $seed_transaction_type_id, $tissue_sample_of_type_id, $stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $seed_transaction_type_id, $tissue_sample_of_type_id); + $h->execute($stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $tissue_sample_of_type_id, $stock_id, $plot_of_type_id, $plant_of_type_id, $subplot_of_type_id, $plant_of_subplot_type_id, $tissue_sample_of_type_id); my @trial_related_stock =(); while(my($stock_id, $stock_name, $cvterm_name) = $h->fetchrow_array()){ @@ -175,4 +175,43 @@ sub get_cross_of_progeny { } +sub get_plot_plant_related_seedlots { + my $self = shift; + my $stock_id = $self->stock_id; + my $schema = $self->dbic_schema(); + my $seed_transaction_type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seed transaction', 'stock_relationship')->cvterm_id(); + + my @related_seedlots; + + my $q1 = "SELECT distinct(stock.stock_id), stock.uniquename, cvterm.name FROM stock_relationship + INNER JOIN stock ON (stock_relationship.subject_id = stock.stock_id) + INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) + WHERE stock_relationship.object_id = ? AND stock_relationship.type_id = ? "; + + my $h1 = $schema->storage->dbh()->prepare($q1); + + $h1->execute($stock_id, $seed_transaction_type_id); + + while(my($stock_id, $stock_name, $stock_type) = $h1->fetchrow_array()){ + push @related_seedlots, ['source of', $stock_type, $stock_id, $stock_name] + } + + my $q2 = "SELECT distinct(stock.stock_id), stock.uniquename, cvterm.name FROM stock_relationship + INNER JOIN stock ON (stock_relationship.object_id = stock.stock_id) + INNER JOIN cvterm ON (stock.type_id = cvterm.cvterm_id) + WHERE stock_relationship.subject_id = ? AND stock_relationship.type_id = ? "; + + my $h2 = $schema->storage->dbh()->prepare($q2); + + $h2->execute($stock_id, $seed_transaction_type_id); + + while(my($stock_id, $stock_name, $stock_type) = $h2->fetchrow_array()){ + push @related_seedlots, ['derived from', $stock_type, $stock_id, $stock_name] + } + + return\@related_seedlots; + +} + + 1; diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm index 8ecff84de0..21584a16f7 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotHarvestedXLS.pm @@ -148,6 +148,10 @@ sub _validate_with_plugin { $box_name = $worksheet->get_cell($row,6)->value(); } + if (!defined $seedlot_name && !defined $cross_name) { + last; + } + if (!$seedlot_name || $seedlot_name eq '' ) { push @error_messages, "Cell A$row_name: seedlot_name missing."; } @@ -263,6 +267,11 @@ sub _parse_with_plugin { $cross_name =~ s/^\s+|\s+$//g; $seen_cross_names{$cross_name}++; } + + if (!defined $seedlot_name && !defined $cross_name) { + last; + } + } my $cross_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'cross', 'stock_type')->cvterm_id(); my $seedlot_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seedlot', 'stock_type')->cvterm_id(); @@ -325,9 +334,8 @@ sub _parse_with_plugin { $box_name =~ s/^\s+|\s+$//g; } - #skip blank lines - if (!$seedlot_name && !$cross_name && !$description) { - next; + if (!defined $seedlot_name && !defined $cross_name) { + last; } diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm index f7c4f86a18..2042f58166 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotXLS.pm @@ -168,6 +168,11 @@ sub _validate_with_plugin { $source = $worksheet->get_cell($row, 8)->value(); $source =~ s/^\s+|\s+$//g; } + + if (!defined $seedlot_name && !defined $accession_name) { + last; + } + if (!$seedlot_name || $seedlot_name eq '' ) { push @error_messages, "Cell A$row_name: seedlot_name missing."; } @@ -304,7 +309,13 @@ sub _parse_with_plugin { $accession_name =~ s/^\s+|\s+$//g; #trim whitespace from front and end... $seen_accession_names{$accession_name}++; } + + if (!defined $seedlot_name && !defined $accession_name) { + last; + } + } + my $accession_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'accession', 'stock_type')->cvterm_id(); my $seedlot_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'seedlot', 'stock_type')->cvterm_id(); my $synonym_cvterm_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'stock_synonym', 'stock_property')->cvterm_id(); @@ -379,15 +390,14 @@ sub _parse_with_plugin { $source = $worksheet->get_cell($row, 8)->value(); } + if (!defined $seedlot_name && !defined $accession_name) { + last; + } + $seedlot_name =~ s/^\s+|\s+$//g; #trim whitespace from front and end... $accession_name =~ s/^\s+|\s+$//g; #trim whitespace from front and end... $source =~ s/^\s+|\s+$//g; # also trim - #skip blank lines - if (!$seedlot_name && !$accession_name && !$description) { - next; - } - my $accession_stock_id; if ($acc_synonyms_lookup{$accession_name}){ my @accession_names = keys %{$acc_synonyms_lookup{$accession_name}}; diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToNewSeedlots.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToNewSeedlots.pm index 2f55b65ee9..6e6744fd11 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToNewSeedlots.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToNewSeedlots.pm @@ -164,6 +164,10 @@ sub _validate_with_plugin { $new_seedlot_box_name = $worksheet->get_cell($row,6)->value(); } + if (!defined $from_seedlot_name && !defined $to_new_seedlot_name) { + last; + } + if (!$from_seedlot_name || $from_seedlot_name eq '' ) { push @error_messages, "Cell A$row_name: from_seedlot_name missing."; } else { @@ -335,9 +339,8 @@ sub _parse_with_plugin { $new_seedlot_quality = $worksheet->get_cell($row,8)->value(); } - #skip blank lines - if (!$to_new_seedlot_name && !$from_seedlot_name) { - next; + if (!defined $to_new_seedlot_name && !defined $from_seedlot_name) { + last; } my $from_seedlot_rs = $schema->resultset("Stock::Stock")->find({ diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToPlots.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToPlots.pm index af6304587b..5e6ec10eb9 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToPlots.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToPlots.pm @@ -137,6 +137,10 @@ sub _validate_with_plugin { $transaction_description = $worksheet->get_cell($row,5)->value(); } + if (!defined $from_seedlot_name && !defined $to_plot_name) { + last; + } + if (!$from_seedlot_name || $from_seedlot_name eq '' ) { push @error_messages, "Cell A$row_name: from_seedlot_name missing."; } else { @@ -280,9 +284,8 @@ sub _parse_with_plugin { $transaction_description = $worksheet->get_cell($row,5)->value(); } - #skip blank lines - if (!$to_plot_name && !$from_seedlot_name) { - next; + if (!defined $from_seedlot_name && !defined $to_plot_name) { + last; } my $from_seedlot_rs = $schema->resultset("Stock::Stock")->find({ diff --git a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToSeedlots.pm b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToSeedlots.pm index 7589c50ed4..a9f8e76c98 100644 --- a/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToSeedlots.pm +++ b/lib/CXGN/Stock/Seedlot/ParseUpload/Plugin/SeedlotsToSeedlots.pm @@ -136,6 +136,10 @@ sub _validate_with_plugin { $transaction_description = $worksheet->get_cell($row,5)->value(); } + if (!defined $from_seedlot_name && !defined $to_seedlot_name) { + last; + } + if (!$from_seedlot_name || $from_seedlot_name eq '' ) { push @error_messages, "Cell A$row_name: from_seedlot_name missing."; } else { @@ -270,9 +274,8 @@ sub _parse_with_plugin { $transaction_description = $worksheet->get_cell($row,5)->value(); } - #skip blank lines - if (!$to_seedlot_name && !$from_seedlot_name) { - next; + if (!defined $from_seedlot_name && !defined $to_seedlot_name) { + last; } my $from_seedlot_rs = $schema->resultset("Stock::Stock")->find({ diff --git a/lib/SGN/Controller/AJAX/Stock.pm b/lib/SGN/Controller/AJAX/Stock.pm index ccf0ac27aa..24d8b63c4b 100644 --- a/lib/SGN/Controller/AJAX/Stock.pm +++ b/lib/SGN/Controller/AJAX/Stock.pm @@ -1924,15 +1924,65 @@ sub get_trial_related_stock:Chained('/stock/get_stock') PathPart('datatables/tri my $trial_related_stock = CXGN::Stock::RelatedStocks->new({dbic_schema => $schema, stock_id =>$stock_id}); my $result = $trial_related_stock->get_trial_related_stock(); my @stocks; + my @accessions; + my @crosses; + my @family_names; + my @plots; + my @subplots; + my @plants; + my @tissue_samples; + my @seedlots; + my @others; foreach my $r (@$result){ - my ($stock_id, $stock_name, $cvterm_name) = @$r; - my $url; - if ($cvterm_name eq 'seedlot'){ - $url = qq{$stock_name}; - } else { - $url = qq{$stock_name}; - } - push @stocks, [$url, $cvterm_name, $stock_name]; + my ($stock_id, $stock_name, $cvterm_name) = @$r; + my $url; + + if ($cvterm_name eq 'cross') { + $url = qq{$stock_name}; + } elsif ($cvterm_name eq 'family_name') { + $url = qq{$stock_name}; + } else { + $url = qq{$stock_name}; + } + + if ($cvterm_name eq 'accession') { + push @accessions, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'cross') { + push @crosses, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'family_name') { + push @family_names, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'plot') { + push @plots, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'subplot') { + push @subplots, [$cvterm_name, $url, $stock_name]; + } elsif ($cvterm_name eq 'plant') { + push @plants, [$cvterm_name, $url, $stock_name]; + } + } + + if (scalar(@accessions) > 0) { + push @stocks, @accessions; + } + if (scalar(@crosses) > 0) { + push @stocks, @crosses; + } + if (scalar(@family_names) > 0) { + push @stocks, @family_names; + } + if (scalar(@plots) > 0) { + push @stocks, @plots; + } + if (scalar(@subplots) > 0) { + push @stocks, @subplots; + } + if (scalar(@plants) > 0) { + push @stocks, @plants; + } + if (scalar(@seedlots) > 0) { + push @stocks, @seedlots; + } + if (scalar(@others) > 0) { + push @stocks, @others; } $c->stash->{rest}={data=>\@stocks}; @@ -2019,13 +2069,32 @@ sub get_stock_for_tissue:Chained('/stock/get_stock') PathPart('datatables/stock_ my ($stock_id, $stock_name, $cvterm_name) = @$r; - push @stocks, [qq{$stock_name}, $cvterm_name, $stock_name]; + push @stocks, [$cvterm_name, qq{$stock_name}, $stock_name]; } $c->stash->{rest}={data=>\@stocks}; } + +sub get_plot_plant_related_seedlots:Chained('/stock/get_stock') PathPart('datatables/plot_plant_related_seedlots') Args(0){ + my $self = shift; + my $c = shift; + my $stock_id = $c->stash->{stock_row}->stock_id(); + + my $schema = $c->dbic_schema("Bio::Chado::Schema", 'sgn_chado'); + my $progenies = CXGN::Stock::RelatedStocks->new({dbic_schema => $schema, stock_id =>$stock_id}); + my $result = $progenies->get_plot_plant_related_seedlots(); + my @stocks; + foreach my $r (@$result){ + my ($transaction_type, $stock_type, $stock_id, $stock_name) = @$r; + push @stocks, [$transaction_type, $stock_type, qq{$stock_name}, $stock_name]; + } + + $c->stash->{rest}={data=>\@stocks}; +} + + sub get_stock_datatables_genotype_data : Chained('/stock/get_stock') :PathPart('datatables/genotype_data') : ActionClass('REST') { } sub get_stock_datatables_genotype_data_GET { @@ -2277,7 +2346,7 @@ sub stock_additional_file_upload :Chained('/stock/get_stock') PathPart('upload_a $c->stash->{rest} = {error=>$result->{error}}; $c->detach(); } - + $c->stash->{rest} = { success => 1, file_id => $result->{file_id} }; } @@ -2294,11 +2363,11 @@ sub get_accession_additional_file_uploaded :Chained('/stock/get_stock') PathPart my @file_array; my %file_info; - my $q = "SELECT file_id, m.create_date, p.sp_person_id, p.username, basename, dirname, filetype + my $q = "SELECT file_id, m.create_date, p.sp_person_id, p.username, basename, dirname, filetype FROM phenome.stock_file - JOIN metadata.md_files using(file_id) + JOIN metadata.md_files using(file_id) LEFT JOIN metadata.md_metadata as m using(metadata_id) - LEFT JOIN sgn_people.sp_person as p ON (p.sp_person_id=m.create_person_id) + LEFT JOIN sgn_people.sp_person as p ON (p.sp_person_id=m.create_person_id) WHERE stock_id=? and m.obsolete = 0 and metadata.md_files.filetype='accession_additional_file_upload' ORDER BY file_id ASC"; my $h = $c->dbc->dbh()->prepare($q); diff --git a/mason/stock/index.mas b/mason/stock/index.mas index a9753ca662..bf2c754f04 100644 --- a/mason/stock/index.mas +++ b/mason/stock/index.mas @@ -246,7 +246,7 @@ function jqueryStuff() { alternate_ghosted_delete_button => '' &> - +


@@ -260,13 +260,13 @@ function jqueryStuff() { <&| /page/info_section.mas, title => "Released variety name", subtitle=>$released_variety_link, is_subsection => 1 &> <& /stock/stockprops.mas, stock_id =>$stock_id, - form_div_id => 'released_variety_link', + form_div_id => 'released_variety_link', props => ['released_variety_name'], div_name => 'released_variety_name', edit_privs => $edit_privs, subset => ['released_variety_name'], editable => ['released_variety_name'] &> - +
@@ -278,18 +278,22 @@ function jqueryStuff() { - + <&| /page/info_section.mas, title => "Navigator" , collapsible=> 1, collapsed=>0 &> % my $subtitle = $edit_privs ? "" : ""; % my $props_subtitle = $edit_privs ? "" : ""; +% if ($type_name eq 'plot' || $type_name eq 'plant' || $type_name eq 'subplot' || $type_name eq 'tissue_sample') { + <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Related Stocks

", info_section_subtitle => 'View any accession, plot, plant, and/or tissue_sample that are linked to this stock.', icon_class => "glyphicon glyphicon-retweet", info_section_id => "stock_related_stock_section", stock_uniquename => $uniquename, type_name => $type_name &> +% } + % if ($type_name ne 'vector_construct' ){ <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, type_name => $type_name, stockref => $stockref, buttons_html => $subtitle.$props_subtitle, info_section_title => "

Additional Info

", info_section_subtitle => 'View and edit additional properties such as synonyms, editors, and all types of properties.', icon_class => "glyphicon glyphicon-info-sign", info_section_id => "stock_additional_info_section", stockprops => $stockprops, edit_privs => $edit_privs, editable_stock_props => \@editable_stock_props, editor_link => $editor_link_table, source_dbs => \%source_dbs, locus_add_uri => $locus_add_uri, new_locus_link => $new_locus_link, allele_div => $allele_div, is_owner => $is_owner &> % } else { <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, type_name => $type_name, stockref => $stockref, buttons_html => $subtitle.$props_subtitle, info_section_title => "

Additional Info

", info_section_subtitle => 'View and edit additional properties such as synonyms, editors, and all types of properties.', icon_class => "glyphicon glyphicon-info-sign", info_section_id => "stock_additional_info_section", stockprops => $stockprops, edit_privs => $edit_privs, editable_stock_props => \@editable_vector_props, editor_link => $editor_link_table, source_dbs => \%source_dbs, locus_add_uri => $locus_add_uri, new_locus_link => $new_locus_link, allele_div => $allele_div, is_owner => $is_owner &> -% } +% } % if ($type_name eq 'accession' || $type_name eq 'plant' || $type_name eq 'plot' || $type_name eq 'subplot' || $type_name eq 'tissue_sample'){ <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Experiment Usage

", info_section_subtitle => 'View experiments that this stock has been used in.', icon_class => "glyphicon glyphicon-leaf", info_section_id => "stock_trials_section" &> @@ -313,9 +317,9 @@ function jqueryStuff() { % } <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Sequencing Status

", info_section_subtitle => 'View and edit sequencing status info for this stock.', icon_class => "glyphicon glyphicon-inbox", info_section_id => "stock_sequencing_status_section", buttons_html => "$sequencing_status_button", map_html => $map_html &> - + - + <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Genotype Marker Data

", info_section_subtitle => 'View and download phenotypic data for this stock.', icon_class => "glyphicon glyphicon-map-marker", info_section_id => "stock_genotypes_section", map_html => $map_html &> % } @@ -334,9 +338,9 @@ function jqueryStuff() { <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Pedigree

", info_section_subtitle => 'View and edit pedigree information.', icon_class => "glyphicon glyphicon-random", info_section_id => "stock_pedigree_section", buttons_html => $add_parent_link.$remove_parent_link, has_pedigree => $has_pedigree, info_section_collapsed => 0 &> + <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Related Stocks

", info_section_subtitle => 'View any plots, plants, tissue_sample, and/or accessions that are linked to this stock.', icon_class => "glyphicon glyphicon-retweet", info_section_id => "stock_related_stock_section", stock_uniquename => $uniquename, type_name => $type_name &> % } - <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Related Stocks

", info_section_subtitle => 'View any plots, plants, tissue_sample, and/or accessions that are linked to this stock.', icon_class => "glyphicon glyphicon-retweet", info_section_id => "stock_related_stock_section", stock_uniquename => $uniquename, type_name => $type_name &> <& /page/detail_page_2_col_section.mas, stock_id => $stock_id, info_section_title => "

Images

", info_section_subtitle => 'View and add images of this stock and of related stocks.', icon_class => "glyphicon glyphicon-camera", info_section_id => "stock_images_section", image_ids => $image_ids, related_image_ids => $related_image_ids, dbh => $dbh, buttons_html => qq|Add new imageCompare Images| &> diff --git a/mason/stock/related_stock.mas b/mason/stock/related_stock.mas index 3c2fb86a91..fe2b3a922c 100644 --- a/mason/stock/related_stock.mas +++ b/mason/stock/related_stock.mas @@ -6,16 +6,15 @@ $stock_type => undef % if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ - - <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trials', collapsible=>1, collapsed=>1 &> + <&| /page/info_section.mas, id=>'related_stocks_in_trial', title => 'Related stocks in trial', collapsible=>1, collapsed=>1 &>
- + @@ -30,12 +29,64 @@ $stock_type => undef
- % } -% if ($stock_type eq 'accession'){ +% if ($stock_type eq 'plot' || $stock_type eq 'plant'){ + <&| /page/info_section.mas, id=>'related_seedlots', title => 'Related seedlots', collapsible=>1, collapsed=>1 &> +
+
+
+ + + + + + + + + +
+
+
+ <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the seedlot names showing in table to a new or exisiting list'&> +
+
+ + +
+ +% } + +% if ($stock_type eq 'accession') { <& /breeders_toolbox/seedlots_section.mas, stock_id=>$stock_id, stock_type=>$stock_type, stock_uniquename=>$stock_uniquename &> +% } + +% if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot'){ + + <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related tissue samples', collapsible=>1, collapsed=>1 &> +
+
+
+ + + + + + + +
TypeName
+
+
+ +
+ <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the stock names showing in table to a new or exisiting list'&> +
+
+ + +
+ % } @@ -121,33 +172,6 @@ $stock_type => undef % } -% if ($stock_type eq 'accession' || $stock_type eq 'plant' || $stock_type eq 'plot' || $stock_type eq 'subplot' || $stock_type eq 'tissue_sample'){ - - <&| /page/info_section.mas, id=>'related_stock_tissues', title => 'Related stocks for tissue sample', collapsible=>1, collapsed=>1 &> -
-
-
- - - - - - - -
NameType
-
-
- -
- <&| /page/info_section.mas, title => 'Copy Stocks to a List', collapsible=>1, collapsed=>1, subtitle=>'Copy the stock names showing in table to a new or exisiting list'&> -
-
- - -
- - -% }