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 @@ ...@@ -36,6 +36,26 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <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 <tal:block metal:define-macro="disable_server_integration">\n
\n \n
<tal:block tal:condition="isKnowledgePadTemplateUsed">\n <tal:block tal:condition="isKnowledgePadTemplateUsed">\n
......
...@@ -36,62 +36,43 @@ ...@@ -36,62 +36,43 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<tal:block \n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/global_definitions"/>\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
\n \n
<div id="gadget_area_wrapper">\n <div id="gadget_area_wrapper">\n
\n \n
<tal:block tal:condition="python: not createDefaultPadForUser and \n <tal:block tal:condition="python: not createDefaultPadForUser and \n
not waitForActivitiesOnServer and\n not waitForActivitiesOnServer and\n
active_knowledge_pad is not None">\n active_knowledge_pad is not None">\n
\n \n
<tal:block tal:condition="not: isAnon"> \n <tal:block tal:condition="not: isAnon"> \n
<div id="pad-navigation-wrapper">\n <div id="pad-navigation-wrapper">\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/navigation"/>\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/navigation"/>\n
</div>\n </div>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/loading_message"/>\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/loading_message"/>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/knowledge_pad_security_check"/> \n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/knowledge_pad_security_check"/> \n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/disable_server_integration"/>\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/disable_server_integration"/>\n
</tal:block>\n </tal:block>\n
\n \n
<!-- Render active Knowledge pad -->\n <!-- Render active Knowledge pad -->\n
<div id="pad-body-wrapper"\n <div id="pad-body-wrapper"\n
tal:condition="active_knowledge_pad">\n tal:condition="active_knowledge_pad">\n
<tal:block tal:replace="structure python: active_knowledge_pad.KnowledgePad_viewDashboardWidget(\n <tal:block tal:replace="structure python: active_knowledge_pad.KnowledgePad_viewDashboardWidget(\n
columns=columns,\n columns=columns,\n
real_context=here,\n real_context=here,\n
cancel_url=cancel_url)"/>\n cancel_url=cancel_url)"/>\n
</div>\n </div>\n
<!-- Hidden dialogs -->\n <!-- Hidden dialogs -->\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/hidden_dialogs"/>\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/hidden_dialogs"/>\n
\n \n
</tal:block>\n </tal:block>\n
\n \n
<!-- Show message that default pad is being prepared. -->\n <!-- Show message that default pad is being prepared. -->\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/create_default_pad_started"/>\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/create_default_pad_started"/>\n
\n \n
<!-- Create (asynch) default pad. -->\n <!-- Create (asynch) default pad. -->\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/create_default_pad"/>\n <span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/create_default_pad"/>\n
\n \n
</div>\n </div>
\n
</tal:block>\n
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
...@@ -109,7 +90,7 @@ ...@@ -109,7 +90,7 @@
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value> <value> <string>iso-8859-15</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value> <value> <string>iso-8859-15</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
682 683
\ 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