[Mpuls-commits] r4013 - in base/trunk: . mpulsweb/controllers mpulsweb/templates/casemanagement/dialogs

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 22 14:25:04 CEST 2010


Author: bh
Date: 2010-10-22 14:25:03 +0200 (Fri, 22 Oct 2010)
New Revision: 4013

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/case_bundle.py
   base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako
Log:
* mpulsweb/controllers/case_bundle.py
(CaseBundleController.export): Bind a list of pages in the formed
meta tree to the template context.  Reuse that list for the
htmlfill data.

* mpulsweb/templates/casemanagement/dialogs/confirm_export.mako:
Generate the HTML for the list of checkboxes for the pages from
the pages list in the template context instead of relying on a
special helper function that creates HTML


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-21 17:29:29 UTC (rev 4012)
+++ base/trunk/ChangeLog	2010-10-22 12:25:03 UTC (rev 4013)
@@ -1,3 +1,15 @@
+2010-10-22  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/controllers/case_bundle.py
+	(CaseBundleController.export): Bind a list of pages in the formed
+	meta tree to the template context.  Reuse that list for the
+	htmlfill data.
+
+	* mpulsweb/templates/casemanagement/dialogs/confirm_export.mako:
+	Generate the HTML for the list of checkboxes for the pages from
+	the pages list in the template context instead of relying on a
+	special helper function that creates HTML
+
 2010-10-21  Bernhard Herzog  <bh at intevation.de>
 
 	* mpulsweb/model/case.py: Fix formatting.

Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py	2010-10-21 17:29:29 UTC (rev 4012)
+++ base/trunk/mpulsweb/controllers/case_bundle.py	2010-10-22 12:25:03 UTC (rev 4013)
@@ -480,10 +480,10 @@
     def export(self, type="XML"):
         c.context = "../main.mako"
         case_bundle = session.get('casebundle')
+        c.pages = list(g.formedTree.findAllByClass(PageNode))
         data = {'exporttype': type,
                 'exportanonym': '1',
-                'exportselection':
-                [i.getName() for i in g.formedTree.findAllByClass(PageNode)]}
+                'exportselection': [i.getName() for i in c.pages]}
         c.dialog_title = ungettext(u'Export case?', u'Export cases?',
                                    len(case_bundle.getCases()))
         c.dialog_text = "\n".join(self._buildCaseList(case_bundle))

Modified: base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako	2010-10-21 17:29:29 UTC (rev 4012)
+++ base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako	2010-10-22 12:25:03 UTC (rev 4013)
@@ -21,8 +21,21 @@
     </p>
 % endif
 <h3>Exportierte Bereiche der Fallakte</h3>
-<p>Bitte wählen Sie die zu exportierenden Seiten der Fallakte:</p> 
-${h.literal(h.get_export_selector())}
+<p>Bitte wählen Sie die zu exportierenden Seiten der Fallakte:</p>
+<ul>
+% for page in c.pages:
+<%
+   name = page.getName()
+   if name == "ee":
+       continue
+%>
+<li>
+  <input type="checkbox" name="exportselection" value="${name}" id="${name}">
+  <label for="${name}">${page.getDescription()}</label>
+</li>
+% endfor
+</ul>
+
 <h3>Anonymisierung</h3>
 <p>
 Bitte beachten Sie, dass Sie ggf. personenbezogene Daten exportieren,



More information about the Mpuls-commits mailing list