Commit d588d489 authored by Jérome Perrin's avatar Jérome Perrin

reuse TextAreaField.render_odt, which handles properly line breaks

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32420 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c211e5db
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
office:class=\'text\' \n office:class=\'text\' \n
office:version=\'1.0\' \n office:version=\'1.0\' \n
xmlns:tal=\'http://xml.zope.org/namespaces/tal\'\n xmlns:tal=\'http://xml.zope.org/namespaces/tal\'\n
xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\'>\n xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\'\n
tal:define="render_text python: lambda txt, attr_dict={}: context.Base_viewFieldLibrary.my_text_area_field.render_odt(value=txt, attr_dict=attr_dict)">\n
<office:script/>\n <office:script/>\n
<office:font-decls>\n <office:font-decls>\n
<style:font-decl style:name="Tahoma1" fo:font-family="Tahoma"/>\n <style:font-decl style:name="Tahoma1" fo:font-family="Tahoma"/>\n
...@@ -137,7 +138,7 @@ ...@@ -137,7 +138,7 @@
<div tal:omit-tag=\'\' tal:repeat=\'usecase python:here.searchFolder(portal_type="Use Case",sort_on=(("int_index",),), validation_state="validated") or (context,)\'>\n <div tal:omit-tag=\'\' tal:repeat=\'usecase python:here.searchFolder(portal_type="Use Case",sort_on=(("int_index",),), validation_state="validated") or (context,)\'>\n
<text:h text:style-name=\'Heading 2\' text:level=\'2\' i18n:domain="ui" i18n:translate="">Use Case : <span tal:replace=\'usecase/getTitle\'>Title</span></text:h>\n <text:h text:style-name=\'Heading 2\' text:level=\'2\' i18n:domain="ui" i18n:translate="">Use Case : <span tal:replace=\'usecase/getTitle\'>Title</span></text:h>\n
\n \n
<text:p text:style-name=\'Text body\' tal:content=\'usecase/getDescription\'>Use Case Description</text:p>\n <text:p text:style-name=\'Text body\' tal:replace="structure python: render_text(usecase.getDescription(), {\'{http://openoffice.org/2000/text}style-name\': \'Text body\'})">Use Case Description</text:p>\n
\n \n
<tal:block tal:condition="python:usecase.contentValues(filter={\'portal_type\':\'Image\'})">\n <tal:block tal:condition="python:usecase.contentValues(filter={\'portal_type\':\'Image\'})">\n
<text:h text:style-name=\'Heading 3\' text:level=\'3\' i18n:domain="ui" i18n:translate="">Related Requirement Processes</text:h>\n <text:h text:style-name=\'Heading 3\' text:level=\'3\' i18n:domain="ui" i18n:translate="">Related Requirement Processes</text:h>\n
...@@ -184,7 +185,8 @@ ...@@ -184,7 +185,8 @@
<text:p text:style-name=\'P2\' tal:content=\'actor/getTitle\'>Title</text:p>\n <text:p text:style-name=\'P2\' tal:content=\'actor/getTitle\'>Title</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n
<text:p text:style-name=\'P2\' tal:content=\'actor/getDescription\'>Description</text:p>\n \n
<text:p text:style-name=\'P2\' tal:replace="structure python: render_text(actor.getDescription(), {\'{http://openoffice.org/2000/text}style-name\': \'P2\'})">Description</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D2\'>\n <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D2\'>\n
<text:p text:style-name=\'P2\'\n <text:p text:style-name=\'P2\'\n
...@@ -199,7 +201,7 @@ ...@@ -199,7 +201,7 @@
\n \n
<text:h text:style-name=\'Heading 4\' text:level=\'4\' i18n:domain="ui" i18n:translate="">Scenario <span tal:replace=\'repeat/scenario/number\'>1</span> : <span tal:replace=\'python: scenario.getObject().getTitle()\'>Scenario Title</span></text:h>\n <text:h text:style-name=\'Heading 4\' text:level=\'4\' i18n:domain="ui" i18n:translate="">Scenario <span tal:replace=\'repeat/scenario/number\'>1</span> : <span tal:replace=\'python: scenario.getObject().getTitle()\'>Scenario Title</span></text:h>\n
\n \n
<text:p text:style-name=\'Text body\' tal:content=\'python: scenario.getObject().getDescription()\'>Scenario Description</text:p>\n <text:p text:style-name=\'Text body\' tal:replace="structure python: render_text(scenario.getObject().getDescription(), {\'{http://openoffice.org/2000/text}style-name\': \'Text body\'})">Description</text:p>\n
\n \n
<table:table table:style-name=\'Tableau1\' table:name=\'Tableau1\'>\n <table:table table:style-name=\'Tableau1\' table:name=\'Tableau1\'>\n
\n \n
...@@ -236,7 +238,7 @@ ...@@ -236,7 +238,7 @@
<text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getTitle()\'>Index</text:p>\n <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getTitle()\'>Index</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n
<text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getDescription()\'>Description</text:p>\n <text:p text:style-name=\'P2\' tal:replace="structure python: render_text(step.getObject().getDescription(), {\'{http://openoffice.org/2000/text}style-name\': \'P2\'})">Description</text:p>\n
</table:table-cell>\n </table:table-cell>\n
<table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n
<text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getSourceSectionTitle()\'>Actor</text:p>\n <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getSourceSectionTitle()\'>Actor</text:p>\n
...@@ -273,6 +275,10 @@ ...@@ -273,6 +275,10 @@
<key> <string>expand</string> </key> <key> <string>expand</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>filename</string> </key>
<value> <string>object/title_or_id</string> </value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>UseCaseModule_viewUseCaseReportAsSxw</string> </value> <value> <string>UseCaseModule_viewUseCaseReportAsSxw</string> </value>
......
48 50
\ 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