From: hickert Date: Wed, 31 Oct 2007 08:31:28 +0000 (+0000) Subject: Fixed upper-lowercase problem of class names used when creating a new component. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0998ac83585ce7d3179d8dc32816d8b05471a7f5;p=gosa.git Fixed upper-lowercase problem of class names used when creating a new component. New layer menu allows creating of new systems now git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7693 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/contrib/gosa.conf b/contrib/gosa.conf index f4cdc3b87..999ecd1f1 100644 --- a/contrib/gosa.conf +++ b/contrib/gosa.conf @@ -235,7 +235,7 @@ - + diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc index 4306494b3..251139852 100644 --- a/plugins/admin/systems/class_componentGeneric.inc +++ b/plugins/admin/systems/class_componentGeneric.inc @@ -23,7 +23,7 @@ class componentGeneric extends plugin var $netConfigDNS; var $view_logged = FALSE; - function componentgeneric (&$config, $dn= NULL, $parent= NULL) + function componentGeneric (&$config, $dn= NULL, $parent= NULL) { plugin::plugin ($config, $dn, $parent); diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 71e0e9426..353956223 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -162,13 +162,6 @@ class divListSystem extends MultiSelectWindow /* Must we add an additional seperator */ $add_sep = false; - /* Get copy & paste icon */ - $Copy_Paste =""; - if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){ - $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon(); - $addsep = true; - } - /* Add default header */ $listhead = MultiSelectWindow::get_default_header(); @@ -178,80 +171,63 @@ class divListSystem extends MultiSelectWindow $add_sep = true; } - /* Assign copy & paste icons */ - $listhead.= $Copy_Paste; + /* Add base selection */ + $listhead .= _("Base")."  ". + "  "; /* Handle create icons */ + $l = "?plug=".$_GET['plug']."&act="; + $s = ".|"._("Actions")."|\n"; + $s.= "..|". + " "._("Create")."|\n"; if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"terminal/termgeneric"))){ - $add_sep = true; - $listhead .= " "; + $s.= "...|". + " "._("Terminal")."|".$l."newsystem_terminal|\n"; } - if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"workstation/workgeneric"))){ - $add_sep = true; - $listhead .= " "; - } - - if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"server/servgeneric"))){ - $add_sep = true; - $listhead .= " "; + $s.= "...|". + " "._("Workstation")."|".$l."newsystem_workstation|\n"; } - - if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"printer/printgeneric"))){ - $add_sep = true; - $listhead .= " "; + if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"workstation/workgeneric"))){ + $s.= "...|". + " "._("Server")."|".$l."newsystem_server|\n"; } - if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"phone/phoneGeneric"))){ - $add_sep = true; - $listhead .= " "; + $s.= "...|". + " "._("Phone")."|".$l."newsystem_phone|\n"; } - - if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"component/componentGeneric"))){ - $add_sep = true; - $listhead .= " "; + if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"printer/printgeneric"))){ + $s.= "...|". + " "._("Printer")."|".$l."newsystem_printer|\n"; } - - /* Should we add a seperator ? */ - if($add_sep){ - $listhead .= " "; + if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"component/componentGeneric"))){ + $s.= "...|". + " "._("Component")."|".$l."newsystem_component|\n"; } - - /* Add base selection */ - $listhead .= _("Base")."  ". - "  "; - - /* Multiple options */ - $listhead .= "  "; + $s.= "..|". + " "._("Remove all")."|".$l."remvove_multiple|\n"; /* Add multiple copy & cut icons */ if(is_object($this->parent->CopyPasteHandler)){ - $listhead .= "  "; - $listhead .= "  "; + $s.= "..|---|\n"; + $s.= "..|". + " "._("Copy all")."|".$l."multiple_copy_systems|\n"; + $s.= "..|". + " "._("Cut all")."|".$l."multiple_cut_systems|\n"; + } + + /* Get copy & paste icon */ + $Copy_Paste =""; + if(preg_match("/(c.*w|w.*c)/",$all_module_acls) && $this->parent->CopyPasteHandler){ + if($this->parent->CopyPasteHandler->entries_queued()){ + $img = ""; + $s.="..|".$img." "._("Paste")."|\n"; + }else{ + $img = ""; + $s.="..|".$img." "._("Paste")."\n"; + } } - - $s= ".|"._("Actions")."|\n"; - $s.= "..| "._("Create")."|\n"; - $s.= "...| "._("Terminal")."|\n"; - $s.= "...| "._("Workstation")."|\n"; - $s.= "...| "._("Server")."|\n"; - $s.= "...| "._("Phone")."|\n"; - $s.= "...| "._("Printer")."|\n"; - $s.= "...| "._("Component")."|\n"; - $s.= "..| "._("Remove all")."|\n"; - $s.= "..|---|\n"; - $s.= "..| "._("Copy all")."|\n"; - $s.= "..| "._("Cut all")."|\n"; $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 1685af29c..268e5b33e 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -104,8 +104,7 @@ class systems extends plugin $s_entry = preg_replace("/^cut_/i","",$key); } } - - + /* Incoming handling * If someone made a systemtype and ogroup selection * Display the new requested entry type ... servtab in case of server and so on. @@ -125,6 +124,11 @@ class systems extends plugin $s_action ="edit"; $s_entry = $_GET['id']; } + /* Create options */ + if(isset($_GET['act']) && preg_match("/^newsystem_/",$_GET['act'])){ + $s_action = "newsystem"; + $s_entry = preg_replace("/^newsystem_/","",$_GET['act']); + } /* Check for exeeded sizelimit */ if (($message= check_sizelimit()) != ""){ @@ -263,13 +267,14 @@ class systems extends plugin } $this->dn= "new"; } + $tabs = array( "terminal" => array("CLASS"=>"TERMTABS", "TABNAME"=>"termgeneric", "TABCLASS" =>"termtabs", "ACL"=> "terminal"), "workstation" => array("CLASS"=>"WORKTABS", "TABNAME"=>"workgeneric", "TABCLASS" =>"worktabs", "ACL"=> "workstation"), "server" => array("CLASS"=>"SERVTABS", "TABNAME"=>"servgeneric", "TABCLASS" =>"servtabs", "ACL"=> "server"), "printer" => array("CLASS"=>"PRINTTABS", "TABNAME"=>"printgeneric", "TABCLASS" =>"printtabs", "ACL"=> "printer"), "phone" => array("CLASS"=>"PHONETABS", "TABNAME"=>"phoneGeneric", "TABCLASS" =>"phonetabs", "ACL"=> "phone"), - "component" => array("CLASS"=>"COMPONENTTABS","TABNAME"=>"componentgeneric","TABCLASS" =>"componenttabs", "ACL"=> "component")); + "component" => array("CLASS"=>"COMPONENTTABS","TABNAME"=>"componentGeneric","TABCLASS" =>"componenttabs", "ACL"=> "component")); if(isset($tabs[$sw])){ $class = $tabs[$sw]["CLASS"]; @@ -1173,7 +1178,7 @@ class systems extends plugin "TABCLASS" =>"printtabs", "ACL" =>"printer"), "phone" => array( "CLASS" =>"PHONETABS", "TABNAME" =>"phoneGeneric", "TABCLASS" =>"phonetabs", "ACL" =>"phone"), - "component" => array( "CLASS" =>"COMPONENTTABS","TABNAME" =>"componentgeneric", + "component" => array( "CLASS" =>"COMPONENTTABS","TABNAME" =>"componentGeneric", "TABCLASS" =>"componenttabs","ACL" =>"component")); /* Add a single entry to queue */ diff --git a/plugins/admin/systems/tabs_component.inc b/plugins/admin/systems/tabs_component.inc index 3d7d53dde..941203e24 100644 --- a/plugins/admin/systems/tabs_component.inc +++ b/plugins/admin/systems/tabs_component.inc @@ -21,7 +21,7 @@ class componenttabs extends tabs { /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $baseobject= $this->by_object['componentgeneric']; + $baseobject= $this->by_object['componentGeneric']; $this->dn= "cn=$baseobject->cn,ou=netdevices,ou=systems,".$baseobject->base; $baseobject->dn= $this->dn;