Alexander Nicolaysen Sørnes : category: Show more output when viewing empty categories
Alexander Nicolaysen Sørnes
asornes at winehq.org
Thu Aug 6 05:57:03 CDT 2009
Module: appdb
Branch: master
Commit: 55e325dc80d5547bf4ab9552f2f21e152ca81696
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=55e325dc80d5547bf4ab9552f2f21e152ca81696
Author: Alexander Nicolaysen Sørnes <alexander at linux-xqqm.(none)>
Date: Wed Aug 5 19:57:54 2009 +0200
category: Show more output when viewing empty categories
---
include/category.php | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/category.php b/include/category.php
index 8b7713e..76eccc5 100644
--- a/include/category.php
+++ b/include/category.php
@@ -405,12 +405,13 @@ class Category {
echo "</p>\n";
}
+ // Output sub-categories
if($aSubs)
{
echo html_frame_start("",'98%','',2);
echo "<p><b>Category: ". $sCatFullPath ."</b><br>\n";
echo html_frame_end();
-
+
echo html_frame_start("","98%","",0);
$oTable = new Table();
@@ -467,7 +468,6 @@ class Category {
}
-
// list applications in this category
$aApps = $this->aApplicationsIds;
if($aApps)
@@ -525,6 +525,18 @@ class Category {
echo html_frame_end( count($aApps) . " applications in this category");
}
+
+ // Show a message if this category is empty
+ if(!$aApps && !$aSubs)
+ {
+ echo html_frame_start("",'98%','',2);
+ echo "<p><b>Category: ". $sCatFullPath ."</b><br>\n";
+ echo html_frame_end();
+
+ echo html_frame_start('','90%','',2);
+ echo 'This category has no sub-categories or applications';
+ echo html_frame_end();
+ }
}
}
More information about the wine-cvs
mailing list