fixed project description
[sgn.git] / mason / transformation / transformation_project_details.mas
blob6985913854276ba0e5e6b6af54703295925b29ce
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 $tracking_project_id
15 $autogenerated_name_prefixes => ()
16 $prefix
17 </%args>
20 <div class="row">
21     <div class="col-sm-8">
23         <table class="table table-hover table-bordered" >
25             <tr>
26                 <td><b>Transformation Project Name</b></td>
27                 <td>
28                     <div id="trial_name">
29 % if ($trial_name) {
30 %   print "$trial_name";
31 % } else {
32 %   print "<span class='text-danger'>[No Transformation Project Name]</span>";
33 % }
34                     </div>
35                 </td>
36             </tr>
38             <tr>
39                 <td><b>Breeding Program </b></td>
40                 <td>
41                     <span id="breeding_program">
42 % if ($breeding_program_name) {
43 %  print "$breeding_program_name";
44 % }
45 % else {
46 %  print "<span class='text-danger'>[No Breeding Program]</span>";
47 % }
48                     </span>
49                 </td>
50             </tr>
52             <tr>
53                 <td><b>Location</b></td>
54                 <td>
55                     <div id="trial_location">
56 % if ($location_name) {
57 %  print "$location_name ( $country_name )";
58 % } else {
59 %  print "<span class='text-danger'>[No Location]</span>";
60 % }
61                     </div>
62                 </td>
63             </tr>
65             <tr>
66                 <td><b>Year</b></td>
67                 <td>
68                     <div id="trial_year">
69 % if ($year) {
70 %  print "$year";
71 % } else {
72 %  print "<span class='text-danger'>[No Year]</span>";
73 % }
74                     </div>
75                 </td>
76             </tr>
78             <tr><td><b>Description</b></td>
79                 <td>
80 % if ($trial_description) {
81 %  print "<div id='trial_description' style='white-space: pre-wrap;'>$trial_description</div>";
82 % } else {
83 %  print "<div id='trial_description'><span class='text-danger'>[No Description]</span></div>";
84 % }
85                 </td>
86             </tr>
88             <tr><td><b>Prefix for Transformants</b></td>
89                 <td>
90                     <div id="name_prefix">
91 % if ($prefix) {
92 %  print "$prefix";
93 % } else {
94 %  print "<span class='text-danger'>[No Prefix]</span>";
95 % }
96                     </div>
97                 </td>
98             </tr>
101             <tr>
102                 <td><b>Folder</b></td>
103                 <td>
104                     <span id="trial_folder_div"><a href="/folder/<% $folder_id %>"><% $folder_name %></a></span>
105                     <br/><br/>
106                     <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>
107                 </td>
108             </tr>
110             <tr>
111                 <td><b>Created by</b></td>
112                 <td>
113                     <div id="trial_owner">
114 % if ($trial_owner) {
115 %  print "$trial_owner";
116 % } else {
117 %  print "<span class='text-danger'>[N/A]</span>";
118 % }
119                     </div>
120                 </td>
121             </tr>
122         </table>
124     </div>
125     <div class="col-sm-4">
126         <div class="well well-sm">
127             <& /util/barcode.mas, identifier => "$identifier_prefix"."$trial_id", trial_id=> "$trial_id", trial_name=> "$trial_name", format=>"trial_qrcode"  &>
128         </div>
129     </div>
130 </div>
131 <button class="btn btn-sm btn-primary" style="margin:3px" id="new_transformation_identifier_link">Add New Transformation ID</button><button class="btn btn-sm btn-primary" style="margin:3px" id="upload_transformation_ids_link">Upload New Transformation IDs</button><button class="btn btn-sm btn-default" style="margin:3px" id="set_autogenerated_names_link">Set Autogenerated Names for Transformants</button>
132 </br>
133 </br>
134 % if ($tracking_project_id) {
135     <td>
136         <a href='/breeders/trial/<%$tracking_project_id%>'><p>Go to Tracking Page</p></a>
137     </td>
138 % }
140 <& /transformation/add_transformation_identifier_dialog.mas, trial_id => $trial_id, breeding_program_name => $breeding_program_name &>
141 <& /transformation/upload_transformation_ids_dialog.mas, trial_id => $trial_id, trial_name => $trial_name &>
142 <& /transformation/set_transformant_names_dialog.mas, trial_id => $trial_id, breeding_program_id => $breeding_program_id, autogenerated_name_prefixes => $autogenerated_name_prefixes, breeding_program_name => $breeding_program_name &>
144 <script>
146 jQuery(document).ready(function($) {
148     jQuery('#new_transformation_identifier_link').click(function() {
149         jQuery("#add_transformation_identifier_dialog").modal("show");
150     });
154 </script>