[Mpuls-commits] r2012 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 18 20:13:44 CET 2010


Author: bh
Date: 2010-03-18 20:13:44 +0100 (Thu, 18 Mar 2010)
New Revision: 2012

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (ViewRenderer._renderConditional):
Evaluating conditionals is now handled in libformed, so we do not
need to do manually here.  Requires revision 107:1bc2755896f8 of
libformed.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-18 19:09:26 UTC (rev 2011)
+++ wasko/branches/2.0/ChangeLog	2010-03-18 19:13:44 UTC (rev 2012)
@@ -1,5 +1,12 @@
 2010-03-18  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/renderer.py (ViewRenderer._renderConditional):
+	Evaluating conditionals is now handled in libformed, so we do not
+	need to do manually here.  Requires revision 107:1bc2755896f8 of
+	libformed.
+
+2010-03-18  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/renderer.py (ViewRenderer._renderChild): Log a
 	debug message if a child will be ignored unexpectedly.
 

Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-03-18 19:09:26 UTC (rev 2011)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-03-18 19:13:44 UTC (rev 2012)
@@ -461,14 +461,8 @@
         return out
 
     def _renderConditional(self, conditional):
-        meta = self._getMeta(conditional)
-        expr = meta.getExpr()
-        if expr is not None:
-            context = RuleEvalContext(self.it, conditional.getIdentifier())
-            available = expr.evaluate(context)
-        else:
-            available = False
-        if not available:
+        if not self.it.evaluate_conditional(conditional):
+            meta = self._getMeta(conditional)
             ro = not meta.isInvisible()
             if ro:
                 old_ro = self.ro_mode



More information about the Mpuls-commits mailing list