From 224c4e01a0cb45d41461e50fe99ec4ffd6000e65 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 20 Mar 2007 10:07:24 +0000 Subject: [PATCH] Some design changes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5835 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/sieve/class_My_Tree.inc | 15 ++++++ include/sieve/class_sieveElement_If.inc | 8 +-- include/sieve/templates/edit_frame_base.tpl | 2 +- include/sieve/templates/element_block_end.tpl | 2 + .../sieve/templates/element_block_start.tpl | 3 +- include/sieve/templates/object_container.tpl | 22 +++++--- .../templates/object_container_clear.tpl | 54 +++++++++---------- 7 files changed, 61 insertions(+), 45 deletions(-) diff --git a/include/sieve/class_My_Tree.inc b/include/sieve/class_My_Tree.inc index 366f4cea8..8525ee32d 100644 --- a/include/sieve/class_My_Tree.inc +++ b/include/sieve/class_My_Tree.inc @@ -47,10 +47,25 @@ class My_Tree extends Tree /* Create html results */ $smarty = get_smarty(); + $block_indent_start = $smarty->fetch(get_template_path("templates/block_indent_start.tpl",TRUE,dirname(__FILE__))); + $block_indent_stop = $smarty->fetch(get_template_path("templates/block_indent_stop.tpl",TRUE,dirname(__FILE__))); + + + $this -> dump_ = ""; + $ends = array(); foreach($this->pap as $key => $object){ if(is_object($object)){ + $end = $this->get_block_end($key); + + if($end != $key && get_class($object) == "sieve_if") { + $ends[$end] = $end; + $this->dump_ .= $block_indent_start; + } $this->dump_ .= preg_replace("/>/",">\n",$object->execute()); + if(isset($ends[$key])){ + $this->dump_ .= $block_indent_stop; + } } } diff --git a/include/sieve/class_sieveElement_If.inc b/include/sieve/class_sieveElement_If.inc index d20f30abf..8431dce45 100644 --- a/include/sieve/class_sieveElement_If.inc +++ b/include/sieve/class_sieveElement_If.inc @@ -1132,13 +1132,7 @@ class sieve_if } default : { - $ret = " - - - -
"; - $ret.= $key."
"; - $ret.= "
"; + trigger_error(_("Unhandled switch type")); } } } diff --git a/include/sieve/templates/edit_frame_base.tpl b/include/sieve/templates/edit_frame_base.tpl index 84d2bd622..67c47b4af 100644 --- a/include/sieve/templates/edit_frame_base.tpl +++ b/include/sieve/templates/edit_frame_base.tpl @@ -1,7 +1,7 @@ -
+ diff --git a/include/sieve/templates/element_block_end.tpl b/include/sieve/templates/element_block_end.tpl index b5af6fbde..41c3a2c0b 100644 --- a/include/sieve/templates/element_block_end.tpl +++ b/include/sieve/templates/element_block_end.tpl @@ -1,3 +1,5 @@ + diff --git a/include/sieve/templates/element_block_start.tpl b/include/sieve/templates/element_block_start.tpl index 24cd1b3a5..526162453 100644 --- a/include/sieve/templates/element_block_start.tpl +++ b/include/sieve/templates/element_block_start.tpl @@ -1,4 +1,4 @@ - + diff --git a/include/sieve/templates/object_container.tpl b/include/sieve/templates/object_container.tpl index 9c4611532..2cb822785 100644 --- a/include/sieve/templates/object_container.tpl +++ b/include/sieve/templates/object_container.tpl @@ -1,23 +1,29 @@ - +
- - -
+   + + + + {t}Move down{/t} + + {t}Move up{/t} + {t}Remove this element{/t} + {t}Add a new element above{/t} + {t}Add a new element below{/t}
- - + %%OBJECT_CONTENT%% diff --git a/include/sieve/templates/object_container_clear.tpl b/include/sieve/templates/object_container_clear.tpl index 852b274b5..24d66fd94 100644 --- a/include/sieve/templates/object_container_clear.tpl +++ b/include/sieve/templates/object_container_clear.tpl @@ -1,30 +1,28 @@ - - -
+ + + + - - + + + + +
+   + + + + + + {t}Move down{/t} + + {t}Move up{/t} + + {t}Remove this element{/t} - - - - - - - - - -
-   - -   - -
- - - %%OBJECT_CONTENT%% -
-
+ + %%OBJECT_CONTENT%% +
-- 2.30.2