Merge pull request #2754 from solgenomics/topic/fix_homepage_add_accessions_dialog
[sgn.git] / mason / page / detail_page_2_col_section.mas
blobfa7d9fcd14421468cc23d5f14ba0f8f8df08fc72
1 <%args>
2 $trial_id => undef
3 $trial_name => undef
4 $stock_id => undef
5 $stock_uniquename => undef
6 $col1_width_class => "col-sm-1"
7 $col2_width_class => "col-sm-11"
8 $icon_class => "glyphicon glyphicon-th"
9 $info_section_collapsible => 1
10 $info_section_collapsed => 1
11 $info_section_id => "2col_id"
12 $info_section_title => "A title"
13 $info_section_subtitle => "A subtitle"
14 $buttons_html => undef
15 $locations_by_program_json => undef
17 #Specific to trial detail page
18 $has_plant_entries => undef
19 $has_subplot_entries => undef
20 $has_tissue_sample_entries => undef
21 $has_expression_atlas => undef
22 $expression_atlas_url => undef
23 $site_project_name => undef
24 $sgn_session_id => undef
25 $user_name => undef
26 $main_production_site_url => undef
27 $trial_phenotype_files => undef
28 $hidap_enabled => undef
29 $location_name => undef
30 $breeding_program_name => undef
31 $breeding_program_id => undef
32 $year => undef
33 $trial_type => undef
34 $design_name => undef
35 $planting_date => undef
36 $harvest_date => undef
37 $trial_description => undef
38 $folder_name => undef
39 $folder_id => undef
40 $plot_width => undef
41 $plot_length => undef
42 $field_size => undef
43 $field_trial_is_planned_to_be_genotyped => undef
44 $field_trial_is_planned_to_cross => undef
45 $identifier_prefix => undef
46 $genotyping_facility => undef
47 $management_factor_date => undef
48 $management_factor_type => undef
50 #Specific to stock detail page
51 $type_name => undef
52 $stockref => {}
53 $stockprops => undef
54 $edit_privs => undef
55 $editable_stock_props => undef
56 $editor_link => undef
57 $source_dbs => {}
58 $locus_add_uri => undef
59 $new_locus_link => undef
60 $allele_div => undef
61 $is_owner => undef
62 $map_html => undef
63 $has_pedigree => undef
64 $image_ids => undef
65 $related_image_ids => undef
66 $dbh => undef
67 $trait_ontology_db_name => undef
68 $pubs => undef
69 $cvterm_add_uri => undef
70 $referer => undef
72 #Specific to genotyping protocol detail page
73 $protocol_id => undef
74 $protocol_name => undef
75 $protocol_description => undef
76 $marker_names => []
77 $header_information_lines => []
78 $reference_genome_name => undef
79 $species_name => undef
80 $create_date => undef
81 $sample_observation_unit_type_name => undef
83 </%args>
85 <div class="row">
86     <div class="col-sm-12">
87         <div class="well">
88             <div class="row">
89                 <div class="<% $col1_width_class %>">
90                     <span style="font-size:3.5em;" class="<% $icon_class %>"></span>
91                 </div>
92                 <div class="<% $col2_width_class %>">
94                     <&| /page/info_section.mas, id => $info_section_id, title => $info_section_title, collapsible=>$info_section_collapsible, collapsed => $info_section_collapsed, subtitle=> $info_section_subtitle &>
96 % if ($buttons_html){
97                         <div class="panel panel-default">
98                             <div class="panel-body">
99                                 <% $buttons_html %>
100                             </div>
101                         </div>
102 % }
104                         <div class="panel panel-default">
105                             <div class="panel-body">
107 % if ($info_section_id eq 'pheno_heatmap'){
108                                 <& /breeders_toolbox/trial/phenotype_heatmap.mas, trial_id => $trial_id &>
109 % } #End pheno_heatmap
110 % if ($info_section_id eq 'trial_design_section'){
111                                 <& /breeders_toolbox/trial/design_section.mas, trial_id => $trial_id, trial_name => $trial_name, has_subplot_entries => $has_subplot_entries, has_plant_entries => $has_plant_entries, has_tissue_sample_entries => $has_tissue_sample_entries, design_name => $design_name &>
112 % } #End trial_design_section
113 % if ($info_section_id eq 'trial_detail_traits_assayed'){
115 % if ($has_expression_atlas) {
116                                 <& /breeders_toolbox/trial/export_trial_to_expression_atlas.mas, trial_id => $trial_id, trial_name=>$trial_name, expression_atlas_url=>$expression_atlas_url, site_project_name=>$site_project_name, sgn_session_id=>$sgn_session_id, user_name=>$user_name, main_production_site_url=>$main_production_site_url &>
117 % }
119                                 <& /breeders_toolbox/trial/phenotype_summary.mas, trial_id => $trial_id &>
121 % } #End trial_detail_traits_assayed
122 % if ($info_section_id eq 'compute_derived_traits'){
123                                 <& /breeders_toolbox/trial/derived_trait.mas, trial_id => $trial_id &>
124 % } #End compute_derived_traits
125 % if ($info_section_id eq 'trial_upload_files'){
126                                 <& /breeders_toolbox/trial/files_section.mas, trial_id => $trial_id, trial_phenotype_files => $trial_phenotype_files &>
127 % } #End trial_upload_files
128 % if ($info_section_id eq 'trial_analysis_tools'){
129                                 <!-- Phenotypic correlation analysis -->
130                                 <& /solgs/population/correlation.mas,
131                                     trial_id => $trial_id
132                                 &>
134                                 <& /solgs/anova/analysis.mas,
135                                     trial_id => $trial_id
136                                 &>
138                                 <!-- Population structure analysis PCA -->
139                                 <& /solgs/pca/analysis.mas,
140                                     trial_id => $trial_id
141                                   &>
143                                 <!-- Clustering -->
144                                 <& /solgs/cluster/analysis.mas,
145                                     trial_id => $trial_id
146                                 &>
148 % if ($hidap_enabled) {
149                                 <& /hidap/hidap_trial_link.mas, main_production_site_url=>$main_production_site_url, program => $breeding_program_name, folder => $folder_name, trial => $trial_name &>
150 % }
151 % } #End trial_analysis_tools
152 % if ($info_section_id eq 'trial_weather_data'){
153                                 <& /breeders_toolbox/trial/weather.mas, location => $location_name &>
154 % } #End trial_weather_data
155 % if ($info_section_id eq 'trial_jbrowse_data'){
156                                 <& /breeders_toolbox/trial/jbrowse_instance.mas, trial_id => $trial_id &>
157 %} #End trial_jbrowse_data
158 % if ($info_section_id eq 'trial_linkage_section'){
159                                 <&| /page/info_section.mas, title => 'Field Trial to Field Trial Linkage', id => 'field_trial_from_field_trial_section', collapsible => 1, collapsed => 1 &>
160                                     <& /breeders_toolbox/trial/field_trial_from_field_trial_linkage.mas, trial_id => $trial_id &>
161                                 </&>
162                                 <&| /page/info_section.mas, title => 'Field Trial to Genotyping Plate Linkage', id => 'genotyping_trial_from_field_trial_section', collapsible => 1, collapsed => 1 &>
163                                     <& /breeders_toolbox/trial/genotyping_trial_from_field_trial_linkage.mas, trial_id => $trial_id, trial_type => 'field_trial' &>
164                                 </&>
165                                 <&| /page/info_section.mas, title => 'Field Trial to Crossing Experiment Linkage', id => 'crossing_trial_from_field_trial_section', collapsible => 1, collapsed => 1 &>
166                                     <& /breeders_toolbox/trial/crossing_trial_from_field_trial_linkage.mas, trial_id => $trial_id, trial_type => 'field_trial' &>
167                                 </&>
168 %} #End trial_linkage_section
169 % if ($info_section_id eq 'trial_deletion_section'){
170                                 <&| /page/info_section.mas, title=>'Delete trial data', subtitle=>'<font color="red" role="">Deletion cannot be undone</font>', collapsed=>1, collapsible=>1 &>
171                                     <& /breeders_toolbox/trial/trial_deletion.mas, trial_id => $trial_id  &>
172                                 </&>
173 %} #End trial_deletion_section
174 % if ($info_section_id eq 'trial_data_agreement_section'){
175                                 <& /breeders_toolbox/data_agreement.mas, trial_id => $trial_id &>
176 % } #End trial_data_agreement_section
178 % if ($info_section_id eq 'stock_additional_info_section'){
179                                 <& /stock/additional_info_section.mas, stock_id => $stock_id, type_name => $type_name, stockprops => $stockprops, edit_privs => $edit_privs, editable_stock_props => $editable_stock_props, editor_link => $editor_link, source_dbs => $source_dbs, locus_add_uri => $locus_add_uri, allele_div => $allele_div, is_owner => $is_owner &>
180 % } #End stock_additional_info_section
181 % if ($info_section_id eq 'stock_trials_section'){
182                                 <& /stock/trials.mas, stock_id => $stock_id &>
183 % } #End stock_trials_section
184 % if ($info_section_id eq 'stock_traits_section'){
185                                 <& /stock/traits.mas, stock_id => $stock_id &>
186 % } #End stock_traits_section
187 % if ($info_section_id eq 'stock_genotypes_section'){
188                                 <& /stock/direct_genotypes.mas, stock_id => $stock_id, map_html => $map_html &>
189 % } #End stock_genotypes_section
190 % if ($info_section_id eq 'stock_pedigree_section'){
191                                 <&| /page/info_section.mas, title=>"Pedigree and Descendants" , collapsible=> 1, collapsed=>0 &>
192                                     <& /pedigree/stock_pedigree.mas, stock_id => $stock_id, has_pedigree => $has_pedigree &>
193                                 </&>
195                                 <& /pedigree/stock_pedigree_string.mas, stock_id => $stock_id &>
196 % } #End stock_pedigree_section
197 % if ($info_section_id eq 'stock_related_stock_section'){
198                                 <& /stock/related_stock.mas, stock_id => $stock_id, stock_uniquename => $stock_uniquename, stock_type => $type_name &>
199 % } #End stock_related_stock_section
200 % if ($info_section_id eq 'stock_images_section'){
201                                 <&| /page/info_section.mas, title=>"Images of This Stock(" .  scalar(@$image_ids)  . ")", collapsible=>1, collapsed=>0 &>
202                                     <& /image/print_images.mas , images=>$image_ids , dbh=>$dbh, additional_image_button_id=>'stock_images' &>
203                                 </&>
205                                 <&| /page/info_section.mas, title=>"Images of Related Stock(s) (" .  scalar(@$related_image_ids)  . ")", collapsible=>1, collapsed=>0 &>
206                                     <& /image/print_images.mas , images=>$related_image_ids , dbh=>$dbh, additional_image_button_id=>'related_stock_images' &>
207                                 </&>
208 % } #End stock_images_section
209 % if ($info_section_id eq 'stock_sequencing_status_section'){
210                                 <& /stock/sequencing_status.mas, stock_id => $stock_id &>
211 % } #End stock requencing status section
212 % if ($info_section_id eq 'stock_literature_annotation_section'){
213                                 <&| /page/info_section.mas, title=>"Literature annotation (".scalar( @$pubs ).")" , id=>"publications" , collapsible=>1, collapsed=>1 &>
216 % foreach my $publication ( @$pubs  ) {
217   <& /chado/publication.mas, pub=>$publication &>
218     <br >
219 % }
221                                 </&>
223                                 <&| /page/info_section.mas, id   => 'stock_ontology', title=>"Ontology annotation (" . $stockref->{ontology_count} . ")" &>
224                                     <& /ontology/associate_ontology.mas,
225                                     trait_db_name => $trait_ontology_db_name,
226                                     object_id     => $stock_id ,
227                                     object_name   => "stock",
228                                     cvterm_add_uri=> $cvterm_add_uri,
229                                     ontology_url  => "/stock/$stock_id/ontologies/",
230                                     reference_uri => "/stock/$stock_id/references/",
231                                     evidence_with_uri => "/stock/$stock_id/evidences/",
232                                     show_form     => $is_owner  &>
233                                 </&>
234 % } #End stock_literature_annotation_section
235 % if ($info_section_id eq 'stock_jbrowse_section'){
236                                 <p id="jbrowse_check">[loading...]</p>
237 % } #End stock_jbrowse_section
238 % if ($info_section_id eq 'stock_comments_section'){
239                                 <& /page/comments.mas, object_type=>'stock', object_id=>$stock_id, referer=>$referer &>
240 % } #End stock_comments_section
241 % if ($info_section_id eq 'stock_delete_section'){
242                                 <& /stock/delete.mas, stock_id=>$stock_id &>
243 % } #End stock_delete_section
246 % if ($info_section_id eq 'manage_tissue_samples_field_trials'){
247                                 <& /breeders_toolbox/tissue_samples/field_trials_with_tissue_samples.mas &>
248 % } #End manage_tissue_samples_field_trials
249 % if ($info_section_id eq 'manage_tissue_samples_genotyping_trials'){
250                                 <& /breeders_toolbox/tissue_samples/genotyping_trials.mas &>
251 % } #End manage_tissue_samples_genotyping_trials
252 % if ($info_section_id eq 'trial_details'){
253                                 <& /breeders_toolbox/trial/trial_details.mas, trial_id=>$trial_id, trial_name=>$trial_name, breeding_program_name=>$breeding_program_name, breeding_program_id=>$breeding_program_id, location_name=>$location_name, year=>$year, trial_type=>$trial_type, planting_date=>$planting_date, harvest_date=>$harvest_date, trial_description=>$trial_description, folder_name=>$folder_name, folder_id=>$folder_id, identifier_prefix=>$identifier_prefix, plot_width=>$plot_width, plot_length=>$plot_length, field_size=>$field_size, field_trial_is_planned_to_be_genotyped=>$field_trial_is_planned_to_be_genotyped, field_trial_is_planned_to_cross=>$field_trial_is_planned_to_cross &>
254 % } #End trial_details
255 % if ($info_section_id eq 'stocks_search_graphical_filtering'){
256                                 <& /search/stocks_graphicalfiltering.mas &>
257 % } #End stocks_search_graphical_filtering
258 % if ($info_section_id eq 'genotyping_data_project_details'){
259                                 <& /breeders_toolbox/genotyping_data_project/details.mas, trial_id=>$trial_id, trial_name=>$trial_name, breeding_program_name=>$breeding_program_name, breeding_program_id=>$breeding_program_id, location_name=>$location_name, year=>$year, trial_description=>$trial_description, identifier_prefix=>$identifier_prefix, genotyping_facility => $genotyping_facility &>
260 % } #End genotyping_data_project_details
261 % if ($info_section_id eq 'genotyping_data_project_protocols'){
262                                 <& /breeders_toolbox/genotyping_data_project/protocols.mas, trial_id=>$trial_id &>
263 % } #End genotyping_data_project_protocols
264 % if ($info_section_id eq 'genotyping_data_project_data'){
265                                 <& /breeders_toolbox/genotyping_data_project/genotype_data.mas, trial_id=>$trial_id &>
266 % } #End genotyping_data_project_data
267 % if ($info_section_id eq 'identifier_generation_list'){
268                                 <& /breeders_toolbox/identifier_generation/list_identifier_generation.mas &>
269 % } #End identifier_generation_list
270 % if ($info_section_id eq 'management_factor_details'){
271                                 <& /breeders_toolbox/trial/management_factor_details.mas, trial_id=>$trial_id, trial_name=>$trial_name, year=>$year, management_factor_type=>$management_factor_type, management_factor_date=>$management_factor_date &>
272 % } #End management_factor_details
273 % if ($info_section_id eq 'management_factor_design'){
274                                 <& /breeders_toolbox/trial/design_section_management_factor.mas, trial_id => $trial_id, trial_name => $trial_name, has_subplot_entries => $has_subplot_entries, has_plant_entries => $has_plant_entries, has_tissue_sample_entries => $has_tissue_sample_entries, design_name => $design_name &>
275 % } #End management_factor_design
277 % if ($info_section_id eq 'genotyping_protocol_details'){
278                                 <& /breeders_toolbox/genotyping_protocol/details.mas, protocol_id => $protocol_id, protocol_name => $protocol_name, protocol_description => $protocol_description, marker_names => $marker_names, header_information_lines => $header_information_lines, reference_genome_name => $reference_genome_name, species_name => $species_name, create_date => $create_date, sample_observation_unit_type_name => $sample_observation_unit_type_name &>
279 % } #End genotyping_protocol_details
280 % if ($info_section_id eq 'genotyping_protocol_markers'){
281                                 <& /breeders_toolbox/genotyping_protocol/markers.mas, protocol_id => $protocol_id &>
282 % } #End genotyping_protocol_markers
283 % if ($info_section_id eq 'genotyping_protocol_genotype_data'){
284                                 <& /breeders_toolbox/genotyping_protocol/genotype_data.mas, protocol_id => $protocol_id &>
285 % } #End genotyping_protocol_genotype_data
287 % if ($info_section_id eq 'crossingtrial_details'){
288                                 <& /breeders_toolbox/cross/crossingtrial_details.mas, trial_id=>$trial_id, trial_name=>$trial_name, breeding_program_name=>$breeding_program_name, location_name=>$location_name, year=>$year, planting_date=>$planting_date, harvest_date=>$harvest_date, trial_description=>$trial_description, folder_name=>$folder_name, folder_id=>$folder_id, identifier_prefix=>$identifier_prefix &>
289 % } #End crossingtrial_details
291 % if ($info_section_id eq 'crosses_in_crossingtrial_section'){
292                                 <& /breeders_toolbox/cross/crosses_in_crossingtrial.mas, trial_id=>$trial_id &>
293 % } #End crosses_in_crossingtrial_section
295 % if ($info_section_id eq 'cross_properties_crossingtrial_section'){
296                                 <& /breeders_toolbox/cross/cross_properties_crossingtrial.mas, trial_id=>$trial_id &>
297 % } #End cross_properties_crossingtrial_section
299 % if ($info_section_id eq 'progenies_in_crossingtrial_section'){
300                                 <& /breeders_toolbox/cross/progenies_in_crossingtrial.mas, trial_id=>$trial_id &>
301 % } #End progenies_in_crossingtrial_section
303 % if ($info_section_id eq 'seedlots_from_crossingtrial_section'){
304                                 <& /breeders_toolbox/cross/seedlots_from_crossingtrial.mas, trial_id=>$trial_id, breeding_program_name=>$breeding_program_name, breeding_program_id=>$breeding_program_id, locations_by_program_json=>$locations_by_program_json &>
305 % } #End seedlots_from_crossingtrial_section
307 % if ($info_section_id eq 'crossing_trial_from_field_trial_section'){
308                                 <& /breeders_toolbox/trial/crossing_trial_from_field_trial_linkage.mas, trial_id => $trial_id, trial_type => 'crossing_trial' &>
309 % } #End crossing_trial_from_field_trial_section
311 % if ($info_section_id eq 'crossing_experiment_deletion_section'){
312                                 <& /breeders_toolbox/cross/crossing_experiment_deletion.mas, trial_id => $trial_id  &>
313 %} #End crossing_experiment_deletion_section
315 % if ($info_section_id eq 'manage_drone_imagery_main'){
316                                 <& /breeders_toolbox/drone_imagery/raw_image_section.mas &>
317 % } #End manage_drone_imagery_main
319 % if ($info_section_id eq 'manage_drone_imagery_generate_plot_polygons_section'){
320                                 <& /breeders_toolbox/drone_imagery/generate_plot_polygons_section.mas &>
321 % } #End manage_drone_imagery_generate_plot_polygons_section
322 % if ($info_section_id eq 'manage_drone_imagery_standard_process_generate_plot_polygons_section'){
323                                 <& /breeders_toolbox/drone_imagery/generate_plot_polygons_standard_process_section.mas &>
324 % } #End manage_drone_imagery_generate_plot_polygons_section
326 % if (!$info_section_id){
327                                 <p>No section specified! Main content goes here!</p>
328 % }
330                             </div>
331                         </div>
332                     </&>
333                 </div>
334             </div>
335         </div>
336     </div>
337 </div>