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

Optimize a bit.

Remove obsoleted method.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44537 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9e78a94
No related merge requests found
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_body</string> </key>
<value> <string>knowledge_pad = context\n
Base_translateString = context.Base_translateString\n
is_web_mode = context.ERP5Site_isWebMode()\n
\n
user_pads = context.ERP5Site_getKnowledgePadListForUser()\n
if is_web_mode:\n
knowledge_pad = context.WebSite_getActiveKnowledgePadForUser(user_pads)\n
else:\n
knowledge_pad = context.ERP5Site_getActiveKnowledgePadForUser(user_pads)\n
\n
knowledge_box = knowledge_pad.newContent(portal_type=\'Knowledge Box\')\n
knowledge_box.setSpecialiseValue(gadget_relative_url)\n
knowledge_box.visible()\n
return Base_translateString(\'Added\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>gadget_relative_url</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>KnowledgePad_addBox</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Add to active knowledge pad knowledge box (obsolete)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,14 +54,15 @@ ...@@ -54,14 +54,15 @@
<tal:block \n <tal:block \n
tal:condition="python: getattr(here, box_id, None) is not None"\n tal:condition="python: getattr(here, box_id, None) is not None"\n
tal:define="box python: getattr(here, box_id);\n tal:define="box python: getattr(here, box_id);\n
box_dom_id python: \'%s\' %box.getRelativeUrl().replace(\'/\', \'_\');\n box_relative_url box/getRelativeUrl;\n
box_dom_id python: \'%s\' %box_relative_url.replace(\'/\', \'_\');\n
view_form_dom_id python: \'%s_content\' %box_dom_id;\n view_form_dom_id python: \'%s_content\' %box_dom_id;\n
edit_form_dom_id python: \'%s_edit_form\' %box_dom_id;\n edit_form_dom_id python: \'%s_edit_form\' %box_dom_id;\n
gadget_title_dom_id python: \'%s_gadget_title\' %box_dom_id;\n gadget_title_dom_id python: \'%s_gadget_title\' %box_dom_id;\n
gadget python: box.getSpecialiseValue();\n gadget python: box.getSpecialiseValue();\n
gadget_state python: gadget.getValidationState();\n gadget_state python: gadget.getValidationState();\n
dummy python: request.set(\'box_relative_url\', box.getRelativeUrl());\n dummy python: request.set(\'box_relative_url\', box_relative_url);\n
dummy python: request.form.update(dict(box_relative_url=box.getRelativeUrl()));\n dummy python: request.form.update(dict(box_relative_url=box_relative_url));\n
edit_form_id gadget/getEditFormId;\n edit_form_id gadget/getEditFormId;\n
view_form_id gadget/getViewFormId;\n view_form_id gadget/getViewFormId;\n
render_type gadget/getRenderType;\n render_type gadget/getRenderType;\n
...@@ -122,9 +123,7 @@ ...@@ -122,9 +123,7 @@
</tal:block>\n </tal:block>\n
\n \n
<tal:block tal:condition="python: edit_form_object is not None"\n <tal:block tal:condition="python: edit_form_object is not None"\n
tal:define="box_relative_url python: box.getRelativeUrl();\n tal:define="form_fields_main_prefix python: \'gadget_preference_%s_field\' %box_dom_id;">\n
box_dom_id python: box_relative_url.replace(\'/\', \'_\');\n
form_fields_main_prefix python: \'gadget_preference_%s_field\' %box_dom_id;">\n
\n \n
<!-- render edit gadget preferences form -->\n <!-- render edit gadget preferences form -->\n
<span tal:replace="structure python: edit_form_object(key_prefix=form_fields_main_prefix)"/>\n <span tal:replace="structure python: edit_form_object(key_prefix=form_fields_main_prefix)"/>\n
......
713 714
\ 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