[Mpuls-commits] r1878 - in wasko/branches/2.0: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Mar 1 15:15:27 CET 2010
Author: bh
Date: 2010-03-01 15:15:24 +0100 (Mon, 01 Mar 2010)
New Revision: 1878
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (RepeatGroupRenderer.__init__): Extend
base class method with an additional parameter, digests, that
specifies the repeat group disgest configuration
(RepeatGroupRenderer.render_digest): Use the repeat group digest
specification given to the constructor, not the hard-wired one.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-03-01 14:11:13 UTC (rev 1877)
+++ wasko/branches/2.0/ChangeLog 2010-03-01 14:15:24 UTC (rev 1878)
@@ -1,5 +1,13 @@
2010-03-01 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/lib/renderer.py (RepeatGroupRenderer.__init__): Extend
+ base class method with an additional parameter, digests, that
+ specifies the repeat group disgest configuration
+ (RepeatGroupRenderer.render_digest): Use the repeat group digest
+ specification given to the constructor, not the hard-wired one.
+
+2010-03-01 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/lib/config.py (MpulsConfig.build_defaults): Add default
for repeat group digest configuration.
Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py 2010-03-01 14:11:13 UTC (rev 1877)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py 2010-03-01 14:15:24 UTC (rev 1878)
@@ -793,18 +793,17 @@
class RepeatGroupRenderer(ViewRenderer):
+ def __init__(self, it=None, page=None, ro_mode=True, digests=None):
+ ViewRenderer.__init__(self, it, page, ro_mode)
+ if digests is None:
+ digests = {}
+ self.rg_digests = digests
+
def render_digest(self, rg):
out = []
- fields = []
case_id = rg.getIdentifier().split(':')[-1]
- digests = {'rg_unterstuetzung': ['hilfm_art', 'hilfm_inst',
- 'hilfm_einr',
- 'hilfm_start',
- 'hilfm_ende'],
- 'rg_kompetenz': ['datum_kf', 'kf_anbiet']}
- if digests:
- fields = digests.get(self._getMeta(rg).getName(), [])
+ fields = self.rg_digests.get(self._getMeta(rg).getName(), [])
out.append('<table class="rgdigest">')
if len(fields) < 1:
More information about the Mpuls-commits
mailing list