summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 263a0da)
raw | patch | inline | side by side (parent: 263a0da)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 May 2008 07:39:06 +0000 (07:39 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 19 May 2008 07:39:06 +0000 (07:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10945 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_divListSystem.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc
index 0bba4f6d576ceb9a5245945ba6f7eb4384e4ccf0..9b4f5f00a05af37210fa7bbadd00fa816b2edd9f 100644 (file)
$this->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>" ","attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>_("Systems")." / "._("Department")));
+
+ /* Add header for selected FAI release, if fai is active */
+ if($this->parent->fai_activated){
+ $this->AddHeader(array("string"=>_("Release"),"attach"=>"style='width:100px;'"));
+ }
+
$this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'"));
/* Text ,Value ,Name ,Is selected */
}
$cnts[$type] ++;
-
/* Create each field */
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
- "attach" => "style='width:20px;'");
+ "attach" => "style='width:20px;'");
+ $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:".$action_col_size."px;border-right:0px;text-align:right;'");
+
+ if($this->parent->fai_activated){
+
+ $release =" ";
+ if(isset($val['FAIclass'][0]) && preg_match("/:/",$val['FAIclass'][0])){
+ $release = preg_replace("/^.*:/","",$val['FAIclass'][0]);
+ }
- $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:".$action_col_size."px;border-right:0px;text-align:right;'");
- $this->AddElement( array($field0,$field1,$field2,$field3));
+ $field2a = array("string" => $release,"attach"=>"style='width:100px;'");
+ $this->AddElement( array($field0,$field1,$field2,$field2a,$field3));
+ }else{
+ $this->AddElement( array($field0,$field1,$field2,$field3));
+ }
}
/* Create summary string for list footer */
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index c30b3aa8b62f1e41af81e8d13cc1a5d0df5f3234..7bb89b751e7faafd685b3211736f886d89ae3147 100644 (file)
var $dns = array();
var $system_activation_object = ""; // The object to activate (NewDevice)
+ var $fai_activated = FALSE;
function systems (&$config, $ui)
{
$this->config= $config;
$this->ui= $ui;
+ /* Add FAIstate to attributes if FAI is activated */
+ $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
+ if(!empty($tmp)){
+ $this->fai_activated = TRUE;
+ }
+
/* Creat dialog object */
$this->DivListSystem = new divListSystem($this->config,$this);
if($this->config->search("ArpNewDevice","CLASS",array('tabs')) != ""){
$this->arp_handling_active = TRUE;
}
-
}
/* Add departments if subsearch is disabled */
if(!$this->DivListSystem->SubSearch){
- $this->DivListSystem->AddDepartments($this->DivListSystem->selectedBase,3,1);
+
+ /* Add FAIstate to attributes if FAI is activated */
+ if($this->fai_activated){
+ $this->DivListSystem->AddDepartments($this->DivListSystem->selectedBase,4,1);
+ }else{
+ $this->DivListSystem->AddDepartments($this->DivListSystem->selectedBase,3,1);
+ }
}
$this->reload();
$this->DivListSystem->setEntries($this->terminals);
}
/* Attributes to fetch */
- $sys_attrs = array("cn", "description", "macAddress", "objectClass", "sambaDomainName","gotoMode");
+ $sys_attrs = array("cn", "description", "macAddress", "objectClass", "sambaDomainName","gotoMode","FAIclass");
$sys_categories = array("terminal", "workstation", "server", "phone" ,"printer","incoming");
/* Add FAIstate to attributes if FAI is activated */