6 /breeders_toolbox/drone_run_project.mas - a mason component to display a drone run project detail page
19 $breeding_program_name
24 $planting_date => undef
25 $harvest_date => undef
26 $trial_description => undef
27 $user_can_modify => undef
28 $has_plant_entries => undef
29 $has_subplot_entries => undef
30 $has_tissue_sample_entries => undef
31 $hidap_enabled => undef
34 $plants_per_plot => undef
35 $has_expression_atlas => undef
36 $expression_atlas_url => undef
37 $site_project_name => undef
38 $trial_phenotype_files => undef
39 $sgn_session_id => undef
42 $phenotypes_fully_uploaded => undef
43 $identifier_prefix => 'SGN'
44 $genotyping_facility => undef
45 $drone_run_date => undef
48 <& /util/import_javascript.mas, classes => [ 'jquery.iframe-post-form', 'CXGN.Trial' , 'jstree/dist/jstree', 'CXGN.BreedersToolbox.HTMLSelect', 'moment_min', 'daterangepicker' ] &>
52 <& /page/page_title.mas, title=>"Imaging Event Project: ".$trial_name &>
54 <& /page/detail_page_2_col_section.mas, info_section_collapsed => 0, trial_id => $trial_id, info_section_title => "<h4 style='display:inline'>Imaging Event Details</h4>", info_section_subtitle => 'View basic information about the imaging event project.', buttons_html => '<button class="btn btn-primary btn-sm" id="edit_drone_run_details" style="margin:3px">Edit Imaging Event Details</button>', icon_class => "glyphicon glyphicon-dashboard", info_section_id => "drone_run_project_details", trial_name => $trial_name, trial_description => $trial_description, identifier_prefix => $identifier_prefix, drone_run_date=>$drone_run_date &>
56 % my $data_agreement_link = '<button class="btn btn-sm btn-primary" disabled style="margin:3px">Add/edit data agreement</button>';
57 % if ($user_can_modify) { $data_agreement_link = '<button class="btn btn-sm btn-primary" style="margin:3px" id="add_data_agreement">Add/edit data agreement</button>'; }
59 <& /page/detail_page_2_col_section.mas, trial_id => $trial_id, info_section_title => "<h4 style='display:inline'>Data Agreement License</h4>", info_section_subtitle => 'View and edit the public data agreement on this experiment.', icon_class => "glyphicon glyphicon-inbox", info_section_id => "trial_data_agreement_section", buttons_html => $data_agreement_link &>
61 <& /breeders_toolbox/add_data_agreement_dialogs.mas, trial_id => $trial_id &>
64 <div class="modal fade" id="drone_run_details_edit_dialog" tabindex="-1" role="dialog" aria-labelledby="droneRunDetailsEditDialog">
65 <div class="modal-dialog modal-xl" role="document">
66 <div class="modal-content ui-front">
67 <div class="modal-header text-center">
68 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
69 <h4 class="modal-title" id="droneRunDetailsEditDialog">Edit Imaging Event Details</h4>
71 <div class="modal-body" id="drone_run_details_edit_body">
72 <div class="container-fluid">
73 <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" encoding="multipart/form-data">
74 <div class="form-group">
75 <label class="col-sm-3 control-label" for="edit_drone_run_name">Imaging Event Name: </label>
76 <div class="col-sm-8">
77 <div class="input-group">
78 <input class="form-control col-sm-8" id="edit_drone_run_name" title="name" type="text" value="<%$trial_name%>"/>
82 <div class="form-group">
83 <label class="col-sm-3 control-label" for="edit_trial_description">Description: </label>
84 <div class="col-sm-8">
85 <div class="input-group">
86 <textarea class="form-control" id="edit_drone_run_description" title="description" rows="5" maxlength="250"><% $trial_description %></textarea>
93 <div class="modal-footer">
94 <button type="button" class="btn btn-default" data-dismiss="modal" id="edit_drone_run_details_cancel_button">Cancel</button>
95 <button type="button" class="btn btn-primary" id="save_drone_run_details">Save Changes</button>
101 <div id="trialIDDiv" class="trialIDDivClass" style="display:none;">
105 <script defer="defer">
107 jQuery(document).ready(function () {
109 trial_detail_page_setup_dialogs();
111 jQuery('#edit_drone_run_details').click(function(){
112 jQuery('#drone_run_details_edit_dialog').modal('show');
115 jQuery('#save_drone_run_details').click(function(){
117 url : '/api/drone_imagery/update_details',
120 'drone_run_project_id':<% $trial_id %>,
121 'description':jQuery('#edit_drone_run_description').val(),
122 'drone_run_name':jQuery('#edit_drone_run_name').val()
124 success: function(response){
125 if (response.success) {
126 alert('Details saved!');
130 error: function(response){
131 alert('Error saving details');