diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Python%20Script/repository_history_view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Python%20Script/repository_history_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..bfe00d4d144c9c8df84c54ebda46a891ea0405f3 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Python%20Script/repository_history_view.xml @@ -0,0 +1,85 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>action_type/object_view</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_view</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>repository_history_view</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>10.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Repository History</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Expression" module="Products.CMFCore.Expression"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/Base_viewRepositoryHistory</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRepositoryHistoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRepositoryHistoryList.xml new file mode 100644 index 0000000000000000000000000000000000000000..94cc52d442f33be1fe742d6c94392c645215542a --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRepositoryHistoryList.xml @@ -0,0 +1,176 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </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 encoding="cdata"><![CDATA[ + +from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError\n +from Products.ERP5Type.Document import newTempBase\n +\n +portal = context.getPortalObject()\n +portal_subversion = portal.portal_subversion\n +\n +# For now we will work only under portal_skins\n +folder_id = context.getParentValue().getId() # replace aq_parent by getParentValue\n + # once portal_skins is erp5 object\n +\n +history_list = []\n +business_template = None\n +for bt in portal.portal_templates.searchFolder(installation_state=\'installed\'):\n + # if installation_state not in catalog, we have to check manually\n + if bt.getInstallationState() != \'installed\':\n + continue\n + if folder_id in bt.getTemplateSkinIdList():\n + business_template = bt.getObject()\n +\n +if business_template is not None:\n + repository_path = \'%s/SkinTemplateItem/portal_skins/%s/%s.xml\' % (\n + business_template.getTitle(), folder_id, context.getId())\n +\n + log_list = portal_subversion.log(repository_path, business_template)\n + for log_dict in log_list:\n + log_dict[\'message\'] = log_dict[\'message\'].replace(\'\\n\', \'<br/>\')\n + temp_object = newTempBase(folder=context, id=\'1\', **log_dict)\n + history_list.append(temp_object)\n +\n +return history_list\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>**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>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>kw</string> + <string>Products.ERP5Subversion.SubversionClient</string> + <string>SubversionSSLTrustError</string> + <string>Products.ERP5Type.Document</string> + <string>newTempBase</string> + <string>_getattr_</string> + <string>context</string> + <string>portal</string> + <string>portal_subversion</string> + <string>folder_id</string> + <string>history_list</string> + <string>None</string> + <string>business_template</string> + <string>_getiter_</string> + <string>bt</string> + <string>repository_path</string> + <string>log_list</string> + <string>log_dict</string> + <string>_getitem_</string> + <string>_write_</string> + <string>_apply_</string> + <string>temp_object</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_getRepositoryHistoryList</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Base_getRepositoryHistoryList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRepositoryHistory/listbox.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRepositoryHistory/listbox.xml new file mode 100644 index 0000000000000000000000000000000000000000..8fcce8f99f627626cef5c2b33502c75738ddc3d3 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRepositoryHistory/listbox.xml @@ -0,0 +1,140 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>columns</string> + <string>list_method</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>listbox</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> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>columns</string> </key> + <value> + <list> + <tuple> + <string>revision</string> + <string>Revision</string> + </tuple> + <tuple> + <string>author</string> + <string>Author</string> + </tuple> + <tuple> + <string>date</string> + <string>Date</string> + </tuple> + <tuple> + <string>message</string> + <string>Changelog</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_listbox</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>listbox</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Method" module="Products.Formulator.MethodField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <string>Base_getRepositoryHistoryList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index f01f3762abdab0d24379a05a383707799a5a81a5..f350689e670a8bd0baea3de5c16ddfb8066e568c 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1675 \ No newline at end of file +1677 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list b/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list index 996e67a32c7b5646b3558817c9cfd7ae9d5001af..e1825874a8e1ed5c4605b2bf5671cddd8c80064c 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list +++ b/product/ERP5/bootstrap/erp5_core/bt/template_action_path_list @@ -53,6 +53,7 @@ Preference Tool | view Preference | html_style_preferences Preference | view Preference | view_template +Python Script | repository_history_view Python Script | view Ram Cache | statistics Ram Cache | view