From 7ee81a0fed7157e9d96dc6bda9083ce4faae55a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 9 Dec 2010 18:48:26 +0000 Subject: [PATCH] list values must be rendered in a loop, item by item. This was not working inside listboxs git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41297 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_ods_style/field_ods_macro.xml | 31 ++++++++++--------- bt5/erp5_ods_style/bt/revision | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml index ad3d74e6bf..b86261d357 100644 --- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml +++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> - <tuple/> - </tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> </pickle> <pickle> <dictionary> @@ -37,7 +34,7 @@ </item> <item> <key> <string>_text</string> </key> - <value> <string encoding="cdata"><![CDATA[ + <value> <unicode encoding="cdata"><![CDATA[ <tal:block xmlns:draw=\'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\' xmlns:office=\'urn:oasis:names:tc:opendocument:xmlns:office:1.0\' xmlns:text=\'urn:oasis:names:tc:opendocument:xmlns:text:1.0\' xmlns:ooo=\'http://openoffice.org/2004/office\' xmlns:number=\'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\' xmlns:dc=\'http://purl.org/dc/elements/1.1/\' xmlns:meta=\'urn:oasis:names:tc:opendocument:xmlns:meta:1.0\' xmlns:table=\'urn:oasis:names:tc:opendocument:xmlns:table:1.0\' xmlns:dr3d=\'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\' xmlns:fo=\'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\' xmlns:style=\'urn:oasis:names:tc:opendocument:xmlns:style:1.0\' xmlns:xforms=\'http://www.w3.org/2002/xforms\' xmlns:form=\'urn:oasis:names:tc:opendocument:xmlns:form:1.0\' xmlns:script=\'urn:oasis:names:tc:opendocument:xmlns:script:1.0\' xmlns:ooow=\'http://openoffice.org/2004/writer\' xmlns:svg=\'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\' xmlns:chart=\'urn:oasis:names:tc:opendocument:xmlns:chart:1.0\' xmlns:dom=\'http://www.w3.org/2001/xml-events\' xmlns:xlink=\'http://www.w3.org/1999/xlink\' xmlns:xsd=\'http://www.w3.org/2001/XMLSchema\' xmlns:xsi=\'http://www.w3.org/2001/XMLSchema-instance\' xmlns:oooc=\'http://openoffice.org/2004/calc\' xmlns:math=\'http://www.w3.org/1998/Math/MathML\' xmlns:tal=\'http://xml.zope.org/namespaces/tal\' xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\' xmlns:metal=\'http://xml.zope.org/namespaces/metal\' office:version=\'1.0\' metal:define-macro="master" tal:attributes=\'dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")\'>\n <tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n @@ -143,12 +140,12 @@ <tal:block tal:condition="python: is_list">\n <table:table-cell tal:define="field python: editable_fields.get(column_id, None)"\n tal:attributes="table:style-name python:is_float and \'figure\' or \'text\'">\n - <text:p tal:condition="python: field is None" \n - tal:content="python: value">\n - </text:p>\n - <text:p tal:condition="python: field is not None"\n - tal:content="python: field.render_pdf(value)">\n - </text:p>\n + <tal:block tal:condition="python: field is None" tal:repeat="item value">\n + <text:p tal:content="item"/>\n + </tal:block>\n + <tal:block tal:condition="python: field is not None" tal:repeat="item value">\n + <text:p tal:content="python: field.render_pdf(item)"/>\n + </tal:block>\n </table:table-cell>\n </tal:block>\n <tal:block tal:condition="python: value is not None and not is_list">\n @@ -162,8 +159,8 @@ <text:p tal:condition="python: field is None"\n tal:content="python: value"/>\n <text:p tal:condition="python: field is not None"\n - tal:content="python: field.render_pdf(value)">\n - </text:p>\n + tal:content="python: field.render_pdf(value)"/>\n + \n </table:table-cell>\n </tal:block>\n <tal:block tal:condition="python: isinstance(value, float)">\n @@ -274,7 +271,7 @@ </tal:block>\n -]]></string> </value> +]]></unicode> </value> </item> <item> <key> <string>content_type</string> </key> @@ -288,9 +285,13 @@ <key> <string>id</string> </key> <value> <string>field_ods_macro</string> </value> </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> <item> <key> <string>title</string> </key> - <value> <string></string> </value> + <value> <unicode></unicode> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision index d3b9819557..cb16690c5e 100644 --- a/bt5/erp5_ods_style/bt/revision +++ b/bt5/erp5_ods_style/bt/revision @@ -1 +1 @@ -246 \ No newline at end of file +249 \ No newline at end of file -- 2.30.9