Commit 43b2911c authored by Ivan Tyagov's avatar Ivan Tyagov

Make a genericKnowledge Pad column renderer rather than support 3 different hard coded ones .

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40684 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bc1185a9
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block \n
tal:define="mode python: \'web_section\';\n
default_pad_group python: options.get(\'default_pad_group\', None);\n
isAnonymousKnowledgePadUsed python: options.get(\'use_anonymous_knowledge_pad\', False);\n
dummy python: request.set(\'is_anonymous_knowledge_pad_used\', isAnonymousKnowledgePadUsed);\n
knowledge_pads python: here.ERP5Site_getKnowledgePadListForUser(\n
mode=mode,\n
default_pad_group=default_pad_group);\n
struct python: here.WebSite_getActiveKnowledgePadForUser(knowledge_pads, \n
default_pad_group);\n
active_knowledge_pad python: struct[0];\n
knowledge_pads python: struct[1];\n
hasUserActivity python: here.ERP5Site_hasUserActivity(\n
active_knowledge_pad,\n
mode=mode,\n
default_pad_group=default_pad_group);\n
isAnon python: context.portal_membership.isAnonymousUser();\n
createDefaultPadForUser python: len(knowledge_pads)==0 and\n
not hasUserActivity;\n
waitForActivitiesOnServer python: active_knowledge_pad is None and\n
hasUserActivity;\n
current_web_section python:\n
context.REQUEST.get(\'current_web_section\', here);\n
current_web_section python:\n
test(current_web_section.getPortalType()==\'Web Site\',\n
here, current_web_section);\n
current_web_section_url python: current_web_section.absolute_url();\n
cancel_url current_web_section_url;">\n
\n
<tal:block tal:condition="python: not createDefaultPadForUser and \n
not waitForActivitiesOnServer and\n
active_knowledge_pad is not None">\n
<div class="portal-column" \n
id="portal-column-2"\n
tal:attributes="class python: test((isAnon or isAnonymousKnowledgePadUsed), \n
\'portal-column-undraggable\', \n
\'portal-column\')"\n
tal:define="layout active_knowledge_pad/KnowledgePad_getBoxColumnLayout;">\n
\n
<span tal:condition="python: len(layout)>=3"\n
tal:replace="structure python:\n
active_knowledge_pad.KnowledgePad_viewColumnWidget(section_layout=layout[2],\n
real_context=here,\n
cancel_url=cancel_url)"/>\n
</div>\n
</tal:block>\n
\n
</tal:block>\n
\n
]]></unicode> </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>WebSection_viewColumnThree</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Right Column</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block \n
tal:define="mode python: \'web_section\';\n
default_pad_group python: options.get(\'default_pad_group\', None);\n
isAnonymousKnowledgePadUsed python: options.get(\'use_anonymous_knowledge_pad\', False);\n
dummy python: request.set(\'is_anonymous_knowledge_pad_used\', isAnonymousKnowledgePadUsed);\n
knowledge_pads python: here.ERP5Site_getKnowledgePadListForUser(\n
mode=mode,\n
default_pad_group=default_pad_group);\n
struct python: here.WebSite_getActiveKnowledgePadForUser(knowledge_pads, \n
default_pad_group);\n
active_knowledge_pad python: struct[0];\n
knowledge_pads python: struct[1];\n
hasUserActivity python: here.ERP5Site_hasUserActivity(\n
active_knowledge_pad,\n
mode=mode,\n
default_pad_group=default_pad_group);\n
isAnon python: context.portal_membership.isAnonymousUser();\n
createDefaultPadForUser python: len(knowledge_pads)==0 and\n
not hasUserActivity;\n
waitForActivitiesOnServer python: active_knowledge_pad is None and\n
hasUserActivity;\n
current_web_section python:\n
context.REQUEST.get(\'current_web_section\', here);\n
current_web_section python:\n
test(current_web_section.getPortalType()==\'Web Site\',\n
here, current_web_section);\n
current_web_section_url python: current_web_section.absolute_url();\n
cancel_url current_web_section_url;">\n
\n
<tal:block tal:condition="python: not createDefaultPadForUser and \n
not waitForActivitiesOnServer and\n
active_knowledge_pad is not None">\n
\n
<div class="portal-column" \n
id="portal-column-1"\n
tal:attributes="class python: test((isAnon or isAnonymousKnowledgePadUsed), \n
\'portal-column-undraggable\', \n
\'portal-column\')"\n
tal:define="layout active_knowledge_pad/KnowledgePad_getBoxColumnLayout;">\n
\n
<span tal:condition="python: len(layout)>=2"\n
tal:replace="structure python:\n
active_knowledge_pad.KnowledgePad_viewColumnWidget(section_layout=layout[1],\n
real_context=here,\n
cancel_url=cancel_url)"/>\n
</div>\n
</tal:block>\n
\n
</tal:block>\n
\n
]]></unicode> </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>WebSection_viewColumnTwo</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Center Column</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -37,9 +37,12 @@
<value> <unicode encoding="cdata"><![CDATA[
<tal:block \n
tal:define="mode python: \'web_section\';\n
tal:define="mode python: options.get(\'mode\', \'web_section\');\n
default_pad_group python: options.get(\'default_pad_group\', None);\n
isAnonymousKnowledgePadUsed python: options.get(\'use_anonymous_knowledge_pad\', False);\n
pad_column python: options.get(\'pad_column\', 0);\n
create_default_pad python: options.get(\'create_default_pad\', False);\n
make_security_check python: options.get(\'make_security_check\', False);\n
dummy python: request.set(\'is_anonymous_knowledge_pad_used\', isAnonymousKnowledgePadUsed);\n
knowledge_pads python: here.ERP5Site_getKnowledgePadListForUser(\n
mode=mode,\n
......@@ -54,7 +57,7 @@
default_pad_group=default_pad_group);\n
isAnon python: context.portal_membership.isAnonymousUser();\n
createDefaultPadForUser python: len(knowledge_pads)==0 and\n
not hasUserActivity;\n
not hasUserActivity and create_default_pad;\n
waitForActivitiesOnServer python: active_knowledge_pad is None and\n
hasUserActivity;\n
current_web_section python:\n
......@@ -76,15 +79,15 @@
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/disable_server_integration"> Disable slot</span>\n
\n
<div class="portal-column" \n
id="portal-column-0"\n
tal:attributes="class python: test(isAnon or isAnonymousKnowledgePadUsed, \n
\'portal-column-undraggable\', \n
\'portal-column\')"\n
\'portal-column\');\n
id python: \'portal-column-%s\' %pad_column"\n
tal:define="layout active_knowledge_pad/KnowledgePad_getBoxColumnLayout;">\n
\n
<span tal:condition="python: len(layout)>=1"\n
<span tal:condition="python: len(layout)>=pad_column+1"\n
tal:replace="structure python:\n
active_knowledge_pad.KnowledgePad_viewColumnWidget(section_layout=layout[0], \n
active_knowledge_pad.KnowledgePad_viewColumnWidget(section_layout=layout[pad_column], \n
real_context=here,\n
cancel_url=cancel_url)"/>\n
</div>\n
......@@ -113,9 +116,10 @@
</div>\n
\n
</div>\n
\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/knowledge_pad_security_check"> Security check\n
</span>\n
\n
<tal:block tal:condition="make_security_check">\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/knowledge_pad_security_check"/>\n
</tal:block>\n
\n
</tal:block>
......@@ -131,7 +135,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_viewColumnOne</string> </value>
<value> <string>WebSection_viewKnowledgePadColumn</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......@@ -139,7 +143,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Left Column</unicode> </value>
<value> <unicode>Pad column renderer</unicode> </value>
</item>
</dictionary>
</pickle>
......
618
\ No newline at end of file
619
\ 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