Commit fc5c3311 authored by Jérome Perrin's avatar Jérome Perrin

2007-10-30 Jerome

Add macros for deferred rendering in report_view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17336 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bde0f0c9
...@@ -224,9 +224,13 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value> ...@@ -224,9 +224,13 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value>
<text:sequence-decl text:display-outline-level=\'0\' text:name=\'Text\'/>\n <text:sequence-decl text:display-outline-level=\'0\' text:name=\'Text\'/>\n
<text:sequence-decl text:display-outline-level=\'0\' text:name=\'Drawing\'/>\n <text:sequence-decl text:display-outline-level=\'0\' text:name=\'Drawing\'/>\n
</text:sequence-decls>\n </text:sequence-decls>\n
\n \n
<tal:block tal:define="report_item_list python:report_method();\n <!-- This template can be used to aggregate together some already rendered report sections.\n
dummy python: request.set(\'here\',here); "> \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
<tal:block tal:define="dummy python: request.set(\'here\',here); "> \n
<text:p text:style-name=\'report-title\'\n <text:p text:style-name=\'report-title\'\n
tal:content="python: here.Localizer.erp5_ui.gettext(form.getProperty(\'title\', \'\')).encode(\'utf-8\')"> report title </text:p>\n tal:content="python: here.Localizer.erp5_ui.gettext(form.getProperty(\'title\', \'\')).encode(\'utf-8\')"> report title </text:p>\n
<text:p></text:p> \n <text:p></text:p> \n
...@@ -303,33 +307,46 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value> ...@@ -303,33 +307,46 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value>
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block> <!-- TODO: if possible a macro for form rendering ? -->\n </tal:block>\n
\n \n
<tal:block tal:define="portal_object here/portal_url/getPortalObject">\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
<tal:block tal:define="portal_object here/portal_url/getPortalObject">\n
<tal:block tal:repeat="report_item 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 <tal:block 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 tal:condition="report_item/getTitle">\n <tal:block metal:define-macro="render_report_section">\n
<text:p\n <tal:block tal:condition="report_item/getTitle">\n
tal:content="report_item/getTitle"\n <text:p\n
tal:attributes="text:style-name string:report-title-${report_item/getLevel}"\n tal:content="report_item/getTitle"\n
>report item title</text:p><text:p/>\n tal:attributes="text:style-name string:report-title-${report_item/getLevel}"\n
</tal:block>\n >report item title</text:p><text:p/>\n
\n </tal:block>\n
<tal:block tal:condition="report_item/getFormId">\n \n
<tal:block tal:define="form python:getattr(here, report_item.getFormId())" >\n <tal:block tal:condition="report_item/getFormId">\n
<tal:block tal:condition="python:form.pt == \'form_view\'">\n <tal:block tal:define="form python:getattr(here, report_item.getFormId())" >\n
<tal:block metal:use-macro="form/form_view/macros/form_layout"/>\n <tal:block tal:condition="python:form.pt == \'form_view\'">\n
</tal:block>\n <tal:block metal:use-macro="form/form_view/macros/form_layout"/>\n
<tal:block tal:condition="python:form.pt == \'form_list\'">\n </tal:block>\n
<tal:block metal:use-macro="form/form_list/macros/form_layout"/>\n <tal:block tal:condition="python:form.pt == \'form_list\'">\n
</tal:block></tal:block></tal:block>\n <tal:block metal:use-macro="form/form_list/macros/form_layout"/>\n
</tal:block></tal:block></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="dummy python:report_item.popReport(portal_object)"/>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
\n
</tal:block>\n </tal:block>\n
</office:text>\n </tal:block>\n
</office:text>\n
</office:body>\n </office:body>\n
</office:document-content>\n </office:document-content>\n
......
2007-10-30 Jerome
Add macros for deferred rendering in report_view
2007-08-24 Ibou NDIAYE 2007-08-24 Ibou NDIAYE
Initial revision Initial revision
\ No newline at end of file
15 18
\ No newline at end of file \ No newline at end of file
0.1 0.1.1
\ 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