Changed trials-in-common page to use a single database query to get analyses. Changed...
[sgn.git] / mason / breeders_toolbox / breeding_program.mas
blob1a7a3a214948804e2989a5263b9f23b8e43f79be
2 <%args>
3 $program
4 $user => undef
5 </%args>
7 <%perl>
8 my $delete_flag = 0;
9 if ($user && $user->check_roles("curator")) {
10     $delete_flag = 1;
13 my $program_name = $program->get_name;
14 my $program_id   = $program->get_program_id;
15 </%perl>
18 <& /page/page_title.mas, title=>"Breeding Program $program_name" &>
20 <& /page/detail_page_2_col_section.mas, info_section_collapsed => 1, program_id => $program_id, program_name => $program_name, info_section_title => "<h4 style='display:inline'>Product Profiles</h4>", info_section_subtitle => 'View product profiles',buttons_html => '<button class="btn btn-sm btn-primary" style="margin:3px" id="upload_profile_button">Upload New Product Profile</button><button class="btn btn-sm btn-default" style="margin:3px" id="download_template_button">Download Template</button>', icon_class => "glyphicon glyphicon-signal", info_section_id => "program_product_profile_section" &>
21 <& /page/detail_page_2_col_section.mas, info_section_collapsed => 1, program_id => $program_id, info_section_title => "<h4 style='display:inline'>Locations</h4>", info_section_subtitle => 'View locations related to this breeding program', icon_class => "glyphicon glyphicon-pushpin", info_section_id => "program_location_section" &>
22 <& /page/detail_page_2_col_section.mas, info_section_collapsed => 0, program_id => $program_id, info_section_title => "<h4 style='display:inline'>Projects</h4>", info_section_subtitle => 'View field trials, genotyping experiments, crossing experiments', icon_class => "glyphicon glyphicon-th", info_section_id => "program_project_section" &>
23 <& /page/detail_page_2_col_section.mas, info_section_collapsed => 0, program_id => $program_id, info_section_title => "<h4 style='display:inline'>Stocks</h4>", info_section_subtitle => 'View accessions, crosses, seedlots', icon_class => "glyphicon glyphicon-list-alt", info_section_id => "program_stock_section" &>
24 <& /page/detail_page_2_col_section.mas, info_section_collapsed => 1, program_id => $program_id, info_section_title => "<h4 style='display:inline'>Phenotype Summary</h4>", info_section_subtitle => 'View phenotype summary and histogram', icon_class => "glyphicon glyphicon-equalizer", info_section_id => "program_phenotype_section" &>
26 <& /breeders_toolbox/program/create_profile_template_dialog.mas &>
27 <& /breeders_toolbox/program/upload_profile_dialog.mas, program_id => $program_id, program_name => $program_name &>
29 <!--
31 <&| /page/info_section.mas, id=>"program_trials", title => "Trials" , collapsible=>1, collapsed=>0, hide_if_empty=>1 &>
32     <& /breeders_toolbox/program/trials.mas, program_id => $program_id &>
33 </&>
35 <&| /page/info_section.mas, id=>"program_accessions", title=>"Accessions", collapsible=>1, collapsed=>0, hide_if_empty=>1 &>
36   <& /breeders_toolbox/program/program_accessions.mas, program_id => $program_id &>
37 </&>
39 <&| /page/info_section.mas, id=>"program_traits_assayed", title => "Traits assayed" , collapsible=>1, collapsed=>0, hide_if_empty=>1 &>
40   <& /breeders_toolbox/program/traits.mas, program_id => $program_id, collapse_phenotypes_section => 0  &>
41 </&>
43 -->
45 <script>
47 jQuery(document).ready(function () {
49     jQuery('#download_template_button').click(function(){
50         var list = new CXGN.List();
51         var trait_lists = list.listSelect('select_list', ['traits'], 'Select a list', undefined, undefined);
52         jQuery('#select_list_div').html(trait_lists);
54         jQuery('#create_profile_template_dialog').modal("show");
56     })
58     jQuery('#upload_profile_button').click(function(){
60         jQuery('#upload_profile_dialog').modal("show");
62     })
64 });
66 </script>