Code

Updated Groupware class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 14:55:53 +0000 (14:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 14:55:53 +0000 (14:55 +0000)
-removed old style folder browser
-added folder prefix handling which allows to use the folder editor,.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20008 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 5278415b824c0178b791513a0f292a1f6ac408b6..d1305cf515e5879e1ffe206658f9e73475bc0ce1 100644 (file)
@@ -76,8 +76,6 @@ class Groupware extends plugin
     var $filterRules = array();
     var $vacationTemplates = array(); 
 
-       var $fileBrowser = NULL;
-
        
     //the dropdown
     var $mailLocations = array();
@@ -122,17 +120,6 @@ class Groupware extends plugin
         // Set initial folder prefix
         $this->folderPrefix = "user/{$this->uid}";
 
-               // Initialize file browser list
-               $this->fileBrowser= new sortableListing();
-               $this->fileBrowser->setDeleteable(TRUE);
-               $this->fileBrowser->setEditable(TRUE);
-               $this->fileBrowser->setColspecs(array('*'));
-               $this->fileBrowser->setWidth("100%");
-               $this->fileBrowser->setHeight("150px");
-               $this->fileBrowser->setAcl("rwcdm");
-               $this->fileBrowser->update();
-               $this->fileBrowser->sortingEnabled(FALSE);
-
         // Initialize the plugin using rpc.
         $this->init();
     }
@@ -516,25 +503,6 @@ class Groupware extends plugin
         foreach($this->enabledFeatures as $feature => $state){
             $smarty->assign($feature."_isActive", $state);
         }
-       
-        // Build up folder list 
-        $data = $lData = array();
-        foreach($this->mailFolder as $folderPath => $entries){
-            $data[$folderPath] = $entries;
-            $name = $entries['name'];
-            $cnt = count($entries['acls']);
-            if($this->currentSelectedFolder == $folderPath){
-                $name = "<b>{$name}</b>";
-            }
-
-            $status = (isset($entries['status']))? $entries['status'] : '';        
-            $prefix = preg_replace("/^([^\/]*).*$/","\\1", $folderPath);
-            $name = str_pad($name, (substr_count($folderPath, '/')*3-3) + strlen($name),'../', STR_PAD_LEFT);
-            $lData[$folderPath]= array('data' => array($name,$prefix,$status,$cnt));
-        }    
-        $this->fileBrowser->setListData($data, $lData) ;
-        $this->fileBrowser->update();
-
         
         $smarty->assign("currentSelectedFolder", $this->currentSelectedFolder);
         $folderEntries = array();
@@ -543,7 +511,6 @@ class Groupware extends plugin
         }
                $smarty->assign("folderEntries", $folderEntries);
 
-               $smarty->assign("fileBrowser", $this->fileBrowser->render());
         $smarty->assign("mailLocations", $this->mailLocations);
         if (count($this->vacationTemplates)){
             $smarty->assign("displayTemplateSelector", "true");
@@ -554,6 +521,7 @@ class Groupware extends plugin
             $smarty->assign("displayTemplateSelector", "false");
         }
 
+        $smarty->assign("uid", $this->uid);
         $smarty->assign("initFailed", !$this->accountInitialized);
         $smarty->assign("rpcError", $this->rpcError);
         $smarty->assign("rpcErrorMessage", $this->rpcErrorMessage);
index 210f0e8ffe70ed97f1c919968c56442236f0cf83..9f99c2fd8579bb1042e8f220995c825e5fb3c85a 100644 (file)
                 <tr>
                     <td><label for="mailFolder">{t}Mail folder{/t}</label></td>
                     <td>
-                        {render acl=$mailFolderACL}
-                            <button name='configureFolder'>{msgPool type=editButton}</button>
-                        {/render}
+                        {if $uid == ""}
+                            <i>{t}Can only be set for existing accounts!{/t}</i>
+                        {else}
+                            {render acl=$mailFolderACL}
+                                <button name='configureFolder'>{msgPool type=editButton}</button>
+                            {/render}
+                        {/if}
                     </td>
                 </tr>
                 {/if}