Code

Some more checks
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Feb 2006 14:37:46 +0000 (14:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Feb 2006 14:37:46 +0000 (14:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2735 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiScript.inc

index 671ace2235356a2060dafde04510d2cb9556d8be..c742733df73ac0785afac5e9552b623229b0df2a 100644 (file)
@@ -205,13 +205,21 @@ class faiScript extends plugin
     $divlist = new divSelectBox("FAIscripts");
     $img_edit = "<input type='image' src='images/edit.png'      name='editscript_%s'    title='"._("edit")."' alt='"._("edit")."'>";
     $img_remo = "<input type='image' src='images/edittrash.png' name='deletescript_%s'  title='"._("delete")."' alt='"._("delete")."'>";
+
     foreach($this->getList(true) as $key => $name){
+      
+      if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new")){
+        $down =_("New object");
+      }else{
+        $down = "<a href='getFAIscript.php?id=".base64_encode($name['dn'])."' target='_blank'>"._("download")."</a>"; 
+      } 
+
       $divlist->AddEntry(array( array("string"=>$name['name']),
-                                array("string"=>"<a href='getFAIscript.php?id=".base64_encode($name['dn'])."' target='_blank'>download</a>"),
-                                array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),"attach"=>"style='border-right: 0px;width:40px;'")));
+                                array("string"=>$down),
+                                array("string"=>str_replace("%s",base64_encode($key),$img_edit.$img_remo),
+                                      "attach"=>"style='border-right: 0px;width:40px;'")));
     }
     $smarty->assign("Entry_divlist",$divlist->DrawList());
-
     /* Divlist creation complete
      */