[Erp5-report] r32903 ivan - /erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 22 09:50:56 CET 2010


Author: ivan
Date: Mon Feb 22 09:50:56 2010
New Revision: 32903

URL: http://svn.erp5.org?rev=32903&view=rev
Log:
Use generic contribute script (Base_contribute) and adjust "Attach File" dialog.

Removed:
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_createNewFile.xml

Removed: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_createNewFile.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_createNewFile.xml?rev=32902&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_createNewFile.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_createNewFile.xml (removed)
@@ -1,204 +1,0 @@
-<?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>translateString = context.Base_translateString\n
-from Products.CMFCore.utils import getToolByName\n
-\n
-if file.filename not in [\'\', None]:\n
-  portal = context.getPortalObject()\n
-\n
-  document_new_content_kw = {\n
-    \'file\': file,\n
-  }\n
-  document_edit_kw = {\n
-    \'follow_up\': context.getRelativeUrl(),\n
-    \'version\': version,\n
-    \'title\': title,\n
-    \'short_title\': short_title,\n
-    \'language\': language,\n
-    \'reference\': reference,\n
-    \'description\': description,\n
-  }\n
-\n
-  container = getToolByName(portal, \'portal_contributions\', None)\n
-  # Do not redirect when using portal_contributions, in order to prevent\n
-  # conflict with automatic metadata detection\n
-  redirect = 0\n
-\n
-  is_authorized = 1\n
-  if container is None:\n
-    container = context\n
-    document_new_content_kw[\'portal_type\'] = portal_type\n
-    redirect = 1\n
-    if portal_type not in [\'%s\' % x.id for x in container.allowedContentTypes()]:\n
-      is_authorized = 0\n
-\n
-  if not portal.portal_membership.checkPermission(\'Add portal content\', container):\n
-    is_authorized = 0\n
-\n
-  if not is_authorized:\n
-    return context.Base_redirect(form_id,\n
-      keep_items={\'portal_status_message\':\n
-                  translateString(\n
-                     "You are not allowed to create this object.")})\n
-\n
-  document = container.newContent(**document_new_content_kw)\n
-  document.edit(**document_edit_kw)\n
-\n
-  message = translateString(\'${portal_type} created successfully.\',\n
-               mapping={\'portal_type\': document.getTranslatedPortalType()})\n
-  if redirect:\n
-    return document.Base_redirect(\'view\', \n
-                                  keep_items=dict(portal_status_message=message))\n
-  else:\n
-    return context.Base_redirect(form_id, \n
-                                 keep_items=dict(portal_status_message=message))\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>portal_type, title, reference, short_title, language, version, description, file, form_id=\'view\', **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>9</int> </value>
-                    </item>
-                    <item>
-                        <key> <string>co_varnames</string> </key>
-                        <value>
-                          <tuple>
-                            <string>portal_type</string>
-                            <string>title</string>
-                            <string>reference</string>
-                            <string>short_title</string>
-                            <string>language</string>
-                            <string>version</string>
-                            <string>description</string>
-                            <string>file</string>
-                            <string>form_id</string>
-                            <string>kw</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
-                            <string>translateString</string>
-                            <string>Products.CMFCore.utils</string>
-                            <string>getToolByName</string>
-                            <string>None</string>
-                            <string>portal</string>
-                            <string>document_new_content_kw</string>
-                            <string>document_edit_kw</string>
-                            <string>container</string>
-                            <string>redirect</string>
-                            <string>is_authorized</string>
-                            <string>_write_</string>
-                            <string>append</string>
-                            <string>$append0</string>
-                            <string>_getiter_</string>
-                            <string>x</string>
-                            <string>_apply_</string>
-                            <string>document</string>
-                            <string>message</string>
-                            <string>dict</string>
-                          </tuple>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_defaults</string> </key>
-            <value>
-              <tuple>
-                <string>view</string>
-              </tuple>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>Base_createNewFile</string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>




More information about the Erp5-report mailing list