diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml new file mode 100644 index 0000000000000000000000000000000000000000..95c8e6a4aa0e181a0fd29a65aabaae248d3fbf12 --- /dev/null +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml @@ -0,0 +1,81 @@ +<?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>from Products.ERP5Type.Document import newTempDocument\n +return_list = []\n +i = 1\n +for worklist in context.portal_workflow.listActionInfos():\n + o = newTempDocument(context, str(i))\n + o.edit(\n + count=worklist[\'count\'],\n + title=worklist[\'title\'],\n + worklist_url=worklist[\'url\'],\n + \n + )\n + return_list.append(o)\n + i+=1\n +\n +return return_list\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>*args, **kwargs</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ERP5Site_getWorklistObjectList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget.xml index 6fbe56d6ceadb2bba84e7b9a5209c982a4c6caf4..b934e0cfa70193fabd679ff1b6868056bb98d2e1 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget.xml @@ -2,7 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <global name="ERP5Form" module="Products.ERP5Form.Form"/> </pickle> <pickle> <dictionary> @@ -19,12 +19,7 @@ <item> <key> <string>_asgns</string> </key> <value> - <dictionary> - <item> - <key> <string>name_subpath</string> </key> - <value> <string>traverse_subpath</string> </value> - </item> - </dictionary> + <dictionary/> </value> </item> </dictionary> @@ -33,68 +28,123 @@ </value> </item> <item> - <key> <string>_text</string> </key> - <value> <unicode encoding="cdata"><![CDATA[ - -<tal:block tal:define="request python: context.REQUEST;\n - box_relative_url python: request.get(\'box_relative_url\',\'\');\n - box python: context.restrictedTraverse(box_relative_url);\n - preferences box/KnowledgeBox_getDefaultPreferencesDict;\n - actions python:getattr(context,\'portal_workflow\').listActionInfos();\n - absolute_url context/absolute_url;\n - portal_url context/portal_url;\n - box_id python: \'visual_\'+str(box.getId())">\n -\n -<div class="worklist_list">\n -\n - <!-- Refresh -->\n -\n - <a class="right" \n - tal:attributes="id python:\'title_\'+box.getId();\n - onclick python:context.KnowledgePad_generateAjaxCall(absolute_url+\'/\'+\'ERP5Site_viewWorklistGadget\',box,box_id)"><img alt ="" src="refresh.png"/></a>\n -\n - <!-- Message if Worklists are empty -->\n -\n - <h5 tal:condition="not:actions">For the moment, all your worklists are empty</h5>\n -\n - <!-- List of Worklists -->\n -\n - <ul tal:condition="actions">\n - <li tal:repeat="action actions"\n - tal:attributes="id python:\'li\'+box_id+\'_\'+str(repeat[\'action\'].index)">\n - <tal:block >\n - <a tal:attributes="href python: absolute_url+action[\'url\'][len(portal_url):]"\n - tal:content="action/title"></a>\n - <div tal:attributes="id python:\'div_\'+box.getId()+\'_\'+str(repeat[\'action\'].index)"></div>\n - </tal:block>\n - </li>\n - </ul>\n -\n -</div>\n -</tal:block>\n - - -]]></unicode> </value> - </item> - <item> - <key> <string>content_type</string> </key> - <value> <string>text/html</string> </value> - </item> - <item> - <key> <string>expand</string> </key> - <value> <int>0</int> </value> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>left</string> + <string>right</string> + <string>center</string> + <string>bottom</string> + <string>hidden</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>bottom</string> </key> + <value> + <list> + <string>listbox</string> + </list> + </value> + </item> + <item> + <key> <string>center</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>left</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>right</string> </key> + <value> + <list/> + </value> + </item> + </dictionary> + </value> </item> <item> <key> <string>id</string> </key> <value> <string>ERP5Site_viewWorklistGadget</string> </value> </item> <item> - <key> <string>output_encoding</string> </key> - <value> <string>utf-8</string> </value> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>ERP5Site_viewWorklistGadget</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>gadget_view</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> </item> <item> <key> <string>title</string> </key> - <value> <unicode></unicode> </value> + <value> <string>Worklists</string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_action_title</string> </key> + <value> <string></string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget/listbox.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget/listbox.xml new file mode 100644 index 0000000000000000000000000000000000000000..035449e16efef552a6229fab21dea99447ac4563 --- /dev/null +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_viewWorklistGadget/listbox.xml @@ -0,0 +1,152 @@ +<?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>editable_columns</string> + <string>list_method</string> + <string>search</string> + <string>title</string> + <string>url_columns</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>title</string> + <string>Title</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>editable_columns</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_gadget_listbox</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewKnowledgePadFieldLibrary</string> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>search</string> </key> + <value> <int>0</int> </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>Worklist</string> </value> + </item> + <item> + <key> <string>url_columns</string> </key> + <value> + <list> + <tuple> + <string>title</string> + <string>Worklist_getUrl</string> + </tuple> + </list> + </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>ERP5Site_getWorklistObjectList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/Worklist_getUrl.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/Worklist_getUrl.xml new file mode 100644 index 0000000000000000000000000000000000000000..50f19f0dda53f2d77658f8afd86ba64232b91401 --- /dev/null +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/Worklist_getUrl.xml @@ -0,0 +1,67 @@ +<?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>return context.getProperty(\'worklist_url\')\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>*args, **kwargs</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Worklist_getUrl</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index f0a7147fa36c03ba4f10e2dc7636d4204dfc94e0..45b1ccee2321964dc98e3f1141ca30e395bfff9f 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -740 \ No newline at end of file +741 \ No newline at end of file