From 830ad670c387792b74860afcd45481e855f8e528 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 May 2011 11:34:05 +0000 Subject: [PATCH] Added config mangemetn tab wich allows to assign config items to a device later. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20835 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/Device/DeviceConfig.tpl | 1 + .../goto/Device/class_DeviceConfig.inc | 99 +++++++++++++++++++ .../goto/Device/class_InstallRecipe.inc | 8 +- 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl create mode 100644 gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc diff --git a/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl b/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl @@ -0,0 +1 @@ +test diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc new file mode 100644 index 000000000..f11df172c --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc @@ -0,0 +1,99 @@ +is_account = $this->initially_was_account = FALSE; + + $this->_device = &$parent; + $this->deviceUUID = $parent->deviceUUID; + } + + function check() + { + } + + + function execute() + { + // Log account access + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + new log("view","Device/".get_class($this),$this->dn); + } + + /*************** + Handle account state + ***************/ + + // Allow to add or remove the distribution list extension + if(isset($_POST['modify_state'])){ + if($this->is_account && $this->acl_is_removeable()){ + $this->is_account= FALSE; + }elseif(!$this->is_account && $this->acl_is_createable()){ + $this->is_account= TRUE; + } + } + + // Show account status-changer + $display = ""; + if ($this->parent !== NULL){ + if ($this->is_account){ + $display= $this->show_disable_header(_("Remove config mangement"), + msgPool::featuresEnabled(_("Config management"))); + } else { + $display= $this->show_enable_header(_("Add Config management"), + msgPool::featuresDisabled(_("Config management"))); + return ($display); + } + } + + $smarty = get_smarty(); + return($display.$smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); + } + + + function save_object() + { + } + + + function save() + { + } + + + function remove_from_parent() + { + } + + + static function plInfo() + { + return (array( + "plShortName" => _("Device"), + "plDescription" => _("Registered device"), + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 1, + "plSection" => array("administration"), + "plCategory" => array("Device"), + "plProvidedAcls" => array( + ))); + } +} +?> diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc index 9baaa3502..7f8b7d67c 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc @@ -309,11 +309,11 @@ class InstallRecipe extends plugin $display = ""; if ($this->parent !== NULL){ if ($this->is_account){ - $display= $this->show_disable_header(_("Remove install profile"), - msgPool::featuresEnabled(_("Install profile"))); + $display= $this->show_disable_header(_("Remove base installation"), + msgPool::featuresEnabled(_("Base installation"))); } else { - $display= $this->show_enable_header(_("Add install profile"), - msgPool::featuresDisabled(_("Install profile"))); + $display= $this->show_enable_header(_("Add base installation"), + msgPool::featuresDisabled(_("Base installation"))); return ($display); } } -- 2.30.2