Update of /cvsroot/fink/web/pdb
In directory sc8-pr-cvs17:/tmp/cvs-serv27384/web/pdb

Modified Files:
      Tag: redesign_pdb
        package.php 
Log Message:
Possibility to mark distributions as unsupported in the db. They then will
be shown in gray in package.php


Index: package.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/package.php,v
retrieving revision 1.43.2.29
retrieving revision 1.43.2.30
diff -u -d -r1.43.2.29 -r1.43.2.30
--- package.php 24 Sep 2007 15:55:58 -0000      1.43.2.29
+++ package.php 26 Sep 2007 16:52:50 -0000      1.43.2.30
@@ -114,9 +114,9 @@
 <?
 
 
- function avail_td($text, $extras='') {
+ function avail_td($text, $extras='', $extra_div_style='') {
    print '<td align="center" valign="top" ' . $extras . '>';
-   print '<div style="white-space:nowrap">' . $text . '</div>';
+   print '<div style="white-space:nowrap; ' . $extra_div_style . ' ">' . $text 
. '</div>';
    print '</td>';
  }
  
@@ -186,6 +186,7 @@
  }
  $color_count = 0;
  $last_identifier = '';
+ $has_unsupported_dists = false;
  while ($dist_row = mysql_fetch_array($qdist)) {
    if ($last_identifier != $dist_row['identifier'])
      $color_count++;
@@ -235,7 +236,13 @@
    }
    // System
    print "<tr $row_color>";
-   avail_td(nl2br($dist_row['description']),'');
+   if ($dist_row['supported']) {
+     avail_td(nl2br($dist_row['description']));
+   }
+   else {
+     avail_td(nl2br($dist_row['description'] . ' *'), '', 'color:gray; ');
+     $has_unsupported_dists = true;
+   }
 
     // bindist
     if ($has_bindist) {
@@ -368,5 +375,10 @@
 
 
 <?
+if ($has_unsupported_dists) {
+?>
+<p>(*) = Unsupported distribution.</p>
+<?
+}
 include "footer.inc";
 ?>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to