[Erp5-report] r35055 jerome - in /erp5/trunk/bt5/erp5_ods_style: SkinTemplateItem/portal_sk...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu May 6 14:35:43 CEST 2010
Author: jerome
Date: Thu May 6 14:35:37 2010
New Revision: 35055
URL: http://svn.erp5.org?rev=35055&view=rev
Log:
remove some duplicated parts, and unusued macros; now the listbox title line is displayed in listbox_ods_macro, and rendered differently based on "display_header" variable, which is true in the case of form_list, or the first form_list rendered in form_report
Modified:
erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml
erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml
erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml
erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml
erp5/trunk/bt5/erp5_ods_style/bt/revision
Modified: erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml?rev=35055&r1=35054&r2=35055&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_list.xml [utf8] Thu May 6 14:35:37 2010
@@ -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>
Modified: erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml?rev=35055&r1=35054&r2=35055&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml [utf8] Thu May 6 14:35:37 2010
@@ -62,9 +62,8 @@
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
Modified: erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml?rev=35055&r1=35054&r2=35055&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_line_ods_macro.xml [utf8] Thu May 6 14:35:37 2010
@@ -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
Modified: erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml?rev=35055&r1=35054&r2=35055&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/listbox_ods_macro.xml [utf8] Thu May 6 14:35:37 2010
@@ -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
Modified: erp5/trunk/bt5/erp5_ods_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ods_style/bt/revision?rev=35055&r1=35054&r2=35055&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ods_style/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_ods_style/bt/revision [utf8] Thu May 6 14:35:37 2010
@@ -1,1 +1,1 @@
-234
+237
More information about the Erp5-report
mailing list