summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06e3829)
raw | patch | inline | side by side (parent: 06e3829)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Aug 2010 13:19:31 +0000 (13:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 31 Aug 2010 13:19:31 +0000 (13:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19507 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_filterEditor.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/groupware/personal/groupware/class_groupware.inc | patch | blob | history | |
gosa-plugins/groupware/personal/groupware/filterEditor.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+class filterEditor extends plugin{
+
+ var $filterListing = NULL;
+ var $filterRules = array();
+
+ function __construct($config, $rules)
+ {
+ plugin::plugin($config);
+ $this->filterRules = $rules;
+
+ $this->filterListing= new sortableListing();
+ $this->filterListing->setDeleteable(true);
+ $this->filterListing->setEditable(true);
+ $this->filterListing->setColspecs(array('*'));
+ $this->filterListing->setWidth("100%");
+ $this->filterListing->setHeight("200px;");
+ }
+
+ function execute()
+ {
+ $smarty = get_smarty();
+
+ $smarty->assign('list', $this->filterListing->render());
+
+ return($smarty->fetch(get_template_path('filterEditor.tpl',TRUE,dirname(__FILE__))));
+ }
+
+}
+
+?>
diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc
index 47ed4a19de91e1b5e4caa7033ba0afab40099346..6f6d7b52eff6cdce1084a719c3a44c2d7dd5f34e 100644 (file)
);
var $enabledFeatures = array(
- "quotaUsage" => FALSE,
- "quotaSize" => FALSE,
- "mailFilter" => FALSE,
- "alternateAddresses" => FALSE,
- "forwardingAddresses" => FALSE,
- "vacationMessage" => FALSE,
- "mailBoxWarnLimit" => FALSE,
- "mailBoxSendSizelimit" => FALSE,
- "alternateAddresses" => FALSE,
- "mailBoxHardSizelimit" => FALSE,
- "mailBoxAutomaticRemoval" => FALSE,
- "localDeliveryOnly" => FALSE,
- "dropOwnMails" => FALSE);
+ "quotaUsage" => TRUE,
+ "quotaSize" => TRUE,
+ "mailFilter" => TRUE,
+ "alternateAddresses" => TRUE,
+ "forwardingAddresses" => TRUE,
+ "vacationMessage" => TRUE,
+ "mailBoxWarnLimit" => TRUE,
+ "mailBoxSendSizelimit" => TRUE,
+ "mailBoxHardSizelimit" => TRUE,
+ "mailBoxAutomaticRemoval" => TRUE,
+ "localDeliveryOnly" => TRUE,
+ "dropOwnMails" => TRUE);
var $flagAttrinutes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled",
"mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails");
var $mailAddressSelectDialog = NULL;
+ var $filterEditor = NULL;
+ var $filterRules = array();
var $vacationTemplates = array();
var $mailAddress = "";
function execute()
{
- $this->enabledFeatures = array(
- "quotaUsage" => TRUE,
- "quotaSize" => TRUE,
- "mailFilter" => TRUE,
- "alternateAddresses" => TRUE,
- "forwardingAddresses" => TRUE,
- "vacationMessage" => TRUE,
- "mailBoxWarnLimit" => TRUE,
- "mailBoxSendSizelimit" => TRUE,
- "mailBoxHardSizelimit" => TRUE,
- "mailBoxAutomaticRemoval" => TRUE,
- "localDeliveryOnly" => TRUE,
- "dropOwnMails" => TRUE);
// Register plugin execution
$display = plugin::execute();
new log("view","users/".get_class($this),$this->dn);
}
+ /****************
+ Filter editor
+ ****************/
+
+ if(isset($_POST['filterEditor_cancel'])) $this->filterEditor = NULL;
+ if(isset($_POST['configureFilter'])){
+ $this->filterEditor = new filterEditor($this->config, $this->filterRules);
+ }
+ $this->dialog = FALSE;
+ if($this->filterEditor instanceOf filterEditor){
+ $this->filterEditor->save_object();
+ $this->dialog = TRUE;
+ return($this->filterEditor->execute());
+ }
+
/****************
Account status
diff --git a/gosa-plugins/groupware/personal/groupware/filterEditor.tpl b/gosa-plugins/groupware/personal/groupware/filterEditor.tpl
--- /dev/null
@@ -0,0 +1,9 @@
+<h3>{t}Available filter rules {/t}</h3>
+
+{$list}
+
+<hr>
+<div class="plugin-actions">
+ <button name='filterEditor_ok'>{msgPool type='okButton'}</button>
+ <button name='filterEditor_cancel'>{msgPool type='cancelButton'}</button>
+</div>