Merge pull request #5056 from solgenomics/topic/generic_seedlot_upload
[sgn.git] / mason / transformation / transformation_project_details.mas
blob3c93f7ebab9bf7c40f99337fdabd1bf4c80a69ba
1 <%args>
2 $trial_id
3 $trial_name
4 $breeding_program_name
5 $breeding_program_id
6 $location_name
7 $country_name
8 $year
9 $trial_description
10 $folder_name
11 $folder_id
12 $identifier_prefix
13 $trial_owner
14 </%args>
17 <div class="row">
18     <div class="col-sm-8">
20         <table class="table table-hover table-bordered" >
22             <tr>
23                 <td><b>Transformation Project Name</b></td>
24                 <td>
25                     <div id="trial_name">
26 % if ($trial_name) {
27 %   print "$trial_name";
28 % } else {
29 %   print "<span class='text-danger'>[No Transformation Project Name]</span>";
30 % }
31                     </div>
32                 </td>
33             </tr>
35             <tr>
36                 <td><b>Breeding Program </b></td>
37                 <td>
38                     <span id="breeding_program">
39 % if ($breeding_program_name) {
40 %  print "$breeding_program_name";
41 % }
42 % else {
43 %  print "<span class='text-danger'>[No Breeding Program]</span>";
44 % }
45                     </span>
46                 </td>
47             </tr>
49             <tr>
50                 <td><b>Location</b></td>
51                 <td>
52                     <div id="trial_location">
53 % if ($location_name) {
54 %  print "$location_name ( $country_name )";
55 % } else {
56 %  print "<span class='text-danger'>[No Location]</span>";
57 % }
58                     </div>
59                 </td>
60             </tr>
62             <tr>
63                 <td><b>Year</b></td>
64                 <td>
65                     <div id="trial_year">
66 % if ($year) {
67 %  print "$year";
68 % } else {
69 %  print "<span class='text-danger'>[No Year]</span>";
70 % }
71                     </div>
72                 </td>
73             </tr>
75             <tr><td><b>Description</b></td>
76                 <td>
77                     <div id="trial_description">
78 % if ($trial_description) {
79 %  print "$trial_description";
80 % } else {
81 %  print "<span class='text-danger'>[No Description]</span>";
82 % }
83                     </div>
84                 </td>
85             </tr>
87             <tr>
88                 <td><b>Folder</b></td>
89                 <td>
90                     <span id="trial_folder_div"><a href="/folder/<% $folder_id %>"><% $folder_name %></a></span>
91                     <br/><br/>
92                     <button class="btn btn-sm btn-default" style="margin:3px" id="new_folder_dialog_link">New Folder</button> <button class="btn btn-sm btn-default" style="margin:3px" id="open_folder_dialog_link">Change Folder</button>
93                 </td>
94             </tr>
96             <tr>
97                 <td><b>Created by</b></td>
98                 <td>
99                     <div id="trial_owner">
100 % if ($trial_owner) {
101 %  print "$trial_owner";
102 % } else {
103 %  print "<span class='text-danger'>[N/A]</span>";
104 % }
105                     </div>
106                 </td>
107             </tr>
108         </table>
110     </div>
111     <div class="col-sm-4">
112         <div class="well well-sm">
113             <& /util/barcode.mas, identifier => "$identifier_prefix"."$trial_id", trial_id=> "$trial_id", trial_name=> "$trial_name", format=>"trial_qrcode"  &>
114         </div>
115     </div>
116 </div>
117 <button class="btn btn-sm btn-primary" style="margin:3px" id="new_transformation_identifier_link">Add Transformation ID</button>
119 <& /transformation/add_transformation_identifier_dialog.mas, trial_id => $trial_id &>
121 <script>
123 jQuery(document).ready(function($) {
125     jQuery('#new_transformation_identifier_link').click(function() {
127         jQuery("#add_transformation_identifier_dialog").modal("show");
129     });
133 </script>