X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_divListSystem.inc;h=c98116dd11c42da09fd851b668e3b9c734e3c183;hb=c30fdf675865a86365275ed6fb9f8a0cc06e41af;hp=b58169262f276e3faa9c0676a3cad729f78edfcb;hpb=543a94fb8acb261e60a144b969ee50d169592fbc;p=gosa.git diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index b58169262..c98116dd1 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -6,6 +6,7 @@ class divListSystem extends MultiSelectWindow /* Current base */ var $selectedBase = ""; var $departments = array(); + var $do_iso = FALSE; /* Regex */ var $Regex = "*"; @@ -33,6 +34,10 @@ class divListSystem extends MultiSelectWindow $this->parent = $parent; $this->ui = get_userinfo(); + if (search_config($config->data['TABS'], "workgeneric", "ISOCMD")){ + $this->do_iso= TRUE; + } + /* Set list strings */ $this->SetTitle(_("List of systems")); $this->SetSummary(_("List of systems")); @@ -50,7 +55,7 @@ class divListSystem extends MultiSelectWindow /* set Page header */ $this->AddHeader(array("string"=>" ","attach"=>"style='width:20px;'")); $this->AddHeader(array("string"=>_("System / Department"))); - $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:60px;border-right:0px;'")); + $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:70px;border-right:0px;'")); /* Text ,Value ,Name ,Is selected */ $this->AddCheckBox("ShowServers", _("Select to see servers"), _("Show servers"), true); @@ -63,11 +68,11 @@ class divListSystem extends MultiSelectWindow /* Add SubSearch checkbox */ $this->AddCheckBox(SEPERATOR); - $this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false); + $this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Search in subtrees"), false); /* Name ,Text ,Default , Connect with alphabet */ $this->AddRegex ("Regex", _("Display systems matching"),"*" , true); - $this->AddRegex ("UserRegex", _("Display systems of user"), "*" , false, "images/search_user.png"); + /*$this->AddRegex ("UserRegex", _("Display systems of user"), "*" , false, "images/search_user.png");*/ } function GenHeader() @@ -83,16 +88,10 @@ class divListSystem extends MultiSelectWindow $options.= ""; } } - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - " ". " ". @@ -132,14 +131,20 @@ class divListSystem extends MultiSelectWindow $img10 = "L"; $empty =" "; - $action= ""; - $action.= ""; - // User and Template Images $editlink = "%s"; // Test Every Entry and generate divlist Array foreach($terminals as $key => $val){ + + $acl= get_permissions ($val['dn'], $this->ui->subtreeACL); + $acl= get_module_permission($acl, "terminal", $val['dn']); + + $action= ""; + if(chkacl($acl,"delete") ==""){ + $action.= ""; + } + /* Generate picture list, which is currently disabled */ if(in_array("goCupsServer" ,$val['objectClass'])) $cups = $img1; else $cups =$empty; @@ -169,20 +174,25 @@ class divListSystem extends MultiSelectWindow $display= $val["cn"][0].$dsc; } - if((in_array("gotoTerminal",$val['objectClass']))||(in_array("gotoWorkstation",$val['objectClass']))){ + if(((in_array("gotoTerminal",$val['objectClass']))||(in_array("gotoWorkstation",$val['objectClass']))) && chkacl($acl,"password") == ""){ $action2 = ""; }else{ $action2 = ""; } + if($this->do_iso && in_array("gotoWorkstation",$val['objectClass'])){ + $action2= "".$action2; + } + + /* Add Message generated by mangement->reload*/ if(isset($val['message'])){ - $display.= " (".$val['message']." '".$this->config->idepartments[$_SESSION['CurrentMainBase']]."' )"; + $display.= " (".$val['message'].")"; } $img = $this->parent->convert_list($val); $field1 = array("string" => sprintf($img['img'],$val['dn']), "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); - $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action), "attach" => "style='width:60px;border-right:0px;text-align:right;'"); + $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action), "attach" => "style='width:70px;border-right:0px;text-align:right;'"); $this->AddElement( array($field1,$field2,$field3)); }