[Erp5-report] r30894 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Nov 27 16:07:57 CET 2009


Author: jerome
Date: Fri Nov 27 16:07:56 2009
New Revision: 30894

URL: http://svn.erp5.org?rev=30894&view=rev
Log:
if redirect_document_path is set:
- no longer access context, in case the access permission has been revoked while passing transition
- redirect to /view instead of keeping form_id
also use Base_redirect instead of ERP5Site_redirect

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml?rev=30894&r1=30893&r2=30894&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Workflow_statusModify.xml [utf8] Fri Nov 27 16:07:56 2009
@@ -119,18 +119,20 @@
       message = str(message)\n
   else:\n
     message = str(error_message)\n
-  return context.ERP5Site_redirect(\n
-                  \'%s/%s\' % (context.absolute_url(), form_id),\n
+  return context.Base_redirect(form_id,\n
                   keep_items={\'portal_status_message\': message}, **kw)\n
 \n
 portal_status_message = request.get(\'portal_status_message\', translateString(\'Status changed.\'))\n
 \n
 # Allow to redirect to another document\n
-redirect_document_path = request.get(\'redirect_document_path\', context.getRelativeUrl())\n
-redirect_document = context.restrictedTraverse(redirect_document_path)\n
-\n
-return context.ERP5Site_redirect(\n
-                \'%s/%s\' % (redirect_document.absolute_url(), form_id),\n
+redirect_document_path = request.get(\'redirect_document_path\', None)\n
+if redirect_document_path:\n
+  redirect_document = portal.restrictedTraverse(redirect_document_path)\n
+  form_id = \'view\'\n
+else:\n
+  redirect_document = context\n
+\n
+return redirect_document.Base_redirect(form_id,\n
                 keep_items={\'portal_status_message\': portal_status_message})\n
 </string> </value>
         </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=30894&r1=30893&r2=30894&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] Fri Nov 27 16:07:56 2009
@@ -1,1 +1,1 @@
-851
+852




More information about the Erp5-report mailing list