diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_copyRoleList.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_copyRoleList.xml index 2eff6d8b9bef026d42792718f42f903a4dd54344..ed98344ba2becf1e6f1773195e29801aa8d29452 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_copyRoleList.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_copyRoleList.xml @@ -57,6 +57,15 @@ cb_data = context.manage_copyObjects(\n ids=[r.getId() for r in context.contentValues(portal_type=\'Role Information\')])\n \n +if portal_type_group_list:\n + for ti in context.portal_types.contentValues():\n + if ti == context or ti.getId() in portal_type_list:\n + continue\n + for group in ti.getTypeGroupList():\n + if group in portal_type_group_list:\n + portal_type_list.append(ti.getId())\n + break\n +\n for ti in portal_type_list:\n destination_portal_type = context.portal_types[ti]\n if remove_existing_roles:\n @@ -66,7 +75,8 @@ for ti in portal_type_list:\n destination_portal_type.manage_pasteObjects(cb_data)\n \n return context.Base_redirect(form_id,\n - keep_items=dict(portal_status_message=translateString(\'Roles copied\')))\n + keep_items=dict(portal_status_message=translateString(\'Roles copied in ${type_list}\',\n + mapping=dict(type_list=\', \'.join(portal_type_list)))))\n </string> </value> </item> <item> @@ -77,7 +87,7 @@ return context.Base_redirect(form_id,\n </item> <item> <key> <string>_params</string> </key> - <value> <string>remove_existing_roles, portal_type_list, form_id=\'view\'</string> </value> + <value> <string>remove_existing_roles, portal_type_list, portal_type_group_list, form_id=\'view\', **kw</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -97,7 +107,7 @@ return context.Base_redirect(form_id,\n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>3</int> </value> + <value> <int>4</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -105,7 +115,9 @@ return context.Base_redirect(form_id,\n <tuple> <string>remove_existing_roles</string> <string>portal_type_list</string> + <string>portal_type_group_list</string> <string>form_id</string> + <string>kw</string> <string>Products.ERP5Type.Message</string> <string>translateString</string> <string>_getattr_</string> @@ -116,6 +128,7 @@ return context.Base_redirect(form_id,\n <string>r</string> <string>cb_data</string> <string>ti</string> + <string>group</string> <string>_getitem_</string> <string>destination_portal_type</string> <string>dict</string> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog.xml index e4f8c5dd6625c3de10265779d6be0aa60eedc3c9..fa238cae9672b1fa87093935183c00b4a67cb3e4 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog.xml @@ -96,6 +96,7 @@ <key> <string>left</string> </key> <value> <list> + <string>your_portal_type_group_list</string> <string>your_portal_type_list</string> <string>your_remove_existing_roles</string> </list> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_group_list.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_group_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..65938417fd84de1d7257a6e87a188a0d8cb83f83 --- /dev/null +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_group_list.xml @@ -0,0 +1,277 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="MultiListField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_portal_type_group_list</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + <item> + <key> <string>required_not_found</string> </key> + <value> <string>Input is required but no input given.</string> </value> + </item> + <item> + <key> <string>unknown_selection</string> </key> + <value> <string>You selected an item that was not in the list.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Copy roles to the types members of the selected groups</string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>items</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>size</string> </key> + <value> <int>5</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Copy to Portal Types Groups</string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<br /> + +]]></string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: context.getParentValue().newContent(portal_type=\'Base Type\', temp_object=True).getAvailableGroupList()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_list.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_list.xml index 2842e36a55048a7e5bea14c6236576392b3322ff..c1e6e36ce3d8fa427f237af6deceabb244a234e7 100644 --- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_list.xml +++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/BaseType_viewCopyRoleListDialog/your_portal_type_list.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>required</string> </key> - <value> <int>1</int> </value> + <value> <int>0</int> </value> </item> <item> <key> <string>size</string> </key> diff --git a/bt5/erp5_forge/bt/revision b/bt5/erp5_forge/bt/revision index 72b67e0ede18e026aed402b468c5010191c5929c..55b22b1aa9f24be59e8f86153e626c19e03f575e 100644 --- a/bt5/erp5_forge/bt/revision +++ b/bt5/erp5_forge/bt/revision @@ -1 +1 @@ -579 \ No newline at end of file +580 \ No newline at end of file