[Mpuls-commits] r2918 - in jmd/trunk: . jmdstrukturweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jun 8 12:32:56 CEST 2010


Author: bh
Date: 2010-06-08 12:32:55 +0200 (Tue, 08 Jun 2010)
New Revision: 2918

Added:
   jmd/trunk/jmdstrukturweb/controllers/case_bundle.py
Modified:
   jmd/trunk/ChangeLog
Log:
* jmdstrukturweb/controllers/case_bundle.py: New.  Added to
overwrite the _buildCaseList method with a jmdstrukturweb specific
implementation.  The first_name and last_name fields do not exist
in jmdstrukturweb.


Modified: jmd/trunk/ChangeLog
===================================================================
--- jmd/trunk/ChangeLog	2010-06-08 10:30:42 UTC (rev 2917)
+++ jmd/trunk/ChangeLog	2010-06-08 10:32:55 UTC (rev 2918)
@@ -1,3 +1,10 @@
+2010-06-08  Bernhard Herzog  <bh at intevation.de>
+
+	* jmdstrukturweb/controllers/case_bundle.py: New.  Added to
+	overwrite the _buildCaseList method with a jmdstrukturweb specific
+	implementation.  The first_name and last_name fields do not exist
+	in jmdstrukturweb.
+
 2010-05-31  Bernhard Herzog  <bh at intevation.de>
 
 	* jmdweb/controllers/jmdstruktur.py: Remove unused imports.

Added: jmd/trunk/jmdstrukturweb/controllers/case_bundle.py
===================================================================
--- jmd/trunk/jmdstrukturweb/controllers/case_bundle.py	2010-06-08 10:30:42 UTC (rev 2917)
+++ jmd/trunk/jmdstrukturweb/controllers/case_bundle.py	2010-06-08 10:32:55 UTC (rev 2918)
@@ -0,0 +1,18 @@
+from cgi import escape
+
+from mpulsweb.lib.helper.filters import NA
+
+from mpulsweb.controllers.case_bundle import \
+     CaseBundleController as MPulsCaseBundleController
+
+
+class CaseBundleController(MPulsCaseBundleController):
+
+    def _buildCaseList(self, bundle):
+        items = ["<ul>"]
+        for case in bundle.getCases():
+            items.append("<li>%s, %s</li>"
+                         % (escape(NA(case.datum_begin_zeitraum)),
+                            escape(NA(case.datum_ende_zeitraum))))
+        items.append("</ul>")
+        return items


Property changes on: jmd/trunk/jmdstrukturweb/controllers/case_bundle.py
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native



More information about the Mpuls-commits mailing list