Commit 4a73df86 authored by Romain Courteaud's avatar Romain Courteaud

Add macros for deferred rendering in report_view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25034 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 089ed5a2
...@@ -50,10 +50,11 @@ ...@@ -50,10 +50,11 @@
<office:body>\n <office:body>\n
<office:spreadsheet>\n <office:spreadsheet>\n
\n \n
<tal:block tal:define="report_item_list python:report_method();\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
dummy python: request.set(\'here\', here);\n dummy python: request.set(\'here\', here);\n
global sheet_per_reportsection python: int(request.get(\'sheet_per_report_section\', 0));\n global sheet_per_reportsection python: int(request.get(\'sheet_per_report_section\', 0));\n
global column_len python:5">\n global column_len python: 5">\n
<!-- TODO: calculate column_len based on the first listbox (or selection_column if exists)-->\n <!-- TODO: calculate column_len based on the first listbox (or selection_column if exists)-->\n
\n \n
<tal:block tal:define="portal_object here/portal_url/getPortalObject">\n <tal:block tal:define="portal_object here/portal_url/getPortalObject">\n
...@@ -65,16 +66,27 @@ ...@@ -65,16 +66,27 @@
table:default-cell-style-name=\'report-column-title\'/>\n table:default-cell-style-name=\'report-column-title\'/>\n
\n \n
<tal:block metal:use-macro="here/form_view/macros/form_layout"/>\n <tal:block metal:use-macro="here/form_view/macros/form_layout"/>\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:condition="not: rendered_report_item_list">\n
\n \n
<tal:block tal:repeat="report_item report_item_list">\n <tal:block tal:repeat="report_item report_item_list">\n
<tal:block metal:define-macro="make_report_item_table"\n <tal:block metal:define-macro="make_report_item_table"\n
tal:define="here python:report_item.getObject(portal_object);\n tal:define="here python:report_item.getObject(portal_object);\n
dummy python:report_item.pushReport(portal_object)">\n dummy python:report_item.pushReport(portal_object)">\n
<tal:block metal:define-macro="render_report_section">\n
<tal:block tal:condition="report_item/getTitle">\n <tal:block tal:condition="report_item/getTitle">\n
<table:table-row table:style-name=\'ro2\'>\n <table:table-row table:style-name=\'ro2\'>\n
<tal:block tal:condition="report_item/getTitle" tal:define="level report_item/getLevel">\n <tal:block tal:condition="report_item/getTitle" tal:define="level report_item/getLevel;\n
column_len column_len | python: 5">\n
<table:table-cell table:style-name="report-title"\n <table:table-cell table:style-name="report-title"\n
tal:attributes="table:number-columns-spanned python:column_len;\n tal:attributes="table:number-columns-spanned python: column_len;\n
table:style-name python:test(level&gt;1, \'report-title%s\' % level, \'report-title\');" \n table:style-name python:test(level&gt;1, \'report-title%s\' % level, \'report-title\');" \n
office:value-type=\'string\'\n office:value-type=\'string\'\n
table:number-rows-spanned=\'1\'>\n table:number-rows-spanned=\'1\'>\n
...@@ -93,7 +105,10 @@ ...@@ -93,7 +105,10 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:define="dummy python:report_item.popReport(portal_object)"/>\n <tal:block tal:define="portal_object here/portal_url/getPortalObject;\n
dummy python:report_item.popReport(portal_object)"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</table:table>\n </table:table>\n
......
2009-01-07 Romain
* Add macros for deferred rendering in report_view
2008-11-18 yusei 2008-11-18 yusei
* Convert cell data to string explicitly. * Convert cell data to string explicitly.
......
162 173
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment