From: hickert Date: Tue, 12 Oct 2010 14:55:53 +0000 (+0000) Subject: Updated Groupware class X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=259285ebb1c0e92e02b23b039d316d1c45157b7a;p=gosa.git Updated Groupware class -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 --- diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc index 5278415b8..d1305cf51 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -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 = "{$name}"; - } - - $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); diff --git a/gosa-plugins/groupware/personal/groupware/generic.tpl b/gosa-plugins/groupware/personal/groupware/generic.tpl index 210f0e8ff..9f99c2fd8 100644 --- a/gosa-plugins/groupware/personal/groupware/generic.tpl +++ b/gosa-plugins/groupware/personal/groupware/generic.tpl @@ -35,9 +35,13 @@ - {render acl=$mailFolderACL} - - {/render} + {if $uid == ""} + {t}Can only be set for existing accounts!{/t} + {else} + {render acl=$mailFolderACL} + + {/render} + {/if} {/if}