[Mpuls-commits] r2295 - wasko/branches/2.0/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Apr 9 12:58:11 CEST 2010


Author: torsten
Date: 2010-04-09 12:58:10 +0200 (Fri, 09 Apr 2010)
New Revision: 2295

Modified:
   wasko/branches/2.0/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (RepeatGroupRenderer.render_digest): Render
description of the corresponding value in choicenode in rg-digests.


Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-04-09 10:32:59 UTC (rev 2294)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-04-09 10:58:10 UTC (rev 2295)
@@ -885,7 +885,12 @@
                 value = item.getValue()
                 if isinstance(self._getMeta(item), data.DateLeaf):
                     value = format_date(value)
-                out.append('%s' % escape(NA(value)))
+                if isinstance(self._getMeta(item), data.ChoiceNode):
+                    for child in self._getMeta(item).getChildren():
+                        if str(child.getValue()) == str(value):
+                            value = child.getDescription()
+                            break;
+                out.append('%s' % NA(value))
                 out.append('</a>')
                 out.append('</td>')
                 out.append('</tr>')



More information about the Mpuls-commits mailing list