diff --git a/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_request.xml b/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_request.xml index c426f9756691a1a7d247e1bce05d169fe821a99f..7116d34a9b0179c15a2974486ea79bf98172a919 100644 --- a/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_request.xml +++ b/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_request.xml @@ -75,7 +75,11 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>python:here.Person_getCredentialRequestUrl()</string> </value> + <value> <string encoding="cdata"><![CDATA[ + +string:${object_url}/Base_jumpToRelatedObject?base_category=destination_decision&portal_type=Credential+Request + +]]></string> </value> </item> </dictionary> </pickle> @@ -88,7 +92,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>python:here.getDestinationDecisionRelated(portal_type=\'Credential Request\') is not None</string> </value> + <value> <string>python: portal.Base_checkPermission(\'credential_request_module\', \'View\')</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_update.xml b/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_update.xml new file mode 100644 index 0000000000000000000000000000000000000000..8fa373c552a20e8d708ba0aecb3b8836fd9dba18 --- /dev/null +++ b/bt5/erp5_credential/ActionTemplateItem/portal_types/Person/jump_to_credential_update.xml @@ -0,0 +1,100 @@ +<?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_jump</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_jump</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </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>jump_to_credential_update</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>30.2</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Credential Update</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 encoding="cdata"><![CDATA[ + +string:${object_url}/Base_jumpToRelatedObject?base_category=destination_decision&portal_type=Credential+Update + +]]></string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="Expression" module="Products.CMFCore.Expression"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>python: portal.Base_checkPermission(\'credential_update_module\', \'View\')</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/Person_getCredentialRequestUrl.xml b/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/Person_getCredentialRequestUrl.xml deleted file mode 100644 index ef21881d0dd9148daadbfa0a2a7793fc3e2600e9..0000000000000000000000000000000000000000 --- a/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/Person_getCredentialRequestUrl.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?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[ - -""" Return url of subscription request attach to current object.\n -Usefull in jump list"""\n -from ZTUtils import make_query\n -\n -result = context.portal_catalog(\n - portal_type=\'Credential Request\',\n - destination_decision_portal_type=\'Person\',\n - destination_decision_uid=context.getUid()\n - )\n -\n -length = len(result)\n -if length==1:\n - return result[0].absolute_url()\n -elif length>1:\n - return \'%s?%s\' % (context.credential_request_module.absolute_url(),\n - make_query(reset=1,\n - destination_decision_portal_type=\'Person\',\n - destination_decision_uid=context.getUid())\n - )\n - - -]]></string> </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Person_getCredentialRequestUrl</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_credential/bt/revision b/bt5/erp5_credential/bt/revision index 9d239ff80782ef04598a120993de2cc0f9611708..87d78b292a2cd276be148291b1418e5637d7bcc7 100644 --- a/bt5/erp5_credential/bt/revision +++ b/bt5/erp5_credential/bt/revision @@ -1 +1 @@ -321 \ No newline at end of file +322 \ No newline at end of file diff --git a/bt5/erp5_credential/bt/template_action_path_list b/bt5/erp5_credential/bt/template_action_path_list index 5150fa8b1d899b94531fb60182971f63521e59be..f6ed00ccc7494a044ad297e41e0a06ea3d8cc90a 100644 --- a/bt5/erp5_credential/bt/template_action_path_list +++ b/bt5/erp5_credential/bt/template_action_path_list @@ -8,4 +8,5 @@ Credential Update Module | view Credential Update | view Person | credential Person | jump_to_credential_request +Person | jump_to_credential_update System Preference | credential_preference \ No newline at end of file