[Mpuls-commits] r271 - in wasko/trunk: . waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 19 13:02:08 CET 2009
Author: torsten
Date: 2009-02-19 13:02:05 +0100 (Thu, 19 Feb 2009)
New Revision: 271
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/controllers/CaseBase.py
wasko/trunk/waskaweb/controllers/case.py
Log:
Removed special code for handling RG in printing
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-02-19 11:15:36 UTC (rev 270)
+++ wasko/trunk/ChangeLog.txt 2009-02-19 12:02:05 UTC (rev 271)
@@ -37,7 +37,12 @@
* waskaweb/templates/casemanagement/overview.mako,
waskaweb/templates/main.mako: Commented out options and links
+ Removed special code from WASKA for handling RG in printing
+ * waskaweb/controllers/CaseBase.py,
+ waskaweb/controllers/case.py: Removed special code.
+
+
2009-02-17 Torsten Irlaender <torsten.irlaender at intevation.de>
Use Widgetcollector from offlineclient
Modified: wasko/trunk/waskaweb/controllers/CaseBase.py
===================================================================
--- wasko/trunk/waskaweb/controllers/CaseBase.py 2009-02-19 11:15:36 UTC (rev 270)
+++ wasko/trunk/waskaweb/controllers/CaseBase.py 2009-02-19 12:02:05 UTC (rev 271)
@@ -62,21 +62,14 @@
redirect_to(h.url_for(controller='/case_overview'))
def _getRenderdFormElements(self, ti, ds_id, page_id=None, ro_mode=False, no_data=False):
- # Determine if we have an repeat group or a formular page
- what = int(ti.key) == 14 and "rg_aid_overview" or "formular"
- if what == "rg_aid_overview":
- navigation = self._getFormNavigation(selected_key="14")
- renderer = AidListRenderer(AidList(ds_id), ro_mode, no_data)
- content = renderer.render(ds_id, page_id)
- else:
- navigation = self._getFormNavigation(selected_key=ti.key)
- real_id = ti.realId(ds_id)
- formdata = self._getFormdata(ti, real_id, no_data)
- vr = ViewRenderer(formdata, ro_mode)
- content = vr.renderView(
- str(ti.key),
- ds_id,
- showNext = not ti.nextKey() is None)
+ navigation = self._getFormNavigation(selected_key=ti.key)
+ real_id = ti.realId(ds_id)
+ formdata = self._getFormdata(ti, real_id, no_data)
+ vr = ViewRenderer(formdata, ro_mode)
+ content = vr.renderView(
+ str(ti.key),
+ ds_id,
+ showNext = not ti.nextKey() is None)
return (content, navigation)
def _getFormNavigation(self,selected_key=None):
Modified: wasko/trunk/waskaweb/controllers/case.py
===================================================================
--- wasko/trunk/waskaweb/controllers/case.py 2009-02-19 11:15:36 UTC (rev 270)
+++ wasko/trunk/waskaweb/controllers/case.py 2009-02-19 12:02:05 UTC (rev 271)
@@ -286,19 +286,10 @@
# append pagebreak
formular.append('<span style="page-break-after:always"></span>')
for ti in self.getNavigation().getAllItems():
- if ti.key in ['27', '28', '29', '30']: continue #ignoring empty aid pages
content, navigation = self._getRenderdFormElements(ti, id, ro_mode=True, no_data=empty)
formular.append("""<h1>%s</h1>""" % ti.description)
- if not ti.children or ti.key == '14': #Only add leaves
+ if not ti.children: #Only add leaves
formular.append(content)
- if ti.key == '14': # found aid-overview
- aid_list = AidList(id)
- for aid in aid_list.getDatasets():
- ti_rg = self.getNavigation().getTreeItem(aid.page_id)
- content, navigation = self._getRenderdFormElements(ti_rg, aid.id, ro_mode=True, no_data=empty)
- formular.append("""<h1>%s</h1>""" % ti_rg.description)
- formular.append(content)
-
c.formular = "<br>".join(formular)
page = render('/casemanagement/formular.mako')
return page
More information about the Mpuls-commits
mailing list