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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 4 13:34:05 CET 2011


Author: bh
Date: 2011-11-04 13:34:05 +0100 (Fri, 04 Nov 2011)
New Revision: 5542

Modified:
   base/trunk/mpulsweb/controllers/case_bundle.py
   base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako
Log:
Add a checkbox to select document export in the export confirm dialog.
As for the checkbox for the logbook export, the document export checkbox
is only rendered if document export is possible, i.e. if the export
format is XML and case document support is enabled in the
application. This logic is implemented in the case bundle controller,
just like for the logbook export.


Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py	2011-11-04 12:30:18 UTC (rev 5541)
+++ base/trunk/mpulsweb/controllers/case_bundle.py	2011-11-04 12:34:05 UTC (rev 5542)
@@ -621,6 +621,9 @@
         c.allow_logbook_export = (g.mpuls_config.is_enabled('case-module',
                                                             'logbook')
                                   and type == "XML")
+        c.allow_documents_export = (g.mpuls_config.is_enabled('case-module',
+                                                              'documents')
+                                    and type == "XML")
         form = render('/casemanagement/dialogs/confirm_export.mako')
         return formencode.htmlfill.render(form, defaults=data,
                                           auto_insert_errors=False,

Modified: base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako	2011-11-04 12:30:18 UTC (rev 5541)
+++ base/trunk/mpulsweb/templates/casemanagement/dialogs/confirm_export.mako	2011-11-04 12:34:05 UTC (rev 5542)
@@ -38,6 +38,14 @@
   </li>
 </ul>
 % endif
+% if c.allow_documents_export:
+<ul>
+  <li>
+    <input type="checkbox" name="exportselection" value="documents" id="documents">
+    <label for="documents">${_("Documents")}</label>
+  </li>
+</ul>
+% endif
 
 <h3>${_('Anonymisation')}</h3>
 <p>



More information about the Mpuls-commits mailing list