Commit 5e2ea9f3 authored by Ivan Tyagov's avatar Ivan Tyagov

Simplify code and reuse macros.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44306 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f9683556
......@@ -47,33 +47,17 @@
This widget displays buttons used to add or stick widgets\n
-->\n
</tal:block>\n
<tal:block tal:condition="here/Base_canUserAddGadget">\n
<tal:block tal:define="\n
mode python: \'web_section\';\n
default_pad_group python: options.get(\'default_pad_group\', None);\n
knowledge_pads python: here.ERP5Site_getKnowledgePadListForUser(mode=mode,\n
default_pad_group=default_pad_group);\n
struct python: here.ERP5Site_getActiveKnowledgePadForUser(knowledge_pads, default_pad_group);\n
active_knowledge_pad python: struct[0];\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
isKnowledgePadTemplateUsed python:\n
request.get(\'is_knowledge_pad_template_used\', 0);\n
editable_mode python: context.REQUEST.get(\'editable_mode\', False);\n
cancel_url string:${current_web_section_url}/view">\n
\n
<ul tal:condition="active_knowledge_pad"\n
class="widget_management_box">\n
<li>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget"> Add Gadgets</span>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/stick"> Stick/Unstick</span>\n
</li>\n
</ul>\n
</tal:block>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/global_definitions"/>\n
\n
<tal:block tal:condition="here/Base_canUserAddGadget">\n
<ul tal:condition="python: active_knowledge_pad is not None"\n
class="widget_management_box">\n
<li>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/add_new_gadget"> Add Gadgets</span>\n
<span metal:use-macro="container/Base_viewKnowledgePadMacroLibrary/macros/stick"> Stick/Unstick</span>\n
</li>\n
</ul>\n
</tal:block>
]]></unicode> </value>
......
......@@ -9,7 +9,9 @@
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
<list>
<string>default</string>
</list>
</value>
</item>
<item>
......@@ -50,6 +52,12 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -69,6 +77,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>widget_management</string> </value>
......@@ -87,4 +99,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.WebSite_viewWidgetManagementButtonsWidget(default_pad_group=\'default_content_pad\', mode=\'web_section\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -101,16 +101,13 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.WebSite_viewWidgetManagementButtonsWidget(default_pad_group=\'default_section_pad\')</string> </value>
<value> <string>python: here.WebSite_viewWidgetManagementButtonsWidget(default_pad_group=\'default_section_pad\', mode=\'web_section\')</string> </value>
</item>
</dictionary>
</pickle>
......
1777
\ No newline at end of file
1778
\ 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