From: hickert Date: Mon, 16 May 2011 13:45:29 +0000 (+0000) Subject: Prepared Config Item Assignment plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f8e213766b4aec6a945faaea326aedcc84e77866;p=gosa.git Prepared Config Item Assignment plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20837 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl b/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl index 9daeafb98..ce732d28f 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl +++ b/gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl @@ -1 +1,20 @@ -test + + + + + + + + + + + +
+ {$assignableItemsList} + + {$usedItemsList} +
+
+
+ {$parameterList} +
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc index f11df172c..be7cda558 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc @@ -10,6 +10,11 @@ class DeviceConfig extends plugin public $ignore_account = FALSE; public $parent = NULL; + public $parameterList = NULL; + public $usedItemsList = NULL; + public $assignableItemsList = NULL; + + /*! \brief Initialize the plugin and its widgets. * Finally call init() to load values from the backend. */ @@ -21,6 +26,36 @@ class DeviceConfig extends plugin $this->_device = &$parent; $this->deviceUUID = $parent->deviceUUID; + + // Create assignable items list. + $this->assignableItemsList = new sortableListing(); + $this->assignableItemsList->setDeleteable(FALSE); + $this->assignableItemsList->setEditable(TRUE); + $this->assignableItemsList->setWidth("100%"); + $this->assignableItemsList->setHeight("200px"); + $this->assignableItemsList->setHeader(array(_("Type"))); + $this->assignableItemsList->setColspecs(array('*')); + $this->assignableItemsList->setAcl('rwcdm'); + + // Create used items list. + $this->usedItemsList = new sortableListing(); + $this->usedItemsList->setDeleteable(FALSE); + $this->usedItemsList->setEditable(TRUE); + $this->usedItemsList->setWidth("100%"); + $this->usedItemsList->setHeight("200px"); + $this->usedItemsList->setHeader(array(_("Type"))); + $this->usedItemsList->setColspecs(array('*')); + $this->usedItemsList->setAcl('rwcdm'); + + // Create parameter items list. + $this->parameterList = new sortableListing(); + $this->parameterList->setDeleteable(FALSE); + $this->parameterList->setEditable(TRUE); + $this->parameterList->setWidth("100%"); + $this->parameterList->setHeight("200px"); + $this->parameterList->setHeader(array(_("Type"))); + $this->parameterList->setColspecs(array('*')); + $this->parameterList->setAcl('rwcdm'); } function check() @@ -63,6 +98,9 @@ class DeviceConfig extends plugin } $smarty = get_smarty(); + $smarty->assign("assignableItemsList", $this->assignableItemsList->render()); + $smarty->assign("usedItemsList", $this->usedItemsList->render()); + $smarty->assign("parameterList", $this->parameterList->render()); return($display.$smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); }