Commit c3bed357 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Updated Base_edit to support reuse from erp5_web. Added proxy Manager to...

Updated Base_edit to support reuse from erp5_web. Added proxy Manager to Folder_reindexObjectList so that reindexing does not fail. Updated worklist to use new portal_type variable. Use compact titles in predicates.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13356 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 811127a8
...@@ -247,18 +247,24 @@ try:\n ...@@ -247,18 +247,24 @@ try:\n
except ActivityPendingError,e:\n except ActivityPendingError,e:\n
message = N_("%s" % e)\n message = N_("%s" % e)\n
\n \n
if not(ignore_layout) and context.getApplicableLayout() :\n ignore_layout = int(ignore_layout)\n
redirect_url = \'%s/%s?editable_mode=1\' % (context.REQUEST.URL1, form_id)\n editable_mode = int(editable_mode)\n
elif not selection_index:\n \n
redirect_url = \'%s/%s?portal_status_message=%s\' % (context.absolute_url(),\n if not selection_index:\n
redirect_url = \'%s/%s?ignore_layout:int=%s&editable_mode:int=%s&portal_status_message=%s\' % (\n
context.absolute_url(),\n
form_id,\n form_id,\n
ignore_layout,\n
editable_mode,\n
message)\n message)\n
else:\n else:\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&portal_status_message=%s\' % (\n redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&ignore_layout:int=%s&editable_mode=%s&portal_status_message=%s\' % (\n
context.absolute_url(),\n context.absolute_url(),\n
form_id,\n form_id,\n
selection_index,\n selection_index,\n
selection_name,\n selection_name,\n
ignore_layout,\n
editable_mode,\n
message)\n message)\n
\n \n
return request[\'RESPONSE\'].redirect(redirect_url)\n return request[\'RESPONSE\'].redirect(redirect_url)\n
...@@ -280,7 +286,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n ...@@ -280,7 +286,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>form_id, selection_index=0, selection_name=\'\', dialog_id=\'\', ignore_layout=None</string> </value> <value> <string>form_id, selection_index=0, selection_name=\'\', dialog_id=\'\', ignore_layout=0, editable_mode=1</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -300,7 +306,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n ...@@ -300,7 +306,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>5</int> </value> <value> <int>6</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -311,6 +317,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n ...@@ -311,6 +317,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n
<string>selection_name</string> <string>selection_name</string>
<string>dialog_id</string> <string>dialog_id</string>
<string>ignore_layout</string> <string>ignore_layout</string>
<string>editable_mode</string>
<string>Products.Formulator.Errors</string> <string>Products.Formulator.Errors</string>
<string>FormValidationError</string> <string>FormValidationError</string>
<string>Products.CMFActivity.Errors</string> <string>Products.CMFActivity.Errors</string>
...@@ -344,6 +351,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n ...@@ -344,6 +351,7 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n
<string>_apply_</string> <string>_apply_</string>
<string>encapsulated_editor</string> <string>encapsulated_editor</string>
<string>e</string> <string>e</string>
<string>int</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -359,7 +367,8 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n ...@@ -359,7 +367,8 @@ return request[\'RESPONSE\'].redirect(redirect_url)\n
<int>0</int> <int>0</int>
<string></string> <string></string>
<string></string> <string></string>
<none/> <int>0</int>
<int>1</int>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -83,7 +83,8 @@ new_object = module.newContent(portal_type=portal_type)\n ...@@ -83,7 +83,8 @@ new_object = module.newContent(portal_type=portal_type)\n
\n \n
# Redirect to new content with translated message\n # Redirect to new content with translated message\n
portal_status_message = translateString("New ${portal_type} created.", mapping = dict(portal_type = portal_type))\n portal_status_message = translateString("New ${portal_type} created.", mapping = dict(portal_type = portal_type))\n
return new_object.Base_redirect(\'view\', keep_items = dict(portal_status_message=portal_status_message))\n return new_object.Base_redirect(\'view\', keep_items = dict(portal_status_message=portal_status_message,\n
editable_mode=1))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -109,6 +109,14 @@ for id in id_list:\n ...@@ -109,6 +109,14 @@ for id in id_list:\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>id_list, object_tag=None, object_after_tag=None, object_priority=1, sql_catalog_id=None, passive_commit=1</string> </value> <value> <string>id_list, object_tag=None, object_after_tag=None, object_priority=1, sql_catalog_id=None, passive_commit=1</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
......
...@@ -81,10 +81,10 @@ category_list = []\n ...@@ -81,10 +81,10 @@ category_list = []\n
\n \n
for item in mixed_list:\n for item in mixed_list:\n
if item==\'destination_region\':\n if item==\'destination_region\':\n
item = \'region\'\n item = \'region\' # This must be made more generic\n
category_list += [\'destination_region/\' + x for x in context.portal_categories[item].getCategoryChildRelativeUrlList()]\n category_list += [\'destination_region/\' + x for x in context.portal_categories[item].getCategoryChildCompactLogicalPathItemList(base=1)]\n
else:\n else:\n
category_list += context.portal_categories[item].getCategoryChildRelativeUrlList()\n category_list += context.portal_categories[item].getCategoryChildCompactLogicalPathItemList(base=1)\n
\n \n
return category_list\n return category_list\n
</string> </value> </string> </value>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
Base_viewSearchResultList?validation_state=draft&reset=1 Base_viewSearchResultList?validation_state=draft&portal_type=%(portal_type)s&reset=1
]]></string> </value> ]]></string> </value>
</item> </item>
......
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