category: Show more output when viewing empty categories
This commit is contained in:
committed by
Alexander Nicolaysen Sørnes
parent
304b7e9f00
commit
55e325dc80
@@ -405,12 +405,13 @@ class Category {
|
|||||||
echo "</p>\n";
|
echo "</p>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Output sub-categories
|
||||||
if($aSubs)
|
if($aSubs)
|
||||||
{
|
{
|
||||||
echo html_frame_start("",'98%','',2);
|
echo html_frame_start("",'98%','',2);
|
||||||
echo "<p><b>Category: ". $sCatFullPath ."</b><br>\n";
|
echo "<p><b>Category: ". $sCatFullPath ."</b><br>\n";
|
||||||
echo html_frame_end();
|
echo html_frame_end();
|
||||||
|
|
||||||
echo html_frame_start("","98%","",0);
|
echo html_frame_start("","98%","",0);
|
||||||
|
|
||||||
$oTable = new Table();
|
$oTable = new Table();
|
||||||
@@ -467,7 +468,6 @@ class Category {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// list applications in this category
|
// list applications in this category
|
||||||
$aApps = $this->aApplicationsIds;
|
$aApps = $this->aApplicationsIds;
|
||||||
if($aApps)
|
if($aApps)
|
||||||
@@ -525,6 +525,18 @@ class Category {
|
|||||||
|
|
||||||
echo html_frame_end( count($aApps) . " applications in this 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user