Commit 5044f98f authored by Yoshinori Okuji's avatar Yoshinori Okuji

2010-05-28 yo

* Make it possible to customize the behavior after a new content is added.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35714 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7de37f84
......@@ -89,10 +89,13 @@ elif doAction0 == \'add\':\n
container=context)\n
preserved_parameters[\'portal_status_message\'] = Base_translateString("Object created.")\n
preserved_parameters[\'editable_mode\'] = 1\n
redirect_url = \'%s/view\' % (new_content.absolute_url(), )\n
# The created object is not a part of the selection, so prevent from displaying the selection navigation controls\n
kw[\'selection_index\']=None\n
kw[\'selection_name\']=None\n
try:\n
tmp_kw = new_content.getRedirectParameterDictAfterAdd(context, **kw)\n
except AttributeError:\n
# Maybe the Product is not upgraded yet.\n
tmp_kw = new_content.Base_getRedirectParameterDictAfterAdd(context, **kw)\n
redirect_url = tmp_kw.pop(\'redirect_url\', new_content.absolute_url() + \'/view\')\n
kw.update(tmp_kw)\n
# Otherwise, check if this is an automatic menu (template)\n
elif doAction0 == \'template\':\n
template_relative_url = \' \'.join(Base_doAction[1:])\n
......@@ -169,16 +172,16 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<string>doAction0</string>
<string>redirect_url</string>
<string>_write_</string>
<string>new_id</string>
<string>type_name</string>
<string>str</string>
<string>new_content</string>
<string>_apply_</string>
<string>tmp_kw</string>
<string>AttributeError</string>
<string>template_relative_url</string>
<string>template</string>
<string>preference</string>
<string>new_content_list</string>
<string>new_content_id</string>
<string>_apply_</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</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># This is the default method for a redirection after being added.\n
return dict(redirect_url=context.absolute_url() + \'/view\', selection_index=None, selection_name=None)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>folder, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>folder</string>
<string>kw</string>
<string>dict</string>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getRedirectParameterDictAfterAdd</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-05-28 yo
* Make it possible to customize the behavior after a new content is added.
2010-03-09
* Display title in breadcrumb if getCompactTranslatedTitle does not exist.
......
This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
Handles page parameters dynamically.
\ No newline at end of file
948
\ No newline at end of file
949
\ 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