[Mpuls-commits] r4611 - base/trunk/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Feb 11 15:34:56 CET 2011
Author: torsten
Date: 2011-02-11 15:34:55 +0100 (Fri, 11 Feb 2011)
New Revision: 4611
Modified:
base/trunk/mpulsweb/lib/config.py
Log:
* mpulsweb/lib/config.py: Added config var to define different formletters.
Modified: base/trunk/mpulsweb/lib/config.py
===================================================================
--- base/trunk/mpulsweb/lib/config.py 2011-02-10 19:57:57 UTC (rev 4610)
+++ base/trunk/mpulsweb/lib/config.py 2011-02-11 14:34:55 UTC (rev 4611)
@@ -160,6 +160,8 @@
set('case-module', 'checktags', '0')
#enable the case-copy function in template (devel)
set('case-module', 'copy', '0')
+ #enable function to extract certain fields for formletters
+ set('case-module', 'formletter', '0')
# CASE FIELDS
#
@@ -255,6 +257,22 @@
set('case', 'remindermindays', '0')
set('case', 'remindermaxdays', '9999')
+ # FORMLETTER
+ # ----------
+ # Defines a list of different formletters. Each letter has a id and a
+ # name which is used in the GUI. Earch sql-querys of a formletter will
+ # collect the needed data for the formletter. All querys are done one
+ # after another and its result will be written in a dictionary.
+ # SQL querys can include %(id)s which will be substituted with the id
+ # of the case.
+ sqllist = []
+ letters = [{'id': '1',
+ 'name': 'Vorgabe',
+ 'sql': [
+ 'select * from master_tbl_view where id = %(id)s'
+ ]}]
+ set('case', 'formletter', letters)
+
# Rendering of repeated formed pages
#
# Some repeat groups define entire repeated formed pages. These
@@ -418,7 +436,6 @@
enabled_validities = [validity_0]
set('validities', 'enabled', enabled_validities)
-
return sections
def is_enabled(self, section, name):
More information about the Mpuls-commits
mailing list