Code

Add an empty line to an empty list
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Nov 2005 10:06:42 +0000 (10:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Nov 2005 10:06:42 +0000 (10:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1872 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackageEntry.inc

index c13f153507d16da770217f8cd8cf2e5324ae940e..6f7acc8b6829930824d67633dfa44e13c04a8798 100644 (file)
@@ -109,6 +109,7 @@ class faiPackageEntry extends plugin
       }
     }
 
+    $cnt = 0; 
     foreach($pkgs as $pkg){
       if((preg_match("/^".str_replace("*",".*",$this->searchStrPKG)."/i",$pkg[0]))||
          (preg_match("/^".str_replace("*",".*",$this->searchStrPKG)."/i",$pkg[3]))){
@@ -118,6 +119,7 @@ class faiPackageEntry extends plugin
           }else{
             $check = "";
           }
+          $cnt ++ ;
           $chkbox = "<input type='checkbox' value='1' name='use_".base64_encode($pkg[0])."' ".$check." onclick='document.mainform.submit()'>
                    <input type='hidden' value='1' name='wasonpage_".base64_encode($pkg[0])."'>";
           $divlist->AddEntry(array(array("string"=>$chkbox),
@@ -128,6 +130,15 @@ class faiPackageEntry extends plugin
       }
     }
 
+    /* Add an empty line if list is empty */
+    if($cnt ==0){
+      $divlist->AddEntry(array(array("string"=>"&nbsp;"),
+            array("string"=>"&nbsp;"),
+            array("string"=>"&nbsp;"),
+            array("string"=>"&nbsp;","attach"=>"style='border-right:0px'")));
+    }
+
+
     $_SESSION['searchStrPKG']       = $this->searchStrPKG;
     $smarty->assign("CHKS"          , $CHKS);
     $smarty->assign("searchStrPKG"  , $this->searchStrPKG);