diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml index 88272a41acd099a51fb9d1e92430c8a86c18ff87..312f107f346c804bbaa667315ede332aadff8420 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml @@ -57,7 +57,8 @@ <table:table table:style-name=\'ta1\' table:print=\'false\' tal:attributes="table:name here/getTitle" >\n <tal:block metal:define-macro="form_layout"\n tal:define="dummy python: request.set(\'here\', here);\n - listbox form/listbox">\n + listbox form/listbox | nothing;">\n + <tal:block tal:condition="listbox">\n <tal:block metal:use-macro="here/listbox_ods_macro/macros/listbox">\n <tal:block metal:fill-slot="list_header">\n <tal:block tal:repeat="column_item listboxline/getColumnItemList"> \n @@ -100,6 +101,7 @@ </tal:block>\n </tal:block>\n </tal:block>\n + </tal:block>\n </table:table>\n </office:spreadsheet>\n </office:body>\n diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml index e42c1cc85dbc5f80afabd8f5f771bb1c48017f97..3e044c298b26cc9b0eb467797a1b5654fcf1c677 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml @@ -172,7 +172,7 @@ dQEAAAAA</string> </value> <draw:frame draw:z-index="0" draw:style-name="gr1" svg:x="0.2cm" svg:y="0.2cm" svg:width="7.996cm" svg:height="6.999cm"\n tal:attributes="svg:height python:height;\n svg:width python:width">\n - <tal:block tal:replace="structure python: field.render_odf()"/>\n + <tal:block tal:replace="structure python: field.render_odf(render_prefix=render_prefix)"/>\n </draw:frame>\n </table:table-cell>\n </table:table-row>\n diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml index cb6772ce14add4b5c2daa901532a7295ec834f52..ecab55c1b35fc92ae9ef477f40f589d305212545 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml @@ -51,7 +51,8 @@ <office:spreadsheet>\n \n <tal:block metal:define-macro="listbox">\n - <tal:block tal:define="listboxline_list python: listbox.get_value(\'default\', render_format=\'list\', REQUEST=request);\n + <tal:block tal:define="render_prefix render_prefix | nothing;\n + listboxline_list python: listbox.get_value(\'default\', render_format=\'list\', REQUEST=request, render_prefix=render_prefix);\n DateTime nocall: modules/DateTime/DateTime;\n selection_name python: listbox.get_value(\'selection_name\', REQUEST=request);\n editable_columns python: listbox.get_value(\'editable_columns\', REQUEST=request);\n diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/report_view.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/report_view.xml index e4ae5c98198057dd7f3eb1cd58329a66236512ba..ba533c9270cbbce87dc6b1f63d689f57ec4b38a7 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/report_view.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/report_view.xml @@ -57,60 +57,62 @@ global column_len python: 5">\n <!-- TODO: calculate column_len based on the first listbox (or selection_column if exists)-->\n \n - <tal:block tal:define="portal_object here/portal_url/getPortalObject">\n - <tal:block tal:condition="not: sheet_per_reportsection">\n - <table:table tal:attributes="table:name python:unicode(here.getProperty(\'title\'), \'utf8\')">\n - <!-- at least one table-column element is required for ODF to validate -->\n - <table:table-column\n - table:style-name=\'co2\'\n - table:default-cell-style-name=\'report-column-title\'/>\n + <tal:block tal:define="portal_object here/portal_url/getPortalObject">\n + <tal:block tal:condition="not: sheet_per_reportsection">\n + <table:table tal:attributes="table:name python:unicode(here.getProperty(\'title\'), \'utf8\')">\n + <!-- at least one table-column element is required for ODF to validate -->\n + <table:table-column\n + table:style-name=\'co2\'\n + table:default-cell-style-name=\'report-column-title\'/>\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 + <!-- 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:condition="not: rendered_report_item_list">\n \n - <tal:block tal:repeat="report_item report_item_list">\n - <tal:block metal:define-macro="make_report_item_table"\n - 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:block tal:condition="report_item/getTitle">\n - <table:table-row table:style-name=\'ro2\'>\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 - tal:attributes="table:number-columns-spanned python: column_len;\n - table:style-name python:test(level>1, \'report-title%s\' % level, \'report-title\');" \n - office:value-type=\'string\'\n - table:number-rows-spanned=\'1\'>\n - <text:p tal:content="report_item/getTitle" ></text:p>\n - </table:table-cell>\n - </tal:block>\n - </table:table-row>\n - </tal:block>\n - <tal:block tal:condition="report_item/getFormId">\n - <tal:block tal:define="form python:getattr(here,report_item.getFormId())">\n - <tal:block tal:condition="python: form.pt == \'form_view\'">\n - <tal:block metal:use-macro="form/form_view/macros/form_layout"/>\n + <tal:block tal:repeat="report_item report_item_list">\n + <tal:block metal:define-macro="make_report_item_table"\n + tal:define="here python:report_item.getObject(portal_object);\n + render_prefix python: \'x%s\' % (repeat[\'report_item\'].index, );\n + dummy python:report_item.pushReport(portal_object,\n + render_prefix=render_prefix)">\n + <tal:block metal:define-macro="render_report_section">\n + <tal:block tal:condition="report_item/getTitle">\n + <table:table-row table:style-name=\'ro2\'>\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 + tal:attributes="table:number-columns-spanned python: column_len;\n + table:style-name python:test(level>1, \'report-title%s\' % level, \'report-title\');" \n + office:value-type=\'string\'\n + table:number-rows-spanned=\'1\'>\n + <text:p tal:content="report_item/getTitle" ></text:p>\n + </table:table-cell>\n + </tal:block>\n + </table:table-row>\n </tal:block>\n - <tal:block tal:condition="python:form.pt == \'form_list\'">\n - <tal:block metal:use-macro="form/form_list/macros/form_layout"/>\n + <tal:block tal:condition="report_item/getFormId">\n + <tal:block tal:define="form python:getattr(here,report_item.getFormId())">\n + <tal:block tal:condition="python: form.pt == \'form_view\'">\n + <tal:block metal:use-macro="form/form_view/macros/form_layout"/>\n + </tal:block>\n + <tal:block tal:condition="python:form.pt == \'form_list\'">\n + <tal:block metal:use-macro="form/form_list/macros/form_layout"/>\n + </tal:block>\n + </tal:block>\n </tal:block>\n </tal:block>\n + <tal:block tal:define="portal_object here/portal_url/getPortalObject;\n + dummy python:report_item.popReport(portal_object, render_prefix=render_prefix)"/>\n </tal:block>\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 </table:table>\n </tal:block>\n <tal:block tal:condition="sheet_per_reportsection">\n diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision index 7b27b2519708501bbe7893dc04388ba380c65f9e..83981c0e3aabbb291048f2d619c53f3bb686f5c7 100644 --- a/bt5/erp5_ods_style/bt/revision +++ b/bt5/erp5_ods_style/bt/revision @@ -1 +1 @@ -173 \ No newline at end of file +175 \ No newline at end of file