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

Support the cases where listbox or matrixbox is a proxyfied.

Create an unique macro to render any field.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15730 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0fb1493b
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block tal:replace="nothing">\n
Users of this page template must define \'field\' name.\n
It will dispatch to the good macro, and supports proxy fields (in a quite ad-hoc way).\n
</tal:block><tal:block metal:define-macro="field">\n
\n
<tal:block tal:condition="python: field.meta_type == \'MatrixBox\' or (field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'MatrixBox\')">\n
<tal:block tal:define="matrixbox python:field;">\n
<div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n
</tal:block>\n
</tal:block>\n
\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="listbox python:field;" >\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
</tal:block>\n
\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>field_pdf_macro</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -116,24 +116,11 @@ ...@@ -116,24 +116,11 @@
\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:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
\n <tal:block metal:use-macro="here/field_pdf_macro/macros/field" />\n
<tal:block tal:condition="python: field.meta_type == \'MatrixBox\'">\n
<tal:block tal:define="matrixbox python:field;">\n
<div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:condition="python: field.meta_type == \'ListBox\'">\n
<tal:block tal:define="listbox python:field;" >\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n \n
\n </tal:block>\n
</tal:block>\n
</content>\n </content>\n
</document>\n </document>\n
\n \n
......
...@@ -113,20 +113,7 @@ ...@@ -113,20 +113,7 @@
<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:condition="field_list">\n <tal:block tal:condition="field_list">\n
<tal:block tal:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
\n <tal:block metal:use-macro="here/field_pdf_macro/macros/field" />\n
<tal:block tal:condition="python: field.meta_type == \'MatrixBox\'">\n
<tal:block tal:define="matrixbox python:field;">\n
<div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:condition="python: field.meta_type == \'ListBox\'">\n
<tal:block tal:define="listbox python:field;" >\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
......
2007-08-17 jerome
* Add support for cases where matrixbox or listbox is a proxyfield
2007-08-13 jerome 2007-08-13 jerome
* Add a global print action * Add a global print action
......
39 43
\ 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