Commit 21e9075b authored by Ivan Tyagov's avatar Ivan Tyagov

Use macro which is to be reused in another PT as well.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42586 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb5c6dca
......@@ -36,6 +36,26 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block metal:define-macro="global_definitions">\n
<tal:block \n
tal:define="global mode python: options.get(\'mode\', request.get(\'gadget_mode\', \'erp5_front\'));\n
global default_pad_group python: options.get(\'default_pad_group\', request.get(\'gadget_default_pad_group\', \'\'));\n
kw python: dict(mode=mode, default_pad_group=default_pad_group);\n
knowledge_pads python: here.ERP5Site_getKnowledgePadListForUser(**kw);\n
struct python: here.ERP5Site_getActiveKnowledgePadForUser(knowledge_pads, **kw);\n
global active_knowledge_pad python: struct[0];\n
global knowledge_pads python: struct[1];\n
global columns python: options.get(\'columns\', 3);\n
global hasUserActivity python: here.ERP5Site_hasUserActivity(active_knowledge_pad, **kw);\n
global isAnon python: here.portal_membership.isAnonymousUser();\n
global createDefaultPadForUser python: len(knowledge_pads)==0 and not hasUserActivity;\n
global waitForActivitiesOnServer python: active_knowledge_pad is None and hasUserActivity;\n
global isUserAllowedToCreateKnowledgePads context/Base_isUserAllowedToUseKnowledgePad;\n
global isKnowledgePadTemplateUsed python: request.get(\'is_knowledge_pad_template_used\', 0);\n
global isAnonymousKnowledgePadUsed python: request.get(\'use_anonymous_knowledge_pad\', False);\n
global cancel_url here/absolute_url;"></tal:block>\n
</tal:block>\n
\n
<tal:block metal:define-macro="disable_server_integration">\n
\n
<tal:block tal:condition="isKnowledgePadTemplateUsed">\n
......
......@@ -36,25 +36,9 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block \n
tal:define="mode python: options.get(\'mode\', request.get(\'gadget_mode\', \'erp5_front\'));\n
default_pad_group python: options.get(\'default_pad_group\', request.get(\'gadget_default_pad_group\', \'\'));\n
kw python: dict(mode=mode, default_pad_group=default_pad_group);\n
knowledge_pads python: here.ERP5Site_getKnowledgePadListForUser(**kw);\n
struct python: here.ERP5Site_getActiveKnowledgePadForUser(knowledge_pads, **kw);\n
global active_knowledge_pad python: struct[0];\n
knowledge_pads python: struct[1];\n
columns python: options.get(\'columns\', 3);\n
hasUserActivity python: here.ERP5Site_hasUserActivity(active_knowledge_pad, **kw);\n
isAnon python: here.portal_membership.isAnonymousUser();\n
createDefaultPadForUser python: len(knowledge_pads)==0 and not hasUserActivity;\n
waitForActivitiesOnServer python: active_knowledge_pad is None and hasUserActivity;\n
isUserAllowedToCreateKnowledgePads context/Base_isUserAllowedToUseKnowledgePad;\n
isKnowledgePadTemplateUsed python: request.get(\'is_knowledge_pad_template_used\', 0);\n
isAnonymousKnowledgePadUsed python: request.get(\'use_anonymous_knowledge_pad\', False);\n
cancel_url here/absolute_url;">\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/global_definitions"/>\n
\n
<div id="gadget_area_wrapper">\n
<div id="gadget_area_wrapper">\n
\n
<tal:block tal:condition="python: not createDefaultPadForUser and \n
not waitForActivitiesOnServer and\n
......@@ -88,10 +72,7 @@
<!-- Create (asynch) default pad. -->\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/create_default_pad"/>\n
\n
</div>\n
\n
</tal:block>\n
</div>
]]></unicode> </value>
</item>
......@@ -109,7 +90,7 @@
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -114,7 +114,7 @@
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
682
\ No newline at end of file
683
\ 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