Commit 70f16a03 authored by Ivan Tyagov's avatar Ivan Tyagov

In Web Mode we can have a temporary Web Site objects created based on current...

In Web Mode we can have a temporary Web Site objects created based on current language, takem this into account when determine right active pad.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41443 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent df26bf6f
...@@ -74,15 +74,20 @@ active_knowledge_pad, knowledge_pads = \\\n ...@@ -74,15 +74,20 @@ active_knowledge_pad, knowledge_pads = \\\n
if active_knowledge_pad is not None:\n if active_knowledge_pad is not None:\n
return active_knowledge_pad, knowledge_pads\n return active_knowledge_pad, knowledge_pads\n
\n \n
# in Web Mode we can have a temporary Web Site objects created based on current language\n
real_context = context\n
if context.isTempObject():\n
real_context = context.getParentValue()\n
\n
# first filter if we have a custom Pad for the context\n # first filter if we have a custom Pad for the context\n
for knowledge_pad in knowledge_pads:\n for knowledge_pad in knowledge_pads:\n
pad_state = knowledge_pad.getValidationState()\n pad_state = knowledge_pad.getValidationState()\n
publication_section = knowledge_pad.getPublicationSectionValue()\n publication_section = knowledge_pad.getPublicationSectionValue()\n
if publication_section == context and pad_state in visible_state_list:\n if publication_section == real_context and pad_state in visible_state_list:\n
if publication_section.getPortalType() == \'Web Site\' and default_pad_group in MARKER:\n if publication_section.getPortalType() == \'Web Site\' and default_pad_group in MARKER:\n
# ERP5 Web Site front gadget\n # ERP5 Web Site front gadget\n
return knowledge_pad, knowledge_pads\n return knowledge_pad, knowledge_pads\n
elif publication_section == context and knowledge_pad.getGroup() == default_pad_group:\n elif publication_section == real_context and knowledge_pad.getGroup() == default_pad_group:\n
# some Web Section can have a customized EXPLICILY "sticked" Pad\n # some Web Section can have a customized EXPLICILY "sticked" Pad\n
return knowledge_pad, knowledge_pads\n return knowledge_pad, knowledge_pads\n
elif publication_section == None and default_pad_group in MARKER and pad_state in visible_state_list:\n elif publication_section == None and default_pad_group in MARKER and pad_state in visible_state_list:\n
...@@ -149,6 +154,7 @@ return None, knowledge_pads\n ...@@ -149,6 +154,7 @@ return None, knowledge_pads\n
<string>_getiter_</string> <string>_getiter_</string>
<string>active_pad</string> <string>active_pad</string>
<string>active_knowledge_pad</string> <string>active_knowledge_pad</string>
<string>real_context</string>
<string>knowledge_pad</string> <string>knowledge_pad</string>
<string>pad_state</string> <string>pad_state</string>
<string>publication_section</string> <string>publication_section</string>
......
658 660
\ 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