add addiitional refresh option for all views except genoview
[sgn.git] / mason / breeders_toolbox / upload_nirs_spreadsheet_dialogs.mas
blobd9b834f89327cb320feecb7b6e1f2a6b6d94c490
1 <%args>
2 </%args>
4 <& /util/import_javascript.mas, classes => [ 'jquery', 'jqueryui', 'jquery.iframe-post-form', 'CXGN.BreedersToolbox.UploadPhenotype', 'CXGN.BreederSearch', 'CXGN.Trial' ] &>
6 <!--button class="btn btn-primary" id="upload_spreadsheet_phenotypes_link">Upload NIRS</button-->
8 <div class="modal fade" id="upload_phenotype_spreadsheet_dialog" name="upload_phenotype_spreadsheet_dialog" tabindex="-1" role="dialog" aria-labelledby="addSpreadsheetNIRSDialog">
9   <div class="modal-dialog" role="document">
10     <div class="modal-content">
11       <div class="modal-header">
12         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
13         <h4 class="modal-title" id="addSpreadsheetNIRSDialog">Upload NIRS Spreadsheet</h4>
14       </div>
15       <div class="modal-body">
16         <div class="container-fluid">
18             <&| /page/explanation.mas, title=>'Template Information' &>
19                 <p>
20                 <b>File format information</b>
21                 <br>
22                 <a id="phenotype_upload_spreadsheet_format_info">Spreadsheet Format</a>
23                 </p>
24             </&>
26             <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" encoding="multipart/form-data" id="upload_spreadsheet_phenotype_file_form" name="upload_spreadsheet_phenotype_file_form">
27                 <div class="form-group">
28                     <label class="col-sm-3 control-label">Spreadsheet Format: </label>
29                     <div class="col-sm-9" >
30                         <b>General upload format.</b>
31                         <select class="form-control" id="upload_spreadsheet_phenotype_file_format" name="upload_spreadsheet_phenotype_file_format">
32                             <option value="scio">NIRS all formats</option>
33                             <!-- <option value="nirs">General NIRS upload</option> -->
35                         </select>
36                     </div>
37                 </div>
38                 <div class="form-group">
39                     <label class="col-sm-3 control-label">Timestamps Included: </label>
40                     <div class="col-sm-9" >
41                         <input type="checkbox" id="upload_spreadsheet_phenotype_timestamp_checkbox" name="upload_spreadsheet_phenotype_timestamp_checkbox" />
42                     </div>
43                 </div>
44                 <div id="upload_spreadsheet_phenotype_data_level_div">
45                     <div class="form-group">
46                         <label class="col-sm-3 control-label">Data Level: </label>
47                         <div class="col-sm-9" >
48                             <select class="form-control" id="upload_spreadsheet_phenotype_data_level" name="upload_spreadsheet_phenotype_data_level">
49                                 <option value="plots">Plots</option>
50                                 <option value="plants">Plants</option>
51                                 <option value="subplots">Subplots</option>
52                                 <option value="tissue_samples">Tissue Samples</option>
53                             </select>
54                         </div>
55                     </div>
56                 </div>
57                 <div class="form-group">
58                     <label class="col-sm-3 control-label">NIRS Spreadsheet: </label>
59                     <div class="col-sm-9" >
60                         <input type="file" id="upload_spreadsheet_phenotype_file_input" name="upload_spreadsheet_phenotype_file_input" encoding="multipart/form-data" />
61                     </div>
62                 </div>
65                 <div id="upload_phenotype_spreadsheet_verify_status"></div>
66                 </div>
67             </form><br/>
69         </div>
71         <div class="modal-footer">
72             <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
73             <button type="button" class="btn btn-info" name="upload_spreadsheet_phenotype_submit_verify" id="upload_spreadsheet_phenotype_submit_verify">Verify</button>
74             <button disabled type="button" class="btn btn-primary" name="upload_spreadsheet_phenotype_submit_store" id="upload_spreadsheet_phenotype_submit_store" title="First Verify Your File">Store</button>
75         </div>
77     </div>
78   </div>
79 </div>
81 <div class="modal fade" id="phenotype_upload_spreadsheet_info_dialog" name="phenotype_upload_spreadsheet_info_dialog" tabindex="-1" role="dialog" aria-labelledby="phenotypeUploadInfoDialog">
82   <div class="modal-dialog" role="document">
83     <div class="modal-content">
84       <div class="modal-header">
85         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
86         <h4 class="modal-title" id="phenotypeUploadInfoDialog">Template Information</h4>
87       </div>
88       <div class="modal-body">
89         <div class="container-fluid">
91             <h5>With this model is possible to upload NIRS data just need to follow these columns</h5>
93             <h3>Upload NIRS .csv:</h3>
95             <ul>
96                 <li><strong>id</strong>: Optional identifier for each NIRS read. The id must be an integer.</li>
97                 <li><strong>sampling_id</strong>: Optional identifier for each sample. Strings are allowed.</li>
98                 <li><strong>sampling_date</strong>: Optional field. The format allowed is: YYYY-MM-DD.</li>
99                 <li><strong>observationunit_name</strong>: Required field that matches with existing data in the database. It can be the plot name, subplots, plant name, or tissue sample, depending how your trial is designed.</li>
100                 <li><strong>device_id</strong>: Optional field to identify your device. Strings are allowed.</li>
101                 <li><strong>device_type</strong>: Required field. It is possible upload data for a single device type. They can be: <strong>SCiO, QST, Foss6500,FOSSDS2500, FOSSXDS, ASDQualityspec,ASDLabSpec,SpecimFX17, BunchiN500, or LinkSquare</strong>.</li>
102                 <li><strong>comments</strong>: Optional field for general comments.</li>
103                 <li>All other columns are required wavelengths. You can add how many columns you want upload -- there is no limit.</li>
104             </ul>
105             <table class="table table-hover table-bordered table-condensed" >
106                         <thead></thead>
107                         <tbody>
108                             <tr>
109                                 <td>id</td>
110                                 <td>sample_id</td>
111                                 <td>sampling_date</td>
112                                 <td>obserbationunit_name</td>
113                                 <td>device_id</td>
114                                 <td>device_type</td>
115                                 <td>comments</td>
116                             </tr>
117                         </tbody>
118                     </table>
120             <h3>Template for Upload NIRS .csv:</h3>
121             <ul>
122                 <li>The observationunit_name and device_type must be valid for BreedBase.</li>
123                 <li><a href="https://docs.google.com/spreadsheets/d/1Zxxwhq6Dz1PvvUEMz3Xj3gBYTkchp4tGDfgsIHDNJB8/edit?usp=sharing">Upload NIRS .csv template</a></li>
124             </ul>
125         </div>
126       </div>
127       <div class="modal-footer">
128         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
129       </div>
130     </div>
131   </div>
132 </div>
134 <script>
135 jQuery(document).ready(function() {
137     jQuery('#upload_spreadsheet_phenotypes_link').click( function() {
138         jQuery('#upload_phenotype_spreadsheet_dialog').modal("show");
139     });
141     jQuery("#phenotype_upload_spreadsheet_format_info").click( function () {
142         jQuery("#phenotype_upload_spreadsheet_info_dialog" ).modal("show");
143     });
146 </script>