Changed trials-in-common page to use a single database query to get analyses. Changed...
[sgn.git] / mason / analyses / model_detail_page_section.mas
blobaf40c9a7c10cf7912a301cbeca5502bed363dc17
1 <%args>
2 $model_id => undef
3 $model_name => undef
4 $model_description => undef
5 $model_properties => {}
6 $model_file_ids => {}
7 $model_type_name => undef
8 $model_files => {}
9 $identifier_prefix
10 </%args>
12 <div class="row">
13     <div class="col-sm-8">
15         <table class="table table-hover table-bordered" >
17             <tr>
18                 <td><b>Model Name</b></td>
19                 <td>
20                     <div id="model_name">
21 % if ($model_name) {
22 %   print "<a href=\"/analyses_model/$model_id\">$model_name</a>";
23 % } else {
24 %   print "<span class='text-danger'>[No Model Name]</span>";
25 % }
26                     </div>
27                 </td>
28             </tr>
30             <tr><td><b>Description</b></td>
31                 <td>
32                     <div id="model_description">
33 % if ($model_description) {
34 %  print "$model_description";
35 % } else {
36 %  print "<span class='text-danger'>[No Description]</span>";
37 % }
38                     </div>
39                 </td>
40             </tr>
42             <tr>
43                 <td><b>Model Type</b></td>
44                 <td>
45                     <div id="model_type">
46 %  print "$model_type_name";
47                     </div>
48                 </td>
49             </tr>
51             <tr>
52                 <td><b>Model Properties</b></td>
53                 <td>
54                     <div id="model_properties">
55 %  my $model_properties_string = '';
56 %  while (my ($key, $val) = each %$model_properties) {
57 %        $model_properties_string .= "$key : $val<br/>";
58 %  }
59 %  print "$model_properties_string";
60                     </div>
61                 </td>
62             </tr>
64             <tr>
65                 <td><b>Model Files</b></td>
66                 <td>
67                     <div id="model_files">
68 %  my $model_files_string = '';
69 %  while (my ($key, $val) = each %$model_file_ids) {
70 %   if ($key) {
71 %       $model_files_string .= "$val : <a href=\"/breeders/phenotyping/download/$key\">Download</a><br/>";
72 %   }
73 %  }
74 %  print "$model_files_string";
75                     </div>
76                 </td>
77             </tr>
79         </table>
81     </div>
82     <div class="col-sm-4">
83         <div class="well well-sm">
84             <& /util/barcode.mas, identifier => "$identifier_prefix"."$model_id", trial_id=> "$model_id", trial_name=> "$model_name", format=>"trial_qrcode"  &>
85         </div>
86     </div>
87 </div>