From 252faa4f0f57a12ccdcf2e9a95bfc5ff7d106538 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Jan 2010 09:02:00 +0000 Subject: [PATCH] Enabled system creation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15147 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_systemManagement.inc | 38 +++++++++++++++++++ .../systems/admin/systems/system-list.xml | 14 +++---- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 3eae80e02..a7e9df0de 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -115,6 +115,15 @@ class systemManagement extends management $this->registerAction("systemTypeChosen","systemTypeChosen"); $this->registerAction("handleActivationQueue","handleActivationQueue"); + $this->registerAction("new_goServer", "newEntry"); + $this->registerAction("new_gotoWorkstation", "newEntry"); + $this->registerAction("new_gotoTerminal", "newEntry"); + $this->registerAction("new_gotoPrinter", "newEntry"); + $this->registerAction("new_goFonHardware", "newEntry"); + $this->registerAction("new_ieee802Device", "newEntry"); + $this->registerAction("new_FAKE_OC_OpsiHost", "newEntry"); + + // Add copy&paste and snapshot handler. if ($this->config->boolValueIsTrue("main", "copyPaste")){ $this->cpHandler = new CopyPasteHandler($this->config); @@ -491,6 +500,27 @@ class systemManagement extends management } + /*! \brief Edit the selected system type. + * + * @param String 'action' The name of the action which was the used as trigger. + * @param Array 'target' A list of object dns, which should be affected by this method. + * @param Array 'all' A combination of both 'action' and 'target'. + */ + function newEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") + { + $tInfo = $this->getObjectDefinitions(); + $info = preg_replace("/^new_/","",$action); + if(!isset($tInfo[$info])){ + trigger_error("Unknown action type '".$action."' cant create a new system!"); + }else{ + management::newEntry($action,$target,$all, + $tInfo[$info]['tabClass'], + $tInfo[$info]['tabDesc'], + $tInfo[$info]['aclCategory']); + } + } + + function activateMultiple($action,$target) { $headpage = $this->getHeadpage(); @@ -797,6 +827,14 @@ class systemManagement extends management if(isset($_GET['PerformIsoCreation'])) $action['action'] = "performIsoCreation"; if(isset($_POST['SystemTypeAborted'])) $action['action'] = "cancel"; + if(isset($_POST['new_goServer'])) $action['action'] = "new_goServer"; + if(isset($_POST['new_gotoWorkstation'])) $action['action'] = "new_gotoWorkstation"; + if(isset($_POST['new_gotoTerminal'])) $action['action'] = "new_gotoTerminal"; + if(isset($_POST['new_gotoPrinter'])) $action['action'] = "new_gotoPrinter"; + if(isset($_POST['new_goFonHardware'])) $action['action'] = "new_goFonHardware"; + if(isset($_POST['new_ieee802Device'])) $action['action'] = "new_ieee802Device"; + if(isset($_POST['new_FAKE_OC_OpsiHost'])) $action['action'] = "new_FAKE_OC_OpsiHost"; + if(!is_object($this->tabObject) && !is_object($this->dialogObject)){ if(count($this->activationQueue)) $action['action'] = "handleActivationQueue"; } diff --git a/gosa-plugins/systems/admin/systems/system-list.xml b/gosa-plugins/systems/admin/systems/system-list.xml index bb7f8194a..bc34465ad 100644 --- a/gosa-plugins/systems/admin/systems/system-list.xml +++ b/gosa-plugins/systems/admin/systems/system-list.xml @@ -197,7 +197,7 @@ - new_server + new_goServer entry plugins/systems/images/select_server.png @@ -205,7 +205,7 @@ - new_workstation + new_gotoWorkstation entry plugins/systems/images/select_workstation.png @@ -213,7 +213,7 @@ - new_terminal + new_gotoTerminal entry plugins/systems/images/select_terminal.png @@ -221,7 +221,7 @@ - new_printer + new_gotoPrinter entry plugins/systems/images/select_printer.png @@ -229,7 +229,7 @@ - new_phone + new_goFonHardware entry plugins/systems/images/select_phone.png @@ -237,7 +237,7 @@ - new_component + new_ieee802Device entry plugins/systems/images/select_component.png @@ -245,7 +245,7 @@ - new_opsi_client + new_FAKE_OC_OpsiHost entry plugins/systems/images/select_winstation.png -- 2.30.2