diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml new file mode 100644 index 0000000000000000000000000000000000000000..0afa094e4b1c6e700eb11bb3c8f75ede4de393e1 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml @@ -0,0 +1,210 @@ +<?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>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </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>"""\n + Create new Document by cloning an existing document\n + or by creating a new document.\n +\n + Pretty messages are provided to the user.\n +"""\n +\n +translateString = context.Base_translateString\n +form_data = context.REQUEST.form\n +\n +# First make sure that no document already exists with the\n +# same portal_type, reference, language and version.\n +if clone:\n + portal_type = context.getPortalType()\n +else:\n + portal_type = form_data[\'clone_portal_type\']\n +\n +# prepare query params\n +kw = {\'portal_type\' : portal_type}\n +\n +# Standard cloning method\n +if clone:\n + # We copy contents in place if possible\n + directory = getattr(context, \'original_container\', None) or context.getParentValue()\n + # Copy and paste the object\n + original_id = getattr(context, \'original_id\', None) or context.getId()\n + # This is required for objects acquired in Web Section\n + clipboard = directory.manage_copyObjects(ids=[original_id])\n + paste_result = directory.manage_pasteObjects(cb_copy_data=clipboard)\n + new_object = directory[paste_result[0][\'new_id\']]\n + message_kind = \'clone\'\n +\n +if not editable_mode: \n + form_id = \'view\'\n +msg = translateString("Created %s ${portal_type}." % message_kind, mapping = kw)\n +return new_object.Base_redirect(form_id, \n + editable_mode=1,\n + keep_items={\'portal_status_message\': msg})\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>clone=1, form_id, editable_mode=0</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </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>3</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>clone</string> + <string>form_id</string> + <string>editable_mode</string> + <string>_getattr_</string> + <string>context</string> + <string>translateString</string> + <string>form_data</string> + <string>portal_type</string> + <string>_getitem_</string> + <string>kw</string> + <string>getattr</string> + <string>None</string> + <string>directory</string> + <string>original_id</string> + <string>clipboard</string> + <string>paste_result</string> + <string>new_object</string> + <string>message_kind</string> + <string>msg</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <int>1</int> + <none/> + <int>0</int> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_createCloneDocument</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml index e9ebe88fcd1d272a1cb82fd7153112fb4f38cc9e..b3ac0972f656c784e3869d50a41f13f38f233d58 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml @@ -204,6 +204,13 @@ <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">New</span>\n </button>\n + <button class="clone" type="submit" title="Clone"\n + tal:condition="python: not list_mode"\n + tal:attributes="name python: \'Base_createCloneDocument:method\'"\n + i18n:attributes="title" i18n:domain="ui">\n + <span class="image"></span>\n + <span class="description" i18n:translate="" i18n:domain="ui">Clone</span>\n + </button>\n <button tal:condition="list_mode" class="delete" type="submit" name="Folder_deleteObjectList:method" title="Delete"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml index e6984d308593eb2e890e970ba7bcdda382627e5e..1c03c3a25117fdb02eacfb6b62fc8358af8c52c3 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml @@ -804,6 +804,10 @@ fieldset.bottom .field .input {\n background-image: url(\'<dtml-var expr="portal_url()">/images/filenew.png\');\n }\n \n +#context_bar .tool_buttons .clone .image {\n + background-image: url(\'<dtml-var expr="portal_url()">/images/fileclone.png\');\n +}\n +\n #context_bar .tool_buttons .jump_first .image {\n background-image: url(\'<dtml-var expr="portal_url()">/images/2leftarrowb.png\');\n }\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/fileclone.png.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/fileclone.png.xml new file mode 100644 index 0000000000000000000000000000000000000000..df728965de8c5581e4df27758fd343a910982653 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/fileclone.png.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="Image" module="OFS.Image"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Cacheable__manager_id</string> </key> + <value> <string>style_cache</string> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>__name__</string> </key> + <value> <string>fileclone.png</string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>image/png</string> </value> + </item> + <item> + <key> <string>data</string> </key> + <value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI +WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1AcZDRMXMK5nmgAAAYhJREFUeNqllcFKw0AQhv+ZbPFB +PJYKBc8ePfsAvl17tw8iBGx7EPQNRKSaxrCb+T3ExMZu0kQHlhyG/fef2W8nQhLb7TPRE2m6xu3t +jWBMkMRm88TD8L5knnu+vLzx9XXHzeaJi8UdSWLo0thhSSJIEoHqT/ry8gLL5YpDDWtXQkSQJEnT +ivv7BwAYLO56T1VFWZa4vr7CbveB9/cM2+0j/ixcua2+qoosy5HnRas1/3IsQpgZ9vtPqCpUFfP5 +7IiiGDVR4RAMIRiyLEdReADAdHoeyWffVcywXK54KK4x/MwMRVGAJCaT5E/UHAmXJRuXzrmGjLHU +uN9uvfcQkWb1XVgfNS1hs0r8VAyhpmXH+7K1+RReNTXel3BO4ZyLU2EWQApIay5xCDVnZxOQDiHY +sXDdAhFCRDpb0kUNWe1rCafpGmm67ix5Pp91UlNXFYIdC5+atfVL66LGzBpCTk63WHRRUx2AluNR +wmOoGem4poYtamJV6Jhf2CE1v1sxamwejsU+amLxBcwsVQMFoSFoAAAAAElFTkSuQmCC</string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <int>22</int> </value> + </item> + <item> + <key> <string>precondition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <int>507</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>22</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 8cb9d84396bef2a990c7ffce27de7e99698e0c1a..d7b14a6c47450ae9b84d7ccecc7de768a95042d9 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -475 \ No newline at end of file +476 \ No newline at end of file