Commit aa16ad1a authored by Ivan Tyagov's avatar Ivan Tyagov

Make it possible to render an arbitrary number of columns (not hard coded to 3 any more).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40912 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dfdcffd9
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<div id="page_wrapper" \n <div tal:define="layout here/KnowledgePad_getBoxColumnLayout;\n
tal:define="layout here/KnowledgePad_getBoxColumnLayout;\n
real_context python: options.get(\'real_context\', None);\n real_context python: options.get(\'real_context\', None);\n
cancel_url python: options.get(\'cancel_url\', None);\n cancel_url python: options.get(\'cancel_url\', None);\n
isAnon python: here.portal_membership.isAnonymousUser();\n isAnon python: here.portal_membership.isAnonymousUser();\n
...@@ -50,41 +49,23 @@ ...@@ -50,41 +49,23 @@
\'portal-column\');"\n \'portal-column\');"\n
tal:attributes="id page_wrapper_id">\n tal:attributes="id page_wrapper_id">\n
\n \n
<!-- No gadgets message -->\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget_message"/> \n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget_message"/> \n
\n \n
<div id="portal-column-0"\n <!-- Render pad columns -->\n
tal:attributes="class column_css_class"\n <tal:block tal:repeat="column_index python: range(0, columns)">\n
tal:condition="python: columns>=1">\n <div tal:attributes="class column_css_class;\n
id string:portal-column-${column_index}"\n
tal:condition="python: columns>=1+column_index">\n
\n \n
<tal:block tal:condition="python: len(layout)>=1">\n <tal:block tal:condition="python: len(layout)>=1+column_index"\n
<span tal:replace="structure python:\n tal:replace="structure python:\n
here.KnowledgePad_viewColumnWidget(section_layout=layout[0],\n here.KnowledgePad_viewColumnWidget(section_layout=layout[column_index],\n
real_context=real_context,\n real_context=real_context,\n
cancel_url=cancel_url)"/>\n cancel_url=cancel_url)"/>\n
</tal:block> \n
</div>\n
\n \n
<div id="portal-column-1"\n </div>\n
tal:attributes="class column_css_class"\n </tal:block>\n
tal:condition="python: columns>=2">\n
<tal:block tal:condition="python: len(layout)>=2">\n
<span tal:replace="structure python:\n
here.KnowledgePad_viewColumnWidget(section_layout=layout[1],\n
real_context=real_context,\n
cancel_url=cancel_url)"/>\n
</tal:block>\n
</div>\n
\n
<div id="portal-column-2"\n
tal:attributes="class column_css_class"\n
tal:condition="python: columns>=3">\n
<tal:block tal:condition="python: len(layout)>=3">\n
<span tal:replace="structure python:\n
here.KnowledgePad_viewColumnWidget(section_layout=layout[2],\n
real_context=real_context,\n
cancel_url=cancel_url)"/>\n
</tal:block>\n
</div>\n
\n \n
</div>\n </div>\n
......
627 628
\ 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