From 6e46575fcf501cfa83418c94c1cb3646c8df4c56 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 16 Mar 2007 13:41:54 +0000 Subject: [PATCH] Some template changes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5806 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/sieve/class_sieveElement_If.inc | 7 ++++++- include/sieve/templates/element_else.tpl | 8 ++++---- include/sieve/templates/element_elsif.tpl | 2 +- include/sieve/templates/element_exists.tpl | 3 +-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/sieve/class_sieveElement_If.inc b/include/sieve/class_sieveElement_If.inc index 26bf54c42..a9c04e7b0 100644 --- a/include/sieve/class_sieveElement_If.inc +++ b/include/sieve/class_sieveElement_If.inc @@ -797,7 +797,12 @@ class sieve_if $smarty->assign("Name", $name); $smarty->assign("Contents", $this->get_as_html()); - $object = $smarty->fetch(get_template_path("templates/element_if_else.tpl",TRUE,dirname(__FILE__))); + + if($this->TYPE == "if"){ + $object = $smarty->fetch(get_template_path("templates/element_if.tpl",TRUE,dirname(__FILE__))); + }else{ + $object = $smarty->fetch(get_template_path("templates/element_elsif.tpl",TRUE,dirname(__FILE__))); + } $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container); return($str); } diff --git a/include/sieve/templates/element_else.tpl b/include/sieve/templates/element_else.tpl index d7cd58fe1..5c420914f 100644 --- a/include/sieve/templates/element_else.tpl +++ b/include/sieve/templates/element_else.tpl @@ -1,7 +1,7 @@ - +
- +
- {t}else{/t} - + {t}Else{/t} +
diff --git a/include/sieve/templates/element_elsif.tpl b/include/sieve/templates/element_elsif.tpl index f440fad9d..9c41e304a 100644 --- a/include/sieve/templates/element_elsif.tpl +++ b/include/sieve/templates/element_elsif.tpl @@ -1,7 +1,7 @@ diff --git a/include/sieve/templates/element_exists.tpl b/include/sieve/templates/element_exists.tpl index f8eb32203..8e3866c8c 100644 --- a/include/sieve/templates/element_exists.tpl +++ b/include/sieve/templates/element_exists.tpl @@ -1,11 +1,10 @@
- {t}Else{/t} + {t}Else If{/t} {$Contents}
-
+ {if $LastError != ""} {$LastError}
{/if} - {if $Inverse} {else} -- 2.30.2