[Mpuls-commits] r4610 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 10 20:58:02 CET 2011


Author: bh
Date: 2011-02-10 20:57:57 +0100 (Thu, 10 Feb 2011)
New Revision: 4610

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/formedrenderer.py
Log:
* mpulsweb/lib/formedrenderer.py (ViewRenderer.render_errors)
(ViewRenderer.error_info): Implement error_info instead of
render_errors to take advantage of libformed revision 351:fd1d201160bb


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-02-10 17:33:13 UTC (rev 4609)
+++ base/trunk/ChangeLog	2011-02-10 19:57:57 UTC (rev 4610)
@@ -1,5 +1,11 @@
 2011-02-10  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/formedrenderer.py (ViewRenderer.render_errors)
+	(ViewRenderer.error_info): Implement error_info instead of
+	render_errors to take advantage of libformed revision 351:fd1d201160bb
+
+2011-02-10  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/helper/filters.py (nl_to_br): Removed.  Import the
 	identical function from formed.renderer.helpers instead.
 

Modified: base/trunk/mpulsweb/lib/formedrenderer.py
===================================================================
--- base/trunk/mpulsweb/lib/formedrenderer.py	2011-02-10 17:33:13 UTC (rev 4609)
+++ base/trunk/mpulsweb/lib/formedrenderer.py	2011-02-10 19:57:57 UTC (rev 4610)
@@ -46,15 +46,13 @@
 
 class ViewRenderer(HtmlRenderer):
 
-    def render_errors(self, context, nc):
+    def error_info(self, context, nc):
         messages = self.data.get_errors(nc)
-        if not messages:
-            messages = self.get_warnings(nc)
+        if messages:
+            return ("error", messages)
 
-        out = []
+        messages = self.get_warnings(nc)
         if messages:
-            out.extend([tag("span", class_=self.error_css_class(context, nc)),
-                        ", ".join(messages),
-                        "</span>",
-                        ])
-        return out
+            return ("warning", messages)
+
+        return ("", [])



More information about the Mpuls-commits mailing list