Code

Prepared Config Item Assignment plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 May 2011 13:45:29 +0000 (13:45 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 May 2011 13:45:29 +0000 (13:45 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20837 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Device/DeviceConfig.tpl
gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc

index 9daeafb9864cf43055ae93beb0afd6c7d144bfa4..ce732d28ff4811d7fe637eec9e0e0f7f9b861dc4 100644 (file)
@@ -1 +1,20 @@
-test
+<table width='100%'>
+    <tr>
+        <td>
+            {$assignableItemsList}
+        </td>
+        <td style='width:50%; vertical-align: top;padding-left:5px;' class='left-border'>
+            {$usedItemsList}
+        </td>
+    </tr>
+    <tr>
+        <td colspan=2>
+            <hr>
+        </td>
+    </tr>
+    <tr>
+        <td colspan=2>
+            {$parameterList}
+        </td>
+    </tr>
+</table>
index f11df172ce9f48e9a707bed4a372b9a545ccd8bb..be7cda5585827874eeb68e268731445805331432 100644 (file)
@@ -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)));
     }