Commit 8ca9faa7 authored by Vincent Pelletier's avatar Vincent Pelletier

2006-07-24 vincent

* Re-implement parameters propagation. Allows to remove most of the previously hardcoded value names from the style.
* Keep parameters when going through a workflow transition (ex : "follow bug" in bug module)
* Fixes bugs about form_id & dialog_id not generated the way they are supposed to.
* Move "list mode" button between "previous" and "next" buttons.
* Use "contextual help" preference to display or not the help button on top right - it's the only purpose of this preference.
* Follow the field naming convention for menus.
* Rename all scripts designed for xhtml style to "ERP5XhtmlStyle_" to make it clear. Some are rewrite of "Base_" scripts.
* !BUG!: listbox search fields require quite a lot of work to be cleanly filtered out. This will be hopefully corrected in next version.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8722 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fcd0387b
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
request = context.REQUEST\n
\n
# reinject parameters in kw\n
kw[\'action_name\'] = action_name\n
kw[\'wf_id\'] = wf_id\n
\n
try :\n
# Immediatly invoke a workflow action. Usefull do put as in action box\n
context.portal_workflow.doActionFor(\n
context,\n
action_name,\n
wf_id = wf_id)\n
except ValidationFailed, message:\n
kw[\'portal_status_message\'] = message\n
\n
return context.ERP5XhtmlStyle_redirect("%s/view" % (context.absolute_url(), ), **kw)\n
# vim: syntax=python\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>action_name, wf_id, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>action_name</string>
<string>wf_id</string>
<string>kw</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>_write_</string>
<string>message</string>
<string>_apply_</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_DoWorkflowAction</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>return context.ERP5XhtmlStyle_redirect(cancel_url, **kw)\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>cancel_url, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>cancel_url</string>
<string>kw</string>
<string>_apply_</string>
<string>_getattr_</string>
<string>context</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_cancel</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
Base_doAction = select_action.split()\n
doAction0 = Base_doAction[0]\n
request = context.REQUEST\n
\n
# Reinject parameters in kw\n
kw[\'selection_name\']=selection_name\n
kw[\'uids\']=uids\n
kw[\'listbox_uid\']=listbox_uid\n
kw[\'ignore_layout\']=ignore_layout\n
\n
# Update checked uids\n
if None not in (selection_name, uids, listbox_uid):\n
context.portal_selections.updateSelectionCheckedUidList(selection_name, uids=uids, listbox_uid=listbox_uid, REQUEST=request)\n
\n
# If this is an object, a workflow or a folder, then jump to that view\n
if doAction0 in (\'object\', \'workflow\', \'folder\'):\n
redirect_url = \' \'.join(Base_doAction[1:])\n
if doAction0 == \'object\':\n
kw[\'dialog_category\'] = \'object_action\'\n
# Otherwise, check if this is an automatic menu (add)\n
elif doAction0 == \'add\':\n
new_id = context.generateNewId()\n
type_name = \' \'.join(Base_doAction[1:])\n
new_content = context.newContent(portal_type=type_name,\n
container=context,\n
id=str(new_id))\n
kw[\'portal_status_message\'] = N_("Object+Created.")\n
if not(ignore_layout) and context.getApplicableLayout():\n
kw[\'editable_mode\'] = 1\n
redirect_url = \'%s/view\' % (new_content.WebSite_getDocumentPhysicalPath(), )\n
else:\n
redirect_url = \'%s/view\' % (new_content.absolute_url(), )\n
# The created object is not a part of the selection, so prevent from displaying the selection navigation controls\n
kw[\'selection_index\']=None\n
kw[\'selection_name\']=None\n
# Otherwise, check if this is an automatic menu (template)\n
elif doAction0 == \'template\':\n
template_relative_url = \' \'.join(Base_doAction[1:])\n
template = context.getPortalObject().restrictedTraverse(template_relative_url)\n
if template is not None:\n
preference = template.getParentValue()\n
preference.manage_copyObjects(ids=[template.getId()], REQUEST=request, RESPONSE=None)\n
new_content_list = context.manage_pasteObjects(request[\'__cp\'])\n
new_content_id = new_content_list[0][\'new_id\']\n
new_content = context[new_content_id]\n
new_content.makeTemplateInstance()\n
kw[\'portal_status_message\'] = N_("Template+Created.")\n
redirect_url = \'%s/view\' % ( new_content.absolute_url(), )\n
else:\n
kw[\'portal_status_message\'] = N_("Template+Does+not+Exist.")\n
redirect_url = \'%s/view\' % (context.absolute_url(), )\n
else:\n
redirect_url = request[\'ACTUAL_URL\']\n
kw[\'portal_status_message\'] = N_(\'Error: the action "%s" is not recognised.\' % (doAction0, ))\n
\n
return context.ERP5XhtmlStyle_redirect(redirect_url, **kw)\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>select_action, selection_name=None, uids=None, listbox_uid=None, ignore_layout=None, **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>5</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>select_action</string>
<string>selection_name</string>
<string>uids</string>
<string>listbox_uid</string>
<string>ignore_layout</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>Base_doAction</string>
<string>_getitem_</string>
<string>doAction0</string>
<string>request</string>
<string>_write_</string>
<string>None</string>
<string>redirect_url</string>
<string>new_id</string>
<string>type_name</string>
<string>str</string>
<string>new_content</string>
<string>template_relative_url</string>
<string>template</string>
<string>preference</string>
<string>new_content_list</string>
<string>new_content_id</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5XhtmlStyle_doAction</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>if select_favorite == \'\':\n
return\n
return context.ERP5XhtmlStyle_redirect(select_favorite, **kw)\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>select_favorite, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>select_favorite</string>
<string>kw</string>
<string>_apply_</string>
<string>_getattr_</string>
<string>context</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>ERP5XhtmlStyle_doFavorite</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>if select_jump == \'\':\n
return\n
return context.ERP5XhtmlStyle_redirect(select_jump, **kw)\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>select_jump, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>select_jump</string>
<string>kw</string>
<string>_apply_</string>
<string>_getattr_</string>
<string>context</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>ERP5XhtmlStyle_doJump</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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># XXX Localizer-dependent\n
portal = context.getPortalObject()\n
portal.Localizer.changeLanguage(select_language)\n
\n
# XXX should invalidate cached data specific to current user\n
from Products.ERP5Type.Cache import clearCache\n
clearCache()\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>select_language</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>select_language</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>Products.ERP5Type.Cache</string>
<string>clearCache</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>ERP5XhtmlStyle_doLanguage</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>if select_module == \'\':\n
return\n
return context.ERP5XhtmlStyle_redirect(\'%s/view\' % select_module, **kw)\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>select_module, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>select_module</string>
<string>kw</string>
<string>_apply_</string>
<string>_getattr_</string>
<string>context</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>ERP5XhtmlStyle_doModule</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>def isValid(value_name):\n
"""\n
Return true when the given field name can be propagated, false otherwise.\n
\n
FIXME: _select should be a prefix, not a sufix, to avoid potential collisions with property names.\n
"""\n
if not value_name.startswith(\'field_\') \\\n
and not value_name.startswith(\'subfield_\') \\\n
and not value_name.startswith(\'default_field\') \\\n
and not value_name.startswith(\'select_\') \\\n
or value_name == \'field_id\':\n
return True\n
return False\n
\n
# Remove some special values\n
# FIXME: This list should be mostly empty, every variable not to propagate must have a distinct prefix and thus be handled by isValid.\n
for k in (\'-C\', \'SearchableText\', \'uids\', \'listbox_uid\', \'list_selection_name\', \'list_start\', \'portal_status_message\', \'update_action\', \'dialog_method\', \'cancel_method\', \'title\', \'description\', \'reset\', \'md5_object_uid_list\', \'id\'):\n
if parameter_list.has_key(k):\n
del parameter_list[k]\n
\n
for k in parameter_list.keys():\n
if not isValid(k):\n
del parameter_list[k]\n
\n
return parameter_list\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>parameter_list</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>parameter_list</string>
<string>isValid</string>
<string>_getiter_</string>
<string>k</string>
<string>_getattr_</string>
<string>_write_</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>ERP5XhtmlStyle_filterParameterList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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 encoding="cdata"><![CDATA[
# Return the current action to know which tab we should select\n
# Christophe Dumez <christophe@nexedi.com>\n
\n
for action_list in actions.values():\n
for action in action_list:\n
if current_url == action[\'url\'].split(\'?\')[0]:\n
return action\n
return None\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>current_url, actions</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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>current_url</string>
<string>actions</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>action_list</string>
<string>action</string>
<string>_getitem_</string>
<string>None</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>ERP5XhtmlStyle_getCurrentAction</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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># Disabled until a correct API for html forms is defined.\n
#for k, v in request_form.items():\n
# kw[k]=v\n
#if kw.has_key(\'-C\'):\n
# del kw[\'-C\'] # Why is something like that in the request ? What does it mean ?\n
return kw\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>request_form, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>request_form</string>
<string>kw</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>ERP5XhtmlStyle_getHTTPParameterList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -73,9 +73,8 @@ if workflow_action is not None: # First, the workflow transition case.\n
help = \'%s_%s\' % (help, workflow_action)\n
elif current_action is not None: # Then, we are able to get the action.\n
help = \'%s_%s\' % (help, current_action[\'id\'])\n
elif dialog_id is not None: # Otherwise, get the form we are in.\n
help = \'%s_%s\' % (help, dialog_id)\n
# Otherwise again, just use the portal type as page name.\n
elif current_form_id is not None: # Otherwise, get the form we are in.\n
help = \'%s_%s\' % (help, current_form_id)\n
return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentationBaseUrl(), help)\n
</string> </value>
</item>
......@@ -99,7 +98,7 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'\', current_action=\'\', dialog_id=\'\', workflow_action=\'\'</string> </value>
<value> <string>current_action=\'\', current_form_id=None, workflow_action=\'\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -119,15 +118,14 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>4</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form_id</string>
<string>current_action</string>
<string>dialog_id</string>
<string>current_form_id</string>
<string>workflow_action</string>
<string>_getattr_</string>
<string>context</string>
......@@ -147,15 +145,14 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio
<value>
<tuple>
<string></string>
<string></string>
<string></string>
<none/>
<string></string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getHelpUrl</string> </value>
<value> <string>ERP5XhtmlStyle_getHelpUrl</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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 encoding="cdata"><![CDATA[
# Return first listbox in a form that is enabled and not hidden\n
# Christophe Dumez <christophe@nexedi.com>\n
# This script should be used to detect a listbox without having to name it "listbox"\n
\n
if form is None:\n
form=context\n
\n
if form.meta_type != \'ERP5 Form\':\n
return None\n
\n
# we start with \'bottom\' because most of the time\n
# the listbox is there.\n
for group in (\'bottom\', \'center\', \'left\', \'right\'):\n
for field in form.get_fields_in_group(group):\n
if field.meta_type == \'ListBox\' and not(field[\'hidden\']) and field[\'enabled\']:\n
return field\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form=None</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form</string>
<string>None</string>
<string>context</string>
<string>_getattr_</string>
<string>_getiter_</string>
<string>group</string>
<string>field</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5XhtmlStyle_getListbox</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>from Products.ERP5Type.Cache import CachingMethod, clearCache\n
from ZODB.POSException import ConflictError\n
\n
user = context.portal_membership.getAuthenticatedMember().getUserName()\n
\n
portal = context.getPortalObject()\n
\n
def getModuleItemList(user=None, portal_path=None):\n
gettext = context.Localizer.erp5_ui.gettext\n
item_list = []\n
try :\n
for module_id in portal.objectIds(\'ERP5 Folder\'):\n
try:\n
module = portal[module_id]\n
url = module.getPath()\n
label = module.getTitleOrId()\n
label = gettext(label)\n
item_list.append((label, url))\n
except ConflictError : raise\n
except: pass\n
except ConflictError : raise\n
except: pass\n
\n
def compareModules(a, b): return cmp(a[0], b[0])\n
item_list.sort(compareModules)\n
return item_list\n
\n
getModuleItemList = CachingMethod(getModuleItemList, id=\'ERP5Site_getModuleItemList\')\n
portal_path = context.getPortalObject().getPhysicalPath()\n
return getModuleItemList(user=user, portal_path=portal_path)\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></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>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
<string>clearCache</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>_getattr_</string>
<string>context</string>
<string>user</string>
<string>portal</string>
<string>None</string>
<string>getModuleItemList</string>
<string>portal_path</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>ERP5XhtmlStyle_getModuleItemList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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 encoding="cdata"><![CDATA[
# Return first listbox in a form that is enabled and not hidden\n
# Christophe Dumez <christophe@nexedi.com>\n
# This script should be used to detect a listbox without having to name it "listbox"\n
\n
if form is None:\n
form=context\n
\n
if form.meta_type != \'ERP5 Form\':\n
return None\n
\n
# we start with \'bottom\' because most of the time\n
# the listbox is there.\n
for group in (\'bottom\', \'center\', \'left\', \'right\'):\n
for field in form.get_fields_in_group(group):\n
if field.meta_type == \'PlanningBox\' and not(field[\'hidden\']) and field[\'enabled\']:\n
return field\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form=None</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form</string>
<string>None</string>
<string>context</string>
<string>_getattr_</string>
<string>_getiter_</string>
<string>group</string>
<string>field</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5XhtmlStyle_getPlanningBox</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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 encoding="cdata"><![CDATA[
from ZTUtils import make_query\n
request_form = context.REQUEST.form\n
request_form.update(kw)\n
request_form = context.ERP5XhtmlStyle_filterParameterList(request_form)\n
request_form.update(keep_items)\n
\n
if redirect_url is None:\n
redirect_url = \'%s/view\' % (context.getPortalObject().absolute_url())\n
\n
parameters = make_query(dict([(k, v) for k, v in request_form.items() if k and v is not None]))\n
if len(parameters):\n
if \'?\' in redirect_url:\n
separator = \'&\'\n
else:\n
separator = \'?\'\n
redirect_url = \'%s%s%s\' % (redirect_url, separator, parameters)\n
\n
return context.REQUEST.RESPONSE.redirect( redirect_url )\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>redirect_url=None, keep_items={}, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>redirect_url</string>
<string>keep_items</string>
<string>kw</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getattr_</string>
<string>context</string>
<string>request_form</string>
<string>None</string>
<string>dict</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>k</string>
<string>v</string>
<string>parameters</string>
<string>len</string>
<string>separator</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<dictionary/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5XhtmlStyle_redirect</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>http_parameter_list.update(kw)\n
return context.ERP5XhtmlStyle_renderLink(link, context.ERP5XhtmlStyle_renderHTTPParameterList(http_parameter_list))\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>link, http_parameter_list, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>link</string>
<string>http_parameter_list</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</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>ERP5XhtmlStyle_renderCustomLink</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>from ZTUtils import make_query\n
return make_query(dict([(k, v) for k, v in http_parameter_list.items() if v is not None]))\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>http_parameter_list</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>http_parameter_list</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>dict</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>k</string>
<string>v</string>
<string>None</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>ERP5XhtmlStyle_renderHTTPParameterList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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 encoding="cdata"><![CDATA[
if len(http_parameters) == 0:\n
return link\n
if \'?\' in link:\n
sep=\'&\'\n
else:\n
sep=\'?\'\n
return \'%s%s%s\' % (link, sep, http_parameters)\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>link, http_parameters</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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>link</string>
<string>http_parameters</string>
<string>len</string>
<string>sep</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>ERP5XhtmlStyle_renderLink</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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># Clear selection\n
context.portal_selections.setSelectionCheckedUidsFor(\'template_tool_install_selection\', [])\n
# Then call the listbox\n
return context.ERP5XhtmlStyle_redirect("%s/%s" % (context.absolute_url(), \'TemplateTool_viewInstallRepositoryBusinessTemplateListDialog\'))\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>_owner</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>_getattr_</string>
<string>context</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>TemplateTool_callViewInstallRepositoryBusinessTemplateListDialog</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</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>from Products.Formulator.Errors import FormValidationError\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
request=context.REQUEST\n
\n
form = getattr(context, dialog_id)\n
\n
# Validate the form\n
try:\n
form.validate_all_to_request(request)\n
except FormValidationError, validation_errors:\n
# Pack errors into the request\n
field_errors = form.ErrorFields(validation_errors)\n
request.set(\'field_errors\', field_errors)\n
return form(request)\n
except ValidationFailed, error_message:\n
if hasattr(error_message, \'msg\'):\n
# use of Message class to store message+mapping+domain\n
kw[\'portal_status_message\'] = error_message.msg\n
return context.ERP5XhtmlStyle_redirect(\'%s/%s\' % (context.absolute_url(), form_id), **kw)\n
\n
# XXX: this is a duplication from form validation code in Base_callDialogMethod\n
# Correct fix is to factorise this script with Base_callDialogMethod, not to fix XXXs here.\n
doaction_param_list = {}\n
MARKER = []\n
for f in form.get_fields():\n
k = f.id\n
v = getattr(request, k, MARKER)\n
if v is not MARKER:\n
doaction_param_list[k[3:]] = v # XXX: k[:3] removing "my_" prefix ? What about checking if it\'s present before stripping ?\n
\n
listbox = request.get(\'listbox\') # XXX: hardcoded field name\n
if listbox is not None:\n
listbox_line_list = []\n
listbox = getattr(request,\'listbox\',None) # XXX: hardcoded field name\n
listbox_keys = listbox.keys()\n
listbox_keys.sort()\n
for key in listbox_keys:\n
listbox_line = listbox[key]\n
listbox_line[\'listbox_key\'] = key\n
listbox_line_list.append(listbox[key])\n
listbox_line_list = tuple(listbox_line_list)\n
doaction_param_list[\'listbox\'] = listbox_line_list # XXX: hardcoded field name\n
\n
context.portal_workflow.doActionFor(\n
context,\n
doaction_param_list[\'workflow_action\'],\n
**doaction_param_list)\n
return context.ERP5XhtmlStyle_redirect(\'%s/%s\' % (context.absolute_url(), form_id),keep_items={\'portal_status_message\': N_(\'Status+changed.\')})\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>form_id, dialog_id, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form_id</string>
<string>dialog_id</string>
<string>kw</string>
<string>Products.Formulator.Errors</string>
<string>FormValidationError</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>request</string>
<string>getattr</string>
<string>form</string>
<string>validation_errors</string>
<string>field_errors</string>
<string>error_message</string>
<string>hasattr</string>
<string>_write_</string>
<string>_apply_</string>
<string>doaction_param_list</string>
<string>MARKER</string>
<string>_getiter_</string>
<string>f</string>
<string>k</string>
<string>v</string>
<string>_getitem_</string>
<string>listbox</string>
<string>None</string>
<string>listbox_line_list</string>
<string>listbox_keys</string>
<string>key</string>
<string>listbox_line</string>
<string>tuple</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>Workflow_statusModify</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -77,51 +77,23 @@ XXX: uses hardcoded indices values to access fields\n
<tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/dialog_main/macros/master">\n
<tal:block metal:fill-slot="main">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<table tal:define="base_form python: getattr(here,form_id);\n
groups base_form/get_groups;\n
default_columns python: base_form.get_fields_in_group(groups[0])[0].get_value(\'columns\');\n
columns python: here.portal_selections.getSelectionColumns(selection_name, REQUEST=request, columns=default_columns);\n
selected_stats python: here.portal_selections.getSelectionStats(selection_name, REQUEST=request);\n
global row_index python: 0;\n
global row_keys python: [\'None\'];\n
global stats python: [\' \',\'count\',\'sum\',\'max\',\'min\',\'avg\'];\n
all_columns python: base_form.get_fields_in_group(groups[0])[0].get_value(\'all_columns\')">\n
<tal:block tal:repeat="item columns">\n
<tr tal:define="global row_index python:row_index+1;\n
dummy python:row_keys.append(item[0])"\n
tal:attributes="id string:column_${row_index}">\n
<td>\n
<tal:block i18n:translate="" i18n:domain="ui">Column</tal:block>\n
<tal:block tal:replace="row_index" />\n
</td>\n
<td>\n
<select name="field_columns">\n
<tal:block tal:repeat="option python: [(\'None\',\'None\')] + all_columns">\n
<option tal:content="python: option[1]"\n
tal:attributes="value python:option[0];\n
selected python: option[0]==item[0] and \'selected\' or nothing"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</select>\n
</td>\n
<td>\n
<select name="stat_columns">\n
<tal:block tal:repeat="stat stats">\n
<option tal:content="stat"\n
tal:attributes="value stat;\n
selected python: (len(selected_stats) >= row_index and stat == selected_stats[row_index - 1]) and \'selected\' or nothing"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</select>\n
</td>\n
</tr>\n
<div class="dialog_box">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<tal:block tal:repeat="item all_columns">\n
<tal:block tal:condition="python: item[0] not in row_keys">\n
<tr tal:define="global row_index python:row_index+1"\n
<table tal:define="selection_name request/selection_name;\n
base_form python: getattr(here, request[\'form_id\']);\n
groups base_form/get_groups;\n
default_columns python: base_form.get_fields_in_group(groups[0])[0].get_value(\'columns\');\n
columns python: here.portal_selections.getSelectionColumns(selection_name, REQUEST=request, columns=default_columns);\n
selected_stats python: here.portal_selections.getSelectionStats(selection_name, REQUEST=request);\n
global row_index python: 0;\n
global row_keys python: [\'None\'];\n
global stats python: [\' \',\'count\',\'sum\',\'max\',\'min\',\'avg\'];\n
all_columns python: base_form.get_fields_in_group(groups[0])[0].get_value(\'all_columns\')">\n
<tal:block tal:repeat="item columns">\n
<tr tal:define="global row_index python:row_index+1;\n
dummy python:row_keys.append(item[0])"\n
tal:attributes="id string:column_${row_index}">\n
<td>\n
<tal:block i18n:translate="" i18n:domain="ui">Column</tal:block>\n
......@@ -129,15 +101,12 @@ XXX: uses hardcoded indices values to access fields\n
</td>\n
<td>\n
<select name="field_columns">\n
<option selected="selected"\n
value="None"\n
i18n:translate="" i18n:domain="ui">\n
None\n
</option>\n
<option tal:repeat="option all_columns"\n
tal:content="python:option[1]"\n
tal:attributes="value python:option[0]"\n
i18n:translate="" i18n:domain="ui" />\n
<tal:block tal:repeat="option python: [(\'None\',\'None\')] + all_columns">\n
<option tal:content="python: option[1]"\n
tal:attributes="value python:option[0];\n
selected python: option[0]==item[0] and \'selected\' or nothing"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</select>\n
</td>\n
<td>\n
......@@ -145,15 +114,49 @@ XXX: uses hardcoded indices values to access fields\n
<tal:block tal:repeat="stat stats">\n
<option tal:content="stat"\n
tal:attributes="value stat;\n
selected python: len(selected_stats) >= row_index and stat == selected_stats[row_index - 1] and \'selected or nothing\'"\n
selected python: (len(selected_stats) >= row_index and stat == selected_stats[row_index - 1]) and \'selected\' or nothing"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</select>\n
</td>\n
</tr>\n
</tal:block>\n
</tal:block>\n
</table>\n
<tal:block tal:repeat="item all_columns">\n
<tal:block tal:condition="python: item[0] not in row_keys">\n
<tr tal:define="global row_index python:row_index+1"\n
tal:attributes="id string:column_${row_index}">\n
<td>\n
<tal:block i18n:translate="" i18n:domain="ui">Column</tal:block>\n
<tal:block tal:replace="row_index" />\n
</td>\n
<td>\n
<select name="field_columns">\n
<option selected="selected"\n
value="None"\n
i18n:translate="" i18n:domain="ui">\n
None\n
</option>\n
<option tal:repeat="option all_columns"\n
tal:content="python:option[1]"\n
tal:attributes="value python:option[0]"\n
i18n:translate="" i18n:domain="ui" />\n
</select>\n
</td>\n
<td>\n
<select name="stat_columns">\n
<tal:block tal:repeat="stat stats">\n
<option tal:content="stat"\n
tal:attributes="value stat;\n
selected python: len(selected_stats) >= row_index and stat == selected_stats[row_index - 1] and \'selected or nothing\'"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</select>\n
</td>\n
</tr>\n
</tal:block>\n
</tal:block>\n
</table>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>
......
......@@ -73,7 +73,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="master">\n
<tal:block tal:define="form_action string:Base_callDialogMethod">\n
<tal:block tal:define="form_action string:Base_callDialogMethod;\n
dialog_id form/id | template/id;\n
dialog_method form/action | dialog_id;\n
update_action form/update_action;\n
global dialog_category request/dialog_category | nothing;\n
\n
local_parameter_list local_parameter_list | python: {};\n
dummy python: local_parameter_list.update({\'dialog_id\': dialog_id, \'dialog_method\': dialog_method, \'update_action\': update_action, \'dialog_category\': dialog_category});\n
">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n
<div class="list_dialog">\n
......
......@@ -73,7 +73,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="field_render">\n
<tal:block tal:define="value python:request.get(field.id, None)">\n
<tal:block tal:define="value python:request.get(field.id, None);\n
field_errors python: request.get(\'field_errors\',{})">\n
<tal:block tal:define="html_render python: field.render_htmlgrid(value, request)">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<div tal:repeat="html_tuple html_render" class="field"\n
......
......@@ -81,6 +81,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
right_group python: form.get_fields_in_group(\'right\');\n
center_group python: form.get_fields_in_group(\'center\');\n
dialog_actions python: actions.get(dialog_category, [])">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div tal:condition="python: len(left_group) or len(right_group) or len(center_group) or len(dialog_actions)>1"\n
class="dialog_box">\n
<div tal:condition="python: len(dialog_actions) > 1"\n
......@@ -108,9 +111,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</button>\n
</div>\n
<div class="content">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n
class="top_group">\n
<div tal:condition="python: len(left_group) > 0"\n
......
......@@ -81,7 +81,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="index_html">\n
<h2 i18n:translate="" i18n:domain="ui">Welcome to ERP5</h2>\n
<table border="1">\n
<tr tal:define="module_list here/ERP5Site_getModuleItemList;\n
<tr tal:define="module_list here/ERP5XhtmlStyle_getModuleItemList;\n
module_len python: len(module_list);\n
col_size python: 12;\n
col_len python: module_len % col_size and (module_len + col_size) / col_size or (module_len) / col_size">\n
......
......@@ -73,12 +73,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="context_bar">\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n
</tal:block>\n
<tal:block metal:fill-slot="main">\n
<tal:block metal:define-slot="main" />\n
<tal:block tal:define="form_action string:Base_doSelect:method;\n
form_id form/id;\n
list_mode python: True;\n
listmode_default_listbox python: here.ERP5XhtmlStyle_getListbox(form=form);\n
selection_name listmode_default_listbox/selection_name;\n
selection_index request/selection_index | python:0;\n
dummy python: selection_name and request.set(\'selection_name\', selection_name);\n
\n
local_parameter_list local_parameter_list | python: {};\n
dummy python: local_parameter_list.update({\'selection_name\': selection_name, \'selection_index\': selection_index, \'form_id\': form_id});\n
">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="context_bar">\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n
</tal:block>\n
<tal:block metal:fill-slot="main">\n
<tal:block metal:define-slot="main" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>
......
......@@ -75,55 +75,57 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/dialog_main/macros/master">\n
<tal:block metal:fill-slot="main">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div class="content"\n
tal:define="items python:here.portal_selections.getSelectionSortOrder(selection_name, REQUEST=request);\n
base_form python:getattr(here,form_id);\n
groups base_form/get_groups;\n
columns python:base_form.get_fields_in_group(groups[0])[0].get_value(\'all_columns\');\n
global row_index python:0;\n
global row_keys python:[\'None\'];\n
all_columns python: [(\'None\',\'None\')] + columns;">\n
<div tal:repeat="item items"\n
class="field">\n
<label>\n
<tal:block i18n:translate="" i18n:domain="ui">Sort</tal:block>\n
<tal:block tal:replace="row_index" />\n
</label>\n
<div class="input" tal:attributes="id string:sort_${row_index}">\n
<select name="field_sort_on">\n
<tal:block tal:repeat="option all_columns">\n
<option tal:content="python:option[1]"\n
tal:attributes="value python:option[0];\n
selected python:option[0]==item[0] and \'selected\' or nothing"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</select>\n
<tal:block tal:replace="structure python:form.sort_order.render(item[1], request)" />\n
</div>\n
<hr class="clear" />\n
</div>\n
<div tal:repeat="item columns"\n
class="field">\n
<tal:block tal:condition="python: item[0] not in row_keys">\n
<label tal:define="global row_index python:row_index+1">\n
<div class="dialog_box">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div class="content"\n
tal:define="items python:here.portal_selections.getSelectionSortOrder(request[\'selection_name\'], REQUEST=request);\n
base_form python:getattr(here,request[\'form_id\']);\n
groups base_form/get_groups;\n
columns python:base_form.get_fields_in_group(groups[0])[0].get_value(\'all_columns\');\n
global row_index python:0;\n
global row_keys python:[\'None\'];\n
all_columns python: [(\'None\',\'None\')] + columns;">\n
<div tal:repeat="item items"\n
class="field">\n
<label>\n
<tal:block i18n:translate="" i18n:domain="ui">Sort</tal:block>\n
<tal:block tal:replace="row_index" />\n
</label>\n
<div class="input" tal:attributes="id string:sort_${row_index}">\n
<select name="field_sort_on">\n
<option selected="selected" value="None">None</option>\n
<option tal:repeat="option columns"\n
tal:content="python:option[1]"\n
tal:attributes="value python:option[0]"\n
i18n:translate="" i18n:domain="ui"></option>\n
<tal:block tal:repeat="option all_columns">\n
<option tal:content="python:option[1]"\n
tal:attributes="value python:option[0];\n
selected python:option[0]==item[0] and \'selected\' or nothing"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</select>\n
<span tal:replace="structure python:form.sort_order.render(\'\', request)" />\n
<tal:block tal:replace="structure python:form.sort_order.render(item[1], request)" />\n
</div>\n
</tal:block>\n
<hr class="clear" />\n
<h6 class="clear" />\n
</div>\n
<div tal:repeat="item columns"\n
class="field">\n
<tal:block tal:condition="python: item[0] not in row_keys">\n
<label tal:define="global row_index python:row_index+1">\n
<tal:block i18n:translate="" i18n:domain="ui">Sort</tal:block>\n
<tal:block tal:replace="row_index" />\n
</label>\n
<div class="input" tal:attributes="id string:sort_${row_index}">\n
<select name="field_sort_on">\n
<option selected="selected" value="None">None</option>\n
<option tal:repeat="option columns"\n
tal:content="python:option[1]"\n
tal:attributes="value python:option[0]"\n
i18n:translate="" i18n:domain="ui"></option>\n
</select>\n
<span tal:replace="structure python:form.sort_order.render(\'\', request)" />\n
</div>\n
</tal:block>\n
<h6 class="clear" />\n
</div>\n
</div>\n
</div>\n
</tal:block>\n
......
......@@ -73,34 +73,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="context_bar">\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n
</tal:block>\n
<tal:block metal:fill-slot="main">\n
<div class="document"\n
tal:define="actions actions/object_view | python: []">\n
<div class="actions">\n
<tal:block tal:condition="editable_mode | python: 1">\n
<button tal:condition="python: here.portal_membership.checkPermission(\'Modify portal content\', here)"\n
type="submit" name="Base_edit:method" class="save" title="Save"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Save</span>\n
</button>\n
</tal:block>\n
<ul tal:condition="python: len(actions)">\n
<tal:block tal:repeat="action actions">\n
<li tal:attributes="class python: action == current_action and \'selected\' or \'not_selected\'">\n
<a tal:attributes="href python: here.ERP5Site_renderLink(action[\'url\'], http_parameters)"\n
tal:content="action/name"></a>\n
</li>\n
<tal:block tal:define="object_uid here/getUid | nothing;\n
object_path here/getPath | nothing;\n
form_id form/id | nothing;\n
form_action python: here.portal_membership.checkPermission(\'Modify portal content\', here) and \'Base_edit:method\' or nothing;\n
\n
local_parameter_list local_parameter_list | python: {};\n
dummy python: local_parameter_list.update({\'object_uid\': object_uid, \'object_path\': object_path, \'form_id\': form_id});\n
">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="context_bar">\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n
</tal:block>\n
<tal:block metal:fill-slot="main">\n
<div class="document"\n
tal:define="actions actions/object_view | python: []">\n
<div class="actions">\n
<tal:block tal:condition="editable_mode | python: 1">\n
<button tal:condition="python: here.portal_membership.checkPermission(\'Modify portal content\', here)"\n
type="submit" name="Base_edit:method" class="save" title="Save"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Save</span>\n
</button>\n
</tal:block>\n
</ul>\n
<ul tal:condition="python: len(actions)">\n
<tal:block tal:repeat="action actions">\n
<li tal:attributes="class python: action == current_action and \'selected\' or \'not_selected\'">\n
<a tal:attributes="href python: here.ERP5XhtmlStyle_renderLink(action[\'url\'], http_parameters)"\n
tal:content="action/name"></a>\n
</li>\n
</tal:block>\n
</ul>\n
</div>\n
<div class="content"><tal:block metal:define-slot="main" /></div>\n
</div>\n
<div class="content"><tal:block metal:define-slot="main" /></div>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
......
2006-07-24 vincent
* Re-implement parameters propagation. Allows to remove most of the previously hardcoded value names from the style.
* Keep parameters when going through a workflow transition (ex : "follow bug" in bug module)
* Fixes bugs about form_id & dialog_id not generated the way they are supposed to.
* Move "list mode" button between "previous" and "next" buttons.
* Use "contextual help" preference to display or not the help button on top right - it's the only purpose of this preference.
* Follow the field naming convention for menus.
* Rename all scripts designed for xhtml style to "ERP5XhtmlStyle_" to make it clear. Some are rewrite of "Base_" scripts.
* !BUG!: listbox search fields require quite a lot of work to be cleanly filtered out. This will be hopefully corrected in next version.
2006-07-17 jerome
* fix object_jump actions that were not displayed.
......
This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
\ No newline at end of file
This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
Handles page parameters dynamically.
\ No newline at end of file
25
\ No newline at end of file
33
\ No newline at end of file
0.2
\ No newline at end of file
1.1
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment