Merge pull request #5248 from solgenomics/topic/batch_update_trials
[sgn.git] / mason / tracking_activities / activity_project_details.mas
blob323ea81ff83ebf5122ae8e2501bcf519d8e4f2f3
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 $vendor_id
15 $parent_project_id
16 $activity_type
17 </%args>
20 <div class="row">
21     <div class="col-sm-12">
23         <table class="table table-hover table-bordered" >
25             <tr>
26                 <td><b>Tracking Activity 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 Tracking Activity Project Name]</span>";
33 % }
34                     </div>
35                 </td>
36             </tr>
38             <tr>
39                 <td><b>Record Type</b></td>
40                 <td>
41                     <div id="activity_type">
42 % if ($activity_type eq 'transformation') {
43 %     print 'Transformation';
44 % } elsif ($activity_type eq 'tissue_culture') {
45 %     print 'Tissue Culture';
46 % } else {
47 %   print "<span class='text-danger'>[No Record Type]</span>";
48 % }
49                     </div>
50                 </td>
51             </tr>
53             <tr>
54                 <td><b>Breeding Program </b></td>
55                 <td>
56                     <span id="breeding_program">
57 % if ($breeding_program_name) {
58 %  print "$breeding_program_name";
59 % }
60 % else {
61 %  print "<span class='text-danger'>[No Breeding Program]</span>";
62 % }
63                     </span>
64                 </td>
65             </tr>
67             <tr>
68                 <td><b>Location</b></td>
69                 <td>
70                     <div id="trial_location">
71 % if ($location_name && ($location_name ne '[Computation]')) {
72 %  print "$location_name ( $country_name )";
73 % } else {
74 %  print "<span class='text-danger'>[No Location]</span>";
75 % }
76                     </div>
77                 </td>
78             </tr>
80             <tr>
81                 <td><b>Year</b></td>
82                 <td>
83                     <div id="trial_year">
84 % if ($year) {
85 %  print "$year";
86 % } else {
87 %  print "<span class='text-danger'>[No Year]</span>";
88 % }
89                     </div>
90                 </td>
91             </tr>
93             <tr><td><b>Description</b></td>
94                 <td>
95 % if ($trial_description) {
96 %  print "<div id='trial_description' style='white-space: pre-wrap;'>$trial_description</div>";
97 % } else {
98 %  print "<div id='trial_description'><span class='text-danger'>[No Description]</span></div>";
99 % }
100                 </td>
101             </tr>
103             <tr>
104                 <td><b>Folder</b></td>
105                 <td>
106                     <span id="trial_folder_div"><a href="/folder/<% $folder_id %>"><% $folder_name %></a></span>
107                     <br/><br/>
108                     <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>
109                 </td>
110             </tr>
112             <tr>
113                 <td><b>Created by</b></td>
114                 <td>
115                     <div id="trial_owner">
116 % if ($trial_owner) {
117 %  print "$trial_owner";
118 % } else {
119 %  print "<span class='text-danger'>[N/A]</span>";
120 % }
121                     </div>
122                 </td>
123             </tr>
124         </table>
126     </div>
127 </div>
128 % if (!$vendor_id && !$parent_project_id) {
129     <button class="btn btn-sm btn-primary" style="margin:3px" id="generate_identifiers_link">Generate Tracking Identifiers</button>
130 % }
131 </br>
132 </br>
133 % if ($parent_project_id) {
134     <td>
135         <a href='/breeders/trial/<%$parent_project_id%>'><p>Go to Transformation Page</p></a>
136     </td>
137 % }
140 <& /tracking_activities/generate_tracking_identifiers_dialog.mas, trial_name => $trial_name, breeding_program_name => $breeding_program_name &>