Ticket #874: apps_plan_class.diff
File apps_plan_class.diff, 2.6 KB (added by , 16 years ago) |
---|
-
html/user/apps.php
36 36 37 37 $apps = BoincApp::enum("deprecated=0"); 38 38 39 $using_plan_class = BoincDb::get()->count("app_version", "plan_class != ''"); 40 39 41 foreach ($apps as $app) { 40 42 if ($xml) { 41 43 echo "<application>\n"; 42 44 echo " <name>$app->user_friendly_name</name>\n"; 43 45 } else { 44 echo " 45 <tr><th colspan=4>$app->user_friendly_name</th></tr> 46 <tr> 47 <th>".tra("Platform")."</th> 48 <th>".tra("Version")."</th> 49 <th>".tra("Plan class")."</th> 50 <th>".tra("Installation time")."</th> 51 </tr> 52 "; 46 $span = $using_plan_class?4:3; 47 echo "<tr><th colspan=$span>$app->user_friendly_name</th></tr>"; 48 echo "<tr>"; 49 echo " <th>",tra("Platform"),"</th>"; 50 echo " <th>",tra("Version"),"</th>"; 51 if ($using_plan_class) { 52 echo "<th>",tra("Plan class"),"</th>"; 53 } 54 echo " <th>",tra("Installation time"),"</th>"; 55 echo "</tr>"; 53 56 } 54 57 foreach ($platforms as $platform) { 55 58 $avs = BoincAppVersion::enum( … … 71 74 echo " <platform_short>$platform->name</platform_short>\n"; 72 75 echo " <platform_long>$platform->user_friendly_name</platform_long>\n"; 73 76 echo " <version_num>$av->version_num</version_num>\n"; 74 echo " <plan_class>$av->plan_class</plan_class>\n"; 77 if (!empty($av->plan_class)) { 78 echo " <plan_class>$av->plan_class</plan_class>\n"; 79 } 75 80 echo " <date>$y</date>\n"; 76 81 echo " <date_unix>$av->create_time</date_unix>\n"; 77 82 echo " </version>\n"; … … 79 84 $x = sprintf("%0.2f", $av->version_num/100); 80 85 echo "<tr> 81 86 <td>$platform->user_friendly_name</td> 82 <td>$x</td> 83 <td>$av->plan_class</td> 84 <td>$y</td> 85 </tr> 86 "; 87 <td>$x</td>"; 88 if ($using_plan_class) { 89 echo "<td>$av->plan_class</td>"; 90 } 91 echo "<td>$y</td>"; 92 echo "</tr>"; 87 93 } 88 94 } 89 95 } 90 96 if ($xml) { 91 echo " 97 echo "</application>\n"; 92 98 } 93 99 } 94 100