refactor phenotypes brapi calls
[sgn.git] / mason / breeders_toolbox / cross / crossingtrial_details.mas
blob88590f00433c00f09cb304fc2bda3315fde99e84
1 <%args>
2 $trial_id
3 $trial_name
4 $breeding_program_name
5 $location_name
6 $year
7 $planting_date
8 $harvest_date
9 $trial_description
10 $folder_name
11 $folder_id
12 $identifier_prefix
13 </%args>
15 <div class="row">
16     <div class="col-sm-8">
18         <table class="table table-hover table-bordered" >
20             <tr>
21                 <td><b>Crossing Experiment Name</b></td>
22                 <td>
23                     <div id="trial_name">
24 % if ($trial_name) {
25 %   print "$trial_name";
26 % } else {
27 %   print "<span class='text-danger'>[No Crossing Experiment Name]</span>";
28 % }
29                     </div>
30                 </td>
31             </tr>
33             <tr>
34                 <td><b>Breeding Program </b></td>
35                 <td>
36                     <span id="breeding_program">
37 % if ($breeding_program_name) {
38 %  print "$breeding_program_name";
39 % }
40 % else {
41 %  print "<span class='text-danger'>[No Breeding Program]</span>";
42 % }
43                     </span>
44                 </td>
45             </tr>
47             <tr>
48                 <td><b>Location</b></td>
49                 <td>
50                     <div id="trial_location">
51 % if ($location_name) {
52 %  print "$location_name";
53 % } else {
54 %  print "<span class='text-danger'>[No Location]</span>";
55 % }
56                     </div>
57                 </td>
58             </tr>
60             <tr>
61                 <td><b>Year</b></td>
62                 <td>
63                     <div id="trial_year">
64 % if ($year) {
65 %  print "$year";
66 % } else {
67 %  print "<span class='text-danger'>[No Year]</span>";
68 % }
69                     </div>
70                 </td>
71             </tr>
73             <tr>
74                 <td><b>Planting Date</b></td>
75                 <td>
76                     <div id="planting_date">
77 % if ($planting_date) {
78 <a href="/breeders/trial/<% $trial_id %>?currentDate=<% $planting_date %>" ><% $planting_date %></a>
79 % } else {
80 %  print "<span class='text-danger'>[No Planting Date]</span>";
81 % }
82                     </div>
83                 </td>
84             </tr>
86             <tr>
87                 <td><b>Harvest Date</b></td>
88                 <td>
89                     <div id="harvest_date">
90 % if ($harvest_date) {
91 <a href="/breeders/trial/<% $trial_id %>?currentDate=<% $harvest_date %>" ><% $harvest_date %></a>
92 % } else {
93 %  print "<span class='text-danger'>[No Harvest Date]</span>";
94 % }
95                     </div>
96                 </td>
97             </tr>
99             <tr><td><b>Description</b></td>
100                 <td>
101                     <div id="trial_description">
102 % if ($trial_description) {
103 %  print "$trial_description";
104 % } else {
105 %  print "<span class='text-danger'>[No Description]</span>";
106 % }
107                     </div>
108                 </td>
109             </tr>
111             <tr>
112                 <td><b>Folder</b></td>
113                 <td>
114                     <span id="trial_folder_div"><a href="/folder/<% $folder_id %>"><% $folder_name %></a></span>
115                     <br/><br/>
116                     <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>
117                 </td>
118             </tr>
120         </table>
122     </div>
123     <div class="col-sm-4">
124         <div class="well well-sm">
125             <& /util/barcode.mas, identifier => "$identifier_prefix"."$trial_id", trial_id=> "$trial_id", trial_name=> "$trial_name", format=>"trial_qrcode"  &>
126         </div>
127     </div>
128 </div>