Code

Added folder List widget
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Oct 2010 08:39:32 +0000 (08:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Oct 2010 08:39:32 +0000 (08:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19965 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_Groupware.inc

index 98ad80af9dbf3239ee9eb65c7b85c2309ab5c290..b32b9b23312e41511673154362251ab368a9cde2 100644 (file)
@@ -259,6 +259,18 @@ class Groupware extends plugin
     }
 
 
+    function getPermissions()
+    {
+        $ret[GROUPWARE_RIGHTS_NONE] = _("None");
+        $ret[RIGHTS_GROUPWARE_READ] = _("Read");
+        $ret[RIGHTS_GROUPWARE_POST] = _("Post");
+        $ret[GROUPWARE_RIGHTS_APPEND] = _("Append");
+        $ret[RIGHTS_GROUPWARE_WRITE] = _("Write");
+        $ret[GROUPWARE_RIGHTS_ALL] = _("All");
+        return($ret);
+    }
+
+
     /*! \brief  Generates the HTML user interface for the groupware plugin
      *           and take of several ui actions like adding or removing 
      *           forward addresses, filters and the account itself.
@@ -319,6 +331,36 @@ class Groupware extends plugin
             return($this->filterManager->execute());
         }
 
+
+        /****************
+          Folder editor
+         ****************/
+
+        if(isset($_POST['FolderWidget_cancel'])) $this->FolderWidget = NULL;
+        if(isset($_POST['FolderWidget_ok'])){
+            $this->FolderWidget->save_object();
+            $msgs = $this->FolderWidget->check();
+            if(count($msgs)){
+                msg_dialog::displayChecks($msgs);
+            }else{
+                $this->mailFolder = $this->FolderWidget->save();
+                $this->FolderWidget = NULL;
+            }
+        }
+        if(isset($_POST['configureFolder'])){
+            $this->FolderWidget = new FolderWidget($this->config,$this->mailFolder, "user/wiwu/Inbox");
+            $this->FolderWidget->setPermissions($this->getPermissions());
+            $this->FolderWidget->acl_base = $this->acl_base;
+            $this->FolderWidget->acl_category = $this->acl_category;
+        }
+        $this->dialog = FALSE;
+        if($this->FolderWidget instanceOf FolderWidget){
+            $this->FolderWidget->save_object();
+            $this->dialog = TRUE;
+            return($this->FolderWidget->execute());
+        }
+   
+
         /****************
           Account status
          ****************/