Commit c8a0882e authored by Rie Kozai's avatar Rie Kozai

improve encoding

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15982 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a41f3d20
...@@ -90,7 +90,7 @@ for doc in portal.portal_selections.callSelectionFor(selection_name, context=for ...@@ -90,7 +90,7 @@ for doc in portal.portal_selections.callSelectionFor(selection_name, context=for
action_title= action[\'title\'] \n action_title= action[\'title\'] \n
\n \n
if action_title != \'History\' and action_title != \'Metadata\':\n if action_title != \'History\' and action_title != \'Metadata\':\n
report_section_list.append(ReportSection(path=doc.getPath(), form_id=form_id, level=2, title=\'%s - %s\' % (title, translate(action_title))))\n report_section_list.append(ReportSection(path=doc.getPath(), form_id=form_id, level=2, title=\'%s-%s\' % (title, translate(action_title))))\n
\n \n
return report_section_list\n return report_section_list\n
</string> </value> </string> </value>
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Export a Sheet per ReportSection</string> </value> <value> <string>Export A Sheet Per ReportSection</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -75,13 +75,17 @@ request = context.REQUEST\n ...@@ -75,13 +75,17 @@ request = context.REQUEST\n
landscape = int(request.get(\'landscape\', 0))\n landscape = int(request.get(\'landscape\', 0))\n
if context.pt != \'form_list\':\n if context.pt != \'form_list\':\n
if landscape == 1:\n if landscape == 1:\n
#normal style sheet with preview of landscape\n
return context.Base_getODSStyleSheetLandscape\n return context.Base_getODSStyleSheetLandscape\n
else:\n else:\n
#preview portrait(Default) \n
return context.Base_getODSStyleSheet\n return context.Base_getODSStyleSheet\n
else:\n else:\n
if landscape == 1:\n if landscape == 1:\n
#style sheet for list, there is under line in preview\n
return context.Base_getODSStyleSheetListLandscape\n return context.Base_getODSStyleSheetListLandscape\n
else:\n else:\n
#(Default)\n
return context.Base_getODSStyleSheetListPortrait\n return context.Base_getODSStyleSheetListPortrait\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -99,14 +99,15 @@ ...@@ -99,14 +99,15 @@
</table:table-header-rows>\n </table:table-header-rows>\n
</tal:block>\n </tal:block>\n
<tal:block metal:fill-slot=\'table_bottom_line\'>\n <tal:block metal:fill-slot=\'table_bottom_line\'>\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 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 </tal:block>\n
</table:table>\n </table:table>\n
</office:spreadsheet>\n </office:spreadsheet>\n
</office:body>\n </office:body>\n
</office:document-content> </office:document-content>\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -67,19 +67,18 @@ dQEAAAAA</string> </value> ...@@ -67,19 +67,18 @@ dQEAAAAA</string> </value>
\n \n
<tal:block tal:define="field_list python:form.get_fields_in_group(\'bottom\')">\n <tal:block tal:define="field_list python:form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:define="global column_len python:3"/>\n <tal:block tal:define="global column_len python:3"/>\n
<tal:block tal:repeat="field python:field_list[1:]">\n <tal:block tal:define="field python:field_list[0]">\n
<tal:block tal:condition="python:field.meta_type == \'ListBox\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'ListBox\')">\n <tal:block tal:condition="python:field.meta_type == \'ListBox\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'ListBox\')">\n
<tal:block tal:define="column_list python: field.get_value(\'columns\'); global column_len python: len(column_list)" />\n <tal:block tal:define="column_list python: field.get_value(\'columns\'); global column_len python: len(column_list)" />\n
\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n \n
<table:table table:style-name=\'ta1\' table:print=\'false\' tal:attributes="table:name python: here.getTitle()">\n <table:table table:style-name=\'ta1\' table:print=\'false\' tal:attributes="table:name python: unicode(here.getTitle(), \'utf-8\')">\n
<tal:block metal:define-macro="form_layout">\n <tal:block metal:define-macro="form_layout">\n
<tal:block tal:define="field_errors python: request.get(\'field_errors,{}\'); dummy python: request.set(\'here\', here)">\n <tal:block tal:define="field_errors python: request.get(\'field_errors,{}\'); dummy python: request.set(\'here\', here)">\n
<tal:block tal:repeat="group python: [g for g in form.get_groups() if g not in (\'bottom\', \'hidden\')]">\n <tal:block tal:repeat="group python: [g for g in form.get_groups() if g not in (\'bottom\', \'hidden\')]">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group);">\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 <tal:block tal:condition="python: field_list not in [None, []]">\n
<tal:block tal:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n <tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
...@@ -118,7 +117,7 @@ dQEAAAAA</string> </value> ...@@ -118,7 +117,7 @@ dQEAAAAA</string> </value>
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:define="field_list python: form.get_fields_in_group(\'bottom\')">\n <tal:block tal:define="field_list python:form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
<tal:block metal:use-macro="here/field_ods_macro/macros/field" />\n <tal:block metal:use-macro="here/field_ods_macro/macros/field" />\n
</tal:block>\n </tal:block>\n
......
...@@ -59,8 +59,6 @@ ...@@ -59,8 +59,6 @@
\n \n
<office:body metal:define-macro="form_layout">\n <office:body metal:define-macro="form_layout">\n
<office:spreadsheet>\n <office:spreadsheet>\n
\n
** ##### listbox: must define the field listbox before calling this macro ! ##### **\n
\n \n
<tal:block metal:define-macro="listbox">\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="listboxline_list python: listbox.get_value(\'default\', render_format=\'list\', REQUEST=request);\n
......
...@@ -48,33 +48,31 @@ ...@@ -48,33 +48,31 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string 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">\n <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 <tal:block metal:use-macro="here/style_macros/macros/style_macro"/>\n
<office:scripts/>\n <office:scripts/>\n
\n \n
<office:body metal:define-macro="form_layout">\n <office:body metal:define-macro="form_layout">\n
<office:spreadsheet>\n <office:spreadsheet>\n
\n \n
** ## matrixbox: must define the field matrixbox before calling this macro ! ## **\n
<tal:block metal:define-macro="matrixbox">\n <tal:block metal:define-macro="matrixbox">\n
<tal:block tal:define="list python:matrixbox.get_value(\'default\', render_format=\'list\', REQUEST=request)" >\n <tal:block tal:define="list python:matrixbox.get_value(\'default\', render_format=\'list\', REQUEST=request)" >\n
<!--<tal:block tal:define="pon python:here.log(\'matrixbox\', \'%r\' % list)" />-->\n
<tal:block tal:repeat="tab list">\n <tal:block tal:repeat="tab list">\n
<tal:block tal:repeat="row tab">\n <tal:block tal:repeat="row tab">\n
<table:table-row tal:condition="python: row != [None, None]" table:style-name=\'ro4\'>\n <table:table-row tal:condition="python: row != [None, None]" table:style-name=\'ro4\'>\n
<tal:block tal:repeat="column row">\n <tal:block tal:repeat="column row">\n
<tal:block tal:define="repeat_num repeat/column/number">\n <tal:block tal:define="repeat_num repeat/column/number">\n
<tal:block tal:condition="python:repeat_num == 1">\n <tal:block tal:condition="python:repeat_num == 1">\n
<table:table-cell table:style-name=\'report-column-title\'>\n <table:table-cell table:style-name=\'report-column-title\'>\n
<text:p tal:content="python: column" />\n <text:p tal:content="python: column" />\n
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n
<tal:block tal:condition="python:repeat_num == 2">\n
<table:table-cell table:style-name=\'report-content-heading2-with-lines\'>\n
<text:p tal:content="python: column" />\n
</table:table-cell>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python:repeat_num == 2">\n
<table:table-cell table:style-name=\'report-content-heading2-with-lines\'>\n
<text:p tal:content="python: column" />\n
</table:table-cell>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</table:table-row>\n </table:table-row>\n
</tal:block>\n </tal:block>\n
......
...@@ -59,9 +59,7 @@ ...@@ -59,9 +59,7 @@
<office:body>\n <office:body>\n
<office:spreadsheet>\n <office:spreadsheet>\n
\n \n
<tal:block tal:define="report_item_list python:report_method();\n <tal:block tal:define="report_item_list python:report_method(); field_errors python: request.get(\'field_errors,{}\'); dummy python: request.set(\'here\', here);global sheet_per_reportsection python: int(request.get(\'sheet_per_report_section\', 0));global column_len python:3">\n
field_errors python: request.get(\'field_errors,{}\');\n
dummy python: request.set(\'here\', here);global sheet_per_reportsection python: int(request.get(\'sheet_per_report_section\', 0));global column_len python:3">\n
\n \n
<tal:block tal:define="portal_object here/portal_url/getPortalObject"> \n <tal:block tal:define="portal_object here/portal_url/getPortalObject"> \n
<tal:block tal:condition="python: sheet_per_reportsection == 0">\n <tal:block tal:condition="python: sheet_per_reportsection == 0">\n
...@@ -73,17 +71,17 @@ ...@@ -73,17 +71,17 @@
<tal:block tal:condition="report_item/getTitle" tal:define="level report_item/getLevel">\n <tal:block tal:condition="report_item/getTitle" tal:define="level report_item/getLevel">\n
<tal:block tal:condition="python: level == 1">\n <tal:block tal:condition="python: level == 1">\n
<table:table-cell table:style-name="report-title" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n <table:table-cell table:style-name="report-title" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n
<text:p tal:content="report_item/getTitle" i18n:translate="" i18n:domain="ui"></text:p>\n <text:p tal:content="report_item/getTitle" ></text:p>\n
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: level == 2">\n <tal:block tal:condition="python: level == 2">\n
<table:table-cell table:style-name="report-title2" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n <table:table-cell table:style-name="report-title2" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n
<text:p tal:content="report_item/getTitle" i18n:translate="" i18n:domain="ui"></text:p>\n <text:p tal:content="report_item/getTitle" ></text:p>\n
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: level == 3">\n <tal:block tal:condition="python: level == 3">\n
<table:table-cell table:style-name="report-title3" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n <table:table-cell table:style-name="report-title3" tal:attributes="table:number-columns-spanned python:column_len" office:value-type=\'string\' table:number-rows-spanned=\'1\'>\n
<text:p tal:content="report_item/getTitle" i18n:translate="" i18n:domain="ui"></text:p>\n <text:p tal:content="report_item/getTitle"></text:p>\n
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
...@@ -110,7 +108,7 @@ ...@@ -110,7 +108,7 @@
<tal:block tal:condition="python: sheet_per_reportsection == 1">\n <tal:block tal:condition="python: sheet_per_reportsection == 1">\n
<tal:block tal:repeat="report_item python: report_item_list">\n <tal:block tal:repeat="report_item python: report_item_list">\n
<tal:block tal:condition="python: report_item.getFormId()">\n <tal:block tal:condition="python: report_item.getFormId()">\n
<table:table tal:attributes="table:name report_item/getTitle">\n <table:table tal:attributes="table:name python: unicode(report_item.getTitle(), \'utf-8\')">\n
<tal:block metal:use-macro="here/report_view/macros/make_report_item_table"/>\n <tal:block metal:use-macro="here/report_view/macros/make_report_item_table"/>\n
</table:table>\n </table:table>\n
</tal:block>\n </tal:block>\n
......
...@@ -134,7 +134,8 @@ ...@@ -134,7 +134,8 @@
<style:paragraph-properties fo:text-align=\'center\' fo:margin-left=\'0cm\'/>\n <style:paragraph-properties fo:text-align=\'center\' fo:margin-left=\'0cm\'/>\n
</style:style>\n </style:style>\n
</office:automatic-styles>\n </office:automatic-styles>\n
</tal:block> </tal:block>\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
2007-08-31
*improve encoding
2007-08-30 rie 2007-08-30 rie
*improve name of field and file *improve name of field and file
*move global action into portal_properties *move global action into portal_properties
......
51 59
\ 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