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 f768019870cb2fab173930fda609a6975fb1308d..d16424cfea31bf2b04b6c1aaf910bc875dd1c049 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 @@ -50,7 +50,7 @@ xmlns:metal=\'http://xml.zope.org/namespaces/metal\'\n tal:attributes=\'dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")\'\n office:version=\'1.0\'\n - tal:define="global frame_width python:25.8" metal:define-macro="master"\n + metal:define-macro="master"\n i18n:domain="erp5_ui">\n <tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n <office:body>\n @@ -58,56 +58,21 @@ <table:table table:style-name=\'ta1\' table:print=\'false\' tal:attributes="table:name here/getTitle" i18n:attributes="table:name">\n <tal:block metal:define-macro="form_layout"\n tal:define="dummy python: request.set(\'here\', here);\n + global display_header display_header|python:True;\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 - <tal:block tal:define="column_property python: column_item[1]; column_id python: column_item[0]">\n - <table:table-column table:style-name=\'co2\' table:default-cell-style-name=\'report-column-title\'/>\n - </tal:block>\n - </tal:block>\n - <table:table-header-rows>\n - <table:table-row table:style-name=\'ro4\'>\n - <tal:block tal:condition="python: is_report_tree_mode">\n - <table:table-cell table:style-name=\'report-column-title\' table:number-columns-spanned=\'1\' office:value-type=\'string\' >\n - <tal:block tal:condition="listboxline/getSectionName">\n - <text:p tal:content="python: here.Localizer.erp5_ui.gettext(listboxline.getSectionName()).encode(\'utf-8\')"/>\n - </tal:block>\n - </table:table-cell>\n - </tal:block>\n - <tal:block tal:condition="listboxline/isTitleLine">\n - <tal:block tal:repeat="column_item listboxline/getColumnItemList">\n - <tal:block tal:define="column_property python: column_item[1]; column_id python: column_item[0]">\n - <tal:block tal:condition="python: column_property is not None" >\n - <table:table-cell table:number-rows-spanned=\'1\' table:style-name=\'report-column-title\' table:number-columns-spanned=\'1\' office:value-type=\'string\' >\n - <text:p i18n:translate="" i18n:domain="ui" tal:content="column_property">\n - </text:p>\n - </table:table-cell>\n - </tal:block>\n - <tal:block tal:condition="python: column_property is None">\n - <table:table-cell table:number-rows-spanned=\'1\' table:style-name=\'report-column-title\' table:number-colwithdrawnumns-spanned=\'1\' office:value-type=\'string\'>\n - <text:p tal:content="python: \'\'">\n - </text:p>\n - </table:table-cell>\n - </tal:block>\n - </tal:block>\n - </tal:block>\n - </tal:block>\n - </table:table-row>\n - </table:table-header-rows>\n - </tal:block>\n - <tal:block metal:fill-slot=\'table_bottom_line\'>\n + <tal:block metal:fill-slot=\'table_bottom_line\' \n + tal:define="global display_header python:False;">\n <tal:block tal:replace="nothing"> don\'t write bottom line in case of this form_list, \'Page Format\' of OOo works instead of it.</tal:block>\n </tal:block>\n </tal:block>\n </tal:block>\n - </tal:block>\n + </tal:block>\n </table:table>\n </office:spreadsheet>\n </office:body>\n -</office:document-content>\n - +</office:document-content> ]]></string> </value> </item> 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 9bea6754c9e973ed6655e30ec0aa47b59136827c..270d64ec99e054fe4a6addeb4db53280dc0251a0 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 @@ -62,9 +62,8 @@ dQEAAAAA</string> </value> table:default-cell-style-name=\'report-column-title\'/>\n \n <!-- macro form_layout -->\n - <tal:block metal:define-macro="form_layout">\n + <tal:block metal:define-macro="form_layout" tal:define="display_header python:False">\n <tal:block tal:define="global group_list python:form.get_groups()"/>\n - <!-- Use the user preferences -->\n <tal:block tal:repeat="group python: [g for g in group_list if g not in (\'hidden\', )]">\n <tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n <tal:block tal:condition="python: field_list not in [None, []]">\n diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml index 35101edd4040abee30737ed7aea697685cf7c6c3..0796bcd55525fd2996df138c31d4b6a400649ef2 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml @@ -47,7 +47,7 @@ <tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n <office:scripts/>\n \n - <office:body metal:define-macro="form_layout">\n + <office:body>\n <office:spreadsheet>\n \n <tal:block metal:define-macro="listbox_line">\n @@ -55,47 +55,8 @@ <tal:block tal:condition="python: listbox_line_structure[\'line\'] is not None"\n tal:define="listboxline python: listbox_line_structure[\'line\']">\n \n - <tal:block metal:define-slot="for_form_list"\n - tal:condition="listboxline/isTitleLine">\n - <tal:block metal:define-slot="list_header">\n - <table:table-row table:style-name=\'ro4\'>\n - <tal:block tal:condition="python: is_report_tree_mode">\n - <table:table-cell table:style-name=\'report-column-title\'\n - table:number-columns-spanned=\'1\'\n - office:value-type=\'string\'>\n - <tal:block tal:condition="listboxline/getSectionName">\n - <text:p tal:content="listboxline/getSectionName"/>\n - </tal:block>\n - </table:table-cell>\n - <tal:block tal:repeat="empty_index python: xrange(0, max_section_depth-1)">\n - <table:table-cell table:style-name=\'report-column-title\'\n - table:number-columns-spanned=\'1\'\n - office:value-type=\'string\'>\n - </table:table-cell>\n - </tal:block>\n - </tal:block>\n -\n - <tal:block tal:condition="listboxline/isTitleLine">\n - <tal:block tal:repeat="column_item listboxline/getColumnItemList">\n - <tal:block tal:define="column_property python: column_item[1];\n - column_id python: column_item[0]">\n - <table:table-cell table:number-rows-spanned=\'1\' \n - table:style-name=\'report-column-title\'\n - table:number-columns-spanned=\'1\'\n - office:value-type=\'string\'>\n - <text:p i18n:translate="" i18n:domain="ui"\n - tal:content="python: column_property or \'\'">\n - </text:p>\n - </table:table-cell>\n - </tal:block>\n - </tal:block>\n - </tal:block>\n - </table:table-row>\n - </tal:block>\n - </tal:block>\n -\n + <!-- title line itself is rendered in listbox_ods_macro --> \n <tal:block tal:condition="not:listboxline/isTitleLine">\n -\n <table:table-row>\n <tal:block tal:condition="python: listboxline.isDataLine()">\n <tal:block tal:repeat="empty_index python: xrange(0, max_section_depth)">\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 ecab55c1b35fc92ae9ef477f40f589d305212545..4f31179adaf1014fa3cb6538f199291282b68d00 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 @@ -65,13 +65,48 @@ max_section_depth python: max([x.getSectionDepth() for x in listboxline_list]) + int(is_report_tree_mode);\n " i18n:domain="ui">\n \n - <!-- Define a slot specific for form_list, because in list mode we want to use a \n - <table:table-header-rows> so that header is repeated on all pages, and we can\'t\n - do this in form_view, because only one table-header-rows is allowed in <table:table>.\n - -->\n - <tal:block metal:define-slot="for_form_list"\n - tal:condition="listboxline/isTitleLine">\n - <tal:block metal:define-slot="list_header">\n + <tal:block tal:condition="listboxline/isTitleLine">\n +\n + <tal:block tal:condition="display_header | nothing">\n + <tal:block tal:repeat="column_item listboxline/getColumnItemList">\n + <tal:block tal:define="column_property python: column_item[1]; column_id python: column_item[0]">\n + <table:table-column table:style-name=\'co2\'\n + table:default-cell-style-name=\'report-column-title\'/>\n + </tal:block>\n + </tal:block> \n + \n + <table:table-header-rows>\n + <table:table-row table:style-name=\'ro4\'>\n + <tal:block tal:condition="python: is_report_tree_mode">\n + <table:table-cell table:style-name=\'report-column-title\' table:number-columns-spanned=\'1\' office:value-type=\'string\' >\n + <tal:block tal:condition="listboxline/getSectionName">\n + <text:p tal:content="python: here.Localizer.erp5_ui.gettext(listboxline.getSectionName()).encode(\'utf-8\')"/>\n + </tal:block>\n + </table:table-cell>\n + </tal:block>\n + <tal:block tal:condition="listboxline/isTitleLine">\n + <tal:block tal:repeat="column_item listboxline/getColumnItemList">\n + <tal:block tal:define="column_property python: column_item[1]; column_id python: column_item[0]">\n + <tal:block tal:condition="python: column_property is not None" >\n + <table:table-cell table:number-rows-spanned=\'1\' table:style-name=\'report-column-title\' table:number-columns-spanned=\'1\' office:value-type=\'string\' >\n + <text:p i18n:translate="" i18n:domain="ui" tal:content="column_property">\n + </text:p>\n + </table:table-cell>\n + </tal:block>\n + <tal:block tal:condition="python: column_property is None">\n + <table:table-cell table:number-rows-spanned=\'1\' table:style-name=\'report-column-title\' table:number-colwithdrawnumns-spanned=\'1\' office:value-type=\'string\'>\n + <text:p tal:content="python: \'\'">\n + </text:p>\n + </table:table-cell>\n + </tal:block>\n + </tal:block>\n + </tal:block>\n + </tal:block>\n + </table:table-row>\n + </table:table-header-rows>\n + </tal:block>\n +\n + <tal:block tal:condition="not:display_header">\n <table:table-row table:style-name=\'ro4\'>\n <tal:block tal:repeat="empty_index python: xrange(0, max_section_depth)">\n <table:table-cell table:style-name=\'report-column-title\'\n @@ -92,7 +127,7 @@ </tal:block>\n </tal:block>\n </table:table-row>\n - </tal:block>\n + </tal:block> \n </tal:block>\n \n <tal:block metal:use-macro="here/listbox_line_ods_macro/macros/listbox_line"/>\n diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision index df689d8406115cd383b647e35c7b49dc93703f79..f71beab75f5697f6169cfd1d9147fcee958c1038 100644 --- a/bt5/erp5_ods_style/bt/revision +++ b/bt5/erp5_ods_style/bt/revision @@ -1 +1 @@ -234 \ No newline at end of file +237 \ No newline at end of file