From 1e5fb805da5d13130df4ae342f303ad74d836c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 1 Nov 2007 10:32:10 +0000 Subject: [PATCH] define macros for deferred rendering, update changelog, increase version git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17341 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_pdf_style/report_view.xml | 24 +++++++++++++++---- bt5/erp5_pdf_style/bt/change_log | 4 ++++ bt5/erp5_pdf_style/bt/revision | 2 +- bt5/erp5_pdf_style/bt/version | 2 +- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml index 24e09ef392..3608cd2079 100644 --- a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml +++ b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml @@ -62,8 +62,12 @@ <title>List Print</title>\n <author>ERP5</author>\n <subject>Print Example</subject>\n - <content tal:define="report_item_list python:report_method();\n - dummy python: request.set(\'here\',here); ">\n + <!-- This template can be used to aggregate together some already rendered report sections.\n + In this case, "rendered_report_item_list" must be in the page template context. -->\n + <tal:block tal:define="rendered_report_item_list rendered_report_item_list | python:[];\n + report_item_list python: rendered_report_item_list or report_method();">\n +\n + <content tal:define="dummy python: request.set(\'here\',here); ">\n \n <action name="nextPageTemplate">\n <parameter>FirstPage</parameter>\n @@ -139,11 +143,22 @@ \n <spacer height="100"/>\n \n + <!-- if we are called with a rendered_report_item_list, just insert the rendered text here. -->\n + <tal:block tal:condition="rendered_report_item_list">\n + <tal:block tal:repeat="report_item report_item_list">\n + <tal:block tal:replace="structure report_item"/>\n + </tal:block>\n + </tal:block>\n \n -<tal:block tal:define="portal_object here/portal_url/getPortalObject">\n +<tal:block tal:define="portal_object here/portal_url/getPortalObject"\n + tal:condition="not: rendered_report_item_list">\n <tal:block tal:repeat="report_item report_item_list">\n <tal:block tal:define="here python:report_item.getObject(portal_object);\n dummy python:report_item.pushReport(portal_object)">\n + <tal:block metal:define-macro="render_report_section"\n + tal:define="comment string:this is required for the macro;\n + landscape python: int(request.get(\'landscape\', 0) or 0);\n + global frame_width python:landscape and 25.8 or 19">\n <tal:block tal:condition="report_item/getTitle | report_item/getTranslatedTitle">\n <tal:block tal:condition="report_item/getTitle">\n <para style="Heading1" tal:content="report_item/getTitle"\n @@ -157,12 +172,13 @@ <tal:block tal:condition="python:form.pt == \'form_view\'">\n <tal:block metal:use-macro="form/form_view/macros/form_layout"/></tal:block>\n <tal:block tal:condition="python:form.pt == \'form_list\'">\n - <tal:block metal:use-macro="form/form_list/macros/form_layout"/></tal:block></tal:block></tal:block></tal:block>\n + <tal:block metal:use-macro="form/form_list/macros/form_layout"/></tal:block></tal:block></tal:block></tal:block></tal:block>\n <tal:block tal:define="dummy python:report_item.popReport(portal_object)"/>\n </tal:block>\n </tal:block>\n \n </content>\n + </tal:block>\n </document>\n diff --git a/bt5/erp5_pdf_style/bt/change_log b/bt5/erp5_pdf_style/bt/change_log index 81a603e2b6..52606ce970 100644 --- a/bt5/erp5_pdf_style/bt/change_log +++ b/bt5/erp5_pdf_style/bt/change_log @@ -1,3 +1,7 @@ +2007-10-30 jerome +* Support for list fields in report_view +* define macros for deferred rendering + 2007-08-17 jerome * Add support for cases where matrixbox or listbox is a proxyfield diff --git a/bt5/erp5_pdf_style/bt/revision b/bt5/erp5_pdf_style/bt/revision index 8783e30511..7c6ba0fe18 100644 --- a/bt5/erp5_pdf_style/bt/revision +++ b/bt5/erp5_pdf_style/bt/revision @@ -1 +1 @@ -53 \ No newline at end of file +55 \ No newline at end of file diff --git a/bt5/erp5_pdf_style/bt/version b/bt5/erp5_pdf_style/bt/version index ce609caf85..9a7d84f2a9 100644 --- a/bt5/erp5_pdf_style/bt/version +++ b/bt5/erp5_pdf_style/bt/version @@ -1 +1 @@ -0.8 \ No newline at end of file +0.9 \ No newline at end of file -- 2.30.9