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 encoding="cdata"><![CDATA[
"""\n
Generic method called when submitting a form in dialog mode.\n
Responsible for validating form data and redirecting to the form action.\n
"""\n
\n
from Products.Formulator.Errors import FormValidationError\n
from ZTUtils import make_query\n
\n
request_form = context.REQUEST.form\n
error_message = \'\'\n
\n
# Make this script work alike wether called from another script or by a request\n
# Reinject parameters in the request\n
request_form[\'dialog_method\'] = dialog_method\n
request_form[\'dialog_id\'] = dialog_id\n
request_form[\'dialog_category\'] = dialog_category\n
request_form[\'enable_pickle\'] = enable_pickle\n
# If we get unused parameters, put them in the request\n
for k, v in kw:\n
request_form[k]=v\n
\n
# Exceptions for UI\n
if dialog_method == \'Base_configureUI\':\n
return context.Base_configureUI(form_id=request_form[\'form_id\'],\n
selection_name=request_form[\'selection_name\'],\n
field_columns=request_form[\'field_columns\'],\n
stat_columns=request_form[\'stat_columns\'])\n
# Exceptions for Sort\n
if dialog_method == \'Base_configureSortOn\':\n
return context.Base_configureSortOn(form_id=request_form[\'form_id\'],\n
selection_name=request_form[\'selection_name\'],\n
field_sort_on=request_form[\'field_sort_on\'],\n
field_sort_order=request_form[\'field_sort_order\'])\n
# Exceptions for Base_edit\n
# if dialog_method == \'Base_edit\':\n
# return context.Base_edit(form_id=request_form[\'form_id\'],\n
# dialog_id=dialog_id,\n
# selection_name=request_form[\'selection_name\'])\n
# Exceptions for Workflow\n
if dialog_method == \'Workflow_statusModify\':\n
value = context.Workflow_statusModify(form_id=request_form[\'form_id\'],\n
dialog_id=dialog_id)\n
# XXX: This test is related to erp5_web and should not be present in configuration where it is not installed.\n
if not(getattr(context.REQUEST, \'ignore_layout\', 0)) and context.getApplicableLayout() :\n
context.REQUEST.RESPONSE.redirect(context.WebSite_getDocumentPhysicalPath())\n
return value\n
# Exception for edit relation\n
if dialog_method == \'Base_editRelation\':\n
return context.Base_editRelation(form_id=request_form[\'form_id\'],\n
field_id=request_form[\'field_id\'],\n
selection_name=request_form[\'selection_name\'],\n
selection_index=request_form[\'selection_index\'],\n
object_uid=request_form[\'object_uid\'],\n
uids=request_form[\'uids\'],\n
listbox_uid=request_form[\'listbox_uid\'],\n
form_pickle=request_form[\'form_pickle\'],\n
form_signature=request_form[\'form_signature\'])\n
# Exception for create relation\n
if dialog_method == \'Base_createRelation\':\n
return context.Base_createRelation(form_id=request_form[\'form_id\'],\n
selection_name=request_form[\'selection_name\'],\n
selection_index=request_form[\'selection_index\'],\n
base_category=request_form[\'base_category\'],\n
object_uid=request_form[\'object_uid\'],\n
catalog_index=request_form[\'catalog_index\'],\n
default_module=request_form[\'default_module\'],\n
dialog_id=dialog_id,\n
portal_type=request_form[\'portal_type\'],\n
return_url=request_form[\'cancel_url\'])\n
# Exception for folder delete\n
if dialog_method == \'Folder_delete\':\n
return context.Folder_delete(form_id=request_form[\'form_id\'],\n
selection_name=request_form[\'selection_name\'],\n
uids=request_form[\'listbox_uid\'],\n
md5_object_uid_list=request_form[\'md5_object_uid_list\'])\n
\n
# If the request came with a pickled form, use it as context for form object search.\n
if request_form.has_key(\'pickle_string\'):\n
form_context = context.asContext(context=None,\n
portal_type=context.getPortalType(),\n
**(context.portal_selections.getObjectFromPickle(request_form[\'pickle_string\']))\n
)\n
else:\n
form_context = context\n
form = getattr(form_context, dialog_id)\n
# Validate the form\n
try:\n
form.validate_all_to_request(context.REQUEST)\n
except FormValidationError, validation_errors:\n
# Pack errors into the request\n
field_errors = form.ErrorFields(validation_errors)\n
context.REQUEST.set(\'field_errors\', field_errors)\n
return form(context.REQUEST)\n
\n
# Use REQUEST.redirect if possible. It will not be possible if at least one of these is true :\n
# * we got an import_file,\n
# * we got a listbox\n
# * a value is None or [] or (), because this is not supported by make_query\n
can_redirect = 1\n
MARKER = [] # A recognisable default value. Use with \'is\', not \'==\'.\n
listbox_id_list = [] # There should not be more than one listbox - but this give us a way to check.\n
file_id_list = [] # For uploaded files.\n
for field in form.get_fields():\n
k = field.id\n
v = context.REQUEST.get(k, MARKER)\n
if v is not MARKER:\n
if field.meta_type == \'ListBox\':\n
listbox_id_list.append(k)\n
elif can_redirect and (v in (None, [], ()) or hasattr(v, \'read\')) : # If we cannot redirect, useless to test it again\n
can_redirect = 0\n
# Cleanup my_ and your_ prefixes\n
splitted = k.split(\'_\', 1)\n
if len(splitted) == 2 and splitted[0] in (\'my\', \'your\'):\n
request_form[splitted[1]] = v\n
else:\n
request_form[k] = v\n
\n
if len(listbox_id_list):\n
can_redirect = 0\n
# Warn if there are more than one listbox in form ...\n
if len(listbox_id_list) > 1:\n
log(\'Base_callDialogMethod\', \'There are %s listboxes in form %s.\' % (len(listbox_id_list), form.id))\n
# ... but handle them anyway.\n
for listbox_id in listbox_id_list:\n
listbox_line_list = []\n
listbox = request_form[listbox_id]\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_line)\n
listbox_line_list = tuple(listbox_line_list)\n
request_form[listbox_id] = listbox_line_list\n
\n
if enable_pickle or (form.update_action != \'\'):\n
request_form[\'pickle_string\'] = context.portal_selections.getPickle(**request_form)\n
\n
# Check if the selection changed\n
if hasattr(request_form, \'previous_md5_object_uid_list\'):\n
selection_list = context.portal_selections.callSelectionFor(request_form[\'selection_name\'], context=context)\n
if selection_list is not None:\n
object_uid_list = map(lambda x:x.getObject().getUid(), selection_list)\n
error = context.portal_selections.selectionHasChanged(request_form[\'previous_md5_object_uid_list\'], object_uid_list)\n
if error:\n
error_message = N_("Sorry+your+selection+has+changed")\n
\n
# if dialog_category is object_search, then edit the selection\n
if dialog_category == "object_search" :\n
context.portal_selections.setSelectionParamsFor(request_form[\'selection_name\'], request_form)\n
\n
# Remove values which doesn\'t work with make_query.\n
clean_kw = {}\n
for k, v in request_form.items() :\n
if v not in (None, [], ()) :\n
clean_kw[k] = request_form[k]\n
\n
url_params_string = make_query(clean_kw)\n
\n
# XXX: We always redirect in report mode to make sure portal_skin\n
# parameter is taken into account by SkinTool.\n
# If url is too long, we do not redirect to avoid crash.\n
if (not(can_redirect) or len(url_params_string) > 2000) and dialog_category != "object_report": # XXX: 2000 is an arbitrary value resulted from trial and error.\n
# If we cannot redirect, then call the form directly.\n
dialog_form = getattr(context, dialog_method)\n
# XXX: this is a hack that should not be needed anymore with the new listbox.\n
# set the URL in request, so that we can immediatly call method\n
# that depend on it (eg. Show All). This is really related to\n
# current ListBox implementation which edit Selection\'s last_url\n
# with the content of REQUEST.URL\n
context.REQUEST.set(\'URL\', \'%s/%s\' % (context.absolute_url(), dialog_method))\n
return dialog_form(**request_form)\n
\n
if error_message != \'\':\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
, dialog_method\n
, \'portal_status_message=%s\' % error_message\n
)\n
elif url_params_string != \'\':\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
, dialog_method\n
, url_params_string\n
)\n
else:\n
redirect_url = \'%s/%s\' % ( context.absolute_url()\n
, dialog_method\n
)\n
\n
return context.REQUEST.RESPONSE.redirect(redirect_url)\n
\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>dialog_method, dialog_id, dialog_category=\'\', enable_pickle=0, **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>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>dialog_method</string>
<string>dialog_id</string>
<string>dialog_category</string>
<string>enable_pickle</string>
<string>kw</string>
<string>Products.Formulator.Errors</string>
<string>FormValidationError</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getattr_</string>
<string>context</string>
<string>request_form</string>
<string>error_message</string>
<string>_write_</string>
<string>_getiter_</string>
<string>k</string>
<string>v</string>
<string>_getitem_</string>
<string>value</string>
<string>getattr</string>
<string>_apply_</string>
<string>None</string>
<string>form_context</string>
<string>form</string>
<string>validation_errors</string>
<string>field_errors</string>
<string>can_redirect</string>
<string>MARKER</string>
<string>listbox_id_list</string>
<string>file_id_list</string>
<string>field</string>
<string>hasattr</string>
<string>splitted</string>
<string>len</string>
<string>log</string>
<string>listbox_id</string>
<string>listbox_line_list</string>
<string>listbox</string>
<string>listbox_keys</string>
<string>key</string>
<string>listbox_line</string>
<string>tuple</string>
<string>selection_list</string>
<string>map</string>
<string>object_uid_list</string>
<string>error</string>
<string>N_</string>
<string>clean_kw</string>
<string>url_params_string</string>
<string>dialog_form</string>
<string>redirect_url</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<string></string>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_callDialogMethod</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 ...@@ -73,9 +73,8 @@ if workflow_action is not None: # First, the workflow transition case.\n
help = \'%s_%s\' % (help, workflow_action)\n help = \'%s_%s\' % (help, workflow_action)\n
elif current_action is not None: # Then, we are able to get the 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 help = \'%s_%s\' % (help, current_action[\'id\'])\n
elif dialog_id is not None: # Otherwise, get the form we are in.\n elif current_form_id is not None: # Otherwise, get the form we are in.\n
help = \'%s_%s\' % (help, dialog_id)\n help = \'%s_%s\' % (help, current_form_id)\n
# Otherwise again, just use the portal type as page name.\n
return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentationBaseUrl(), help)\n return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentationBaseUrl(), help)\n
</string> </value> </string> </value>
</item> </item>
...@@ -99,7 +98,7 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio ...@@ -99,7 +98,7 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -119,15 +118,14 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio ...@@ -119,15 +118,14 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>4</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>form_id</string>
<string>current_action</string> <string>current_action</string>
<string>dialog_id</string> <string>current_form_id</string>
<string>workflow_action</string> <string>workflow_action</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
...@@ -147,15 +145,14 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio ...@@ -147,15 +145,14 @@ return \'%s/%s\' % (context.portal_preferences.getPreferredHtmlStyleDocumentatio
<value> <value>
<tuple> <tuple>
<string></string> <string></string>
<string></string> <none/>
<string></string>
<string></string> <string></string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Base_getHelpUrl</string> </value> <value> <string>ERP5XhtmlStyle_getHelpUrl</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <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 ...@@ -77,51 +77,23 @@ XXX: uses hardcoded indices values to access fields\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/dialog_main/macros/master">\n <tal:block metal:use-macro="here/dialog_main/macros/master">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n <div class="dialog_box">\n
<tal:block metal:use-macro="template/macros/form" />\n <tal:block tal:define="template python: here.developper_shortcut_render">\n
</tal:block>\n <tal:block metal:use-macro="template/macros/form" />\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
</tal:block>\n </tal:block>\n
<tal:block tal:repeat="item all_columns">\n <table tal:define="selection_name request/selection_name;\n
<tal:block tal:condition="python: item[0] not in row_keys">\n base_form python: getattr(here, request[\'form_id\']);\n
<tr tal:define="global row_index python:row_index+1"\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 tal:attributes="id string:column_${row_index}">\n
<td>\n <td>\n
<tal:block i18n:translate="" i18n:domain="ui">Column</tal:block>\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 ...@@ -129,15 +101,12 @@ XXX: uses hardcoded indices values to access fields\n
</td>\n </td>\n
<td>\n <td>\n
<select name="field_columns">\n <select name="field_columns">\n
<option selected="selected"\n <tal:block tal:repeat="option python: [(\'None\',\'None\')] + all_columns">\n
value="None"\n <option tal:content="python: option[1]"\n
i18n:translate="" i18n:domain="ui">\n tal:attributes="value python:option[0];\n
None\n selected python: option[0]==item[0] and \'selected\' or nothing"\n
</option>\n i18n:translate="" i18n:domain="ui" />\n
<option tal:repeat="option all_columns"\n </tal:block>\n
tal:content="python:option[1]"\n
tal:attributes="value python:option[0]"\n
i18n:translate="" i18n:domain="ui" />\n
</select>\n </select>\n
</td>\n </td>\n
<td>\n <td>\n
...@@ -145,15 +114,49 @@ XXX: uses hardcoded indices values to access fields\n ...@@ -145,15 +114,49 @@ XXX: uses hardcoded indices values to access fields\n
<tal:block tal:repeat="stat stats">\n <tal:block tal:repeat="stat stats">\n
<option tal:content="stat"\n <option tal:content="stat"\n
tal:attributes="value 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 i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n </tal:block>\n
</select>\n </select>\n
</td>\n </td>\n
</tr>\n </tr>\n
</tal:block>\n </tal:block>\n
</tal:block>\n <tal:block tal:repeat="item all_columns">\n
</table>\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>\n </tal:block>\n
</tal:block> </tal:block>
......
...@@ -82,8 +82,8 @@ XXX: Folder_filter accesses selection directly\n ...@@ -82,8 +82,8 @@ XXX: Folder_filter accesses selection directly\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\n
<span id="jump">\n <span id="jump">\n
<select name="jump_select"\n <select name="select_jump"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doJump\')">\n tal:attributes="onChange string:submitAction(this.form,\'${url}/ERP5XhtmlStyle_doJump\')">\n
<option selected="selected" value=""\n <option selected="selected" value=""\n
i18n:translate="" i18n:domain="ui">Jump...</option>\n i18n:translate="" i18n:domain="ui">Jump...</option>\n
<tal:block tal:repeat="jump actions/object_jump | nothing">\n <tal:block tal:repeat="jump actions/object_jump | nothing">\n
...@@ -102,7 +102,7 @@ XXX: Folder_filter accesses selection directly\n ...@@ -102,7 +102,7 @@ XXX: Folder_filter accesses selection directly\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</select>\n </select>\n
<button type="submit" name="Base_doJump:method" title="Jump"\n <button type="submit" name="ERP5XhtmlStyle_doJump:method" title="Jump"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description"\n <span class="description"\n
...@@ -111,8 +111,8 @@ XXX: Folder_filter accesses selection directly\n ...@@ -111,8 +111,8 @@ XXX: Folder_filter accesses selection directly\n
</span>\n </span>\n
<span class="separator"></span>\n <span class="separator"></span>\n
<span id="action">\n <span id="action">\n
<select name="action_select"\n <select name="select_action"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doAction\')"\n tal:attributes="onChange string:submitAction(this.form,\'${url}/ERP5XhtmlStyle_doAction\')"\n
tal:define="document_template_list here/getDocumentTemplateList | nothing">\n tal:define="document_template_list here/getDocumentTemplateList | nothing">\n
<option selected="selected" value=""\n <option selected="selected" value=""\n
i18n:translate="" i18n:domain="ui">Action...</option>\n i18n:translate="" i18n:domain="ui">Action...</option>\n
...@@ -157,7 +157,7 @@ XXX: Folder_filter accesses selection directly\n ...@@ -157,7 +157,7 @@ XXX: Folder_filter accesses selection directly\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</select>\n </select>\n
<button type="submit" name="Base_doAction:method" title="Action"\n <button type="submit" name="ERP5XhtmlStyle_doAction:method" title="Action"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description">Action</span>\n <span class="description">Action</span>\n
...@@ -192,13 +192,6 @@ XXX: Folder_filter accesses selection directly\n ...@@ -192,13 +192,6 @@ XXX: Folder_filter accesses selection directly\n
</button>\n </button>\n
<span class="separator"></span>\n <span class="separator"></span>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="selection_index | nothing">\n
<a class="list_mode" title="List Mode" tal:attributes="href selection_url">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">List Mode</span>\n
</a>\n
<span class="separator"></span>\n
</tal:block>\n
<button tal:condition="print_actions" class="print" type="submit" name="Folder_print:method" title="Print"\n <button tal:condition="print_actions" class="print" type="submit" name="Folder_print:method" title="Print"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
...@@ -215,33 +208,39 @@ XXX: Folder_filter accesses selection directly\n ...@@ -215,33 +208,39 @@ XXX: Folder_filter accesses selection directly\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Delete</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Delete</span>\n
</button>\n </button>\n
<tal:block tal:condition="selection_index | nothing">\n <tal:block tal:condition="not: list_mode | nothing">\n
<span class="separator"></span>\n <tal:block tal:condition="request/selection_index | nothing">\n
<a class="jump_first" title="First"\n <span class="separator"></span>\n
tal:attributes="href python: here.ERP5Site_renderLink(\'portal_selections/viewFirst\', http_parameters)">\n <a class="jump_first" title="First"\n
<span class="image"></span>\n tal:attributes="href python: here.ERP5XhtmlStyle_renderLink(\'portal_selections/viewFirst\', http_parameters)">\n
<span class="description" i18n:translate="" i18n:domain="ui">First</span>\n <span class="image"></span>\n
</a>\n <span class="description" i18n:translate="" i18n:domain="ui">First</span>\n
<a class="jump_previous" title="Previous"\n </a>\n
tal:attributes="href python: here.ERP5Site_renderLink(\'portal_selections/viewPrevious\', http_parameters)">\n <a class="jump_previous" title="Previous"\n
<span class="image"></span>\n tal:attributes="href python: here.ERP5XhtmlStyle_renderLink(\'portal_selections/viewPrevious\', http_parameters)">\n
<span class="description" i18n:translate="" i18n:domain="ui">Previous</span>\n <span class="image"></span>\n
</a>\n <span class="description" i18n:translate="" i18n:domain="ui">Previous</span>\n
<a class="jump_next" title="Next"\n </a>\n
tal:attributes="href python: here.ERP5Site_renderLink(\'portal_selections/viewNext\', http_parameters)">\n <a class="list_mode" title="List Mode" tal:attributes="href python: here.portal_selections.getSelectionListUrlFor(request[\'selection_name\'])">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Next</span>\n <span class="description" i18n:translate="" i18n:domain="ui">List Mode</span>\n
</a>\n </a>\n
<a class="jump_last" title="Last"\n <a class="jump_next" title="Next"\n
tal:attributes="href python: here.ERP5Site_renderLink(\'portal_selections/viewLast\', http_parameters)">\n tal:attributes="href python: here.ERP5XhtmlStyle_renderLink(\'portal_selections/viewNext\', http_parameters)">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Last</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Next</span>\n
</a>\n </a>\n
<a class="jump_last" title="Last"\n
tal:attributes="href python: here.ERP5XhtmlStyle_renderLink(\'portal_selections/viewLast\', http_parameters)">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Last</span>\n
</a>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="list_mode | nothing">\n <tal:block tal:condition="list_mode | nothing">\n
<span class="separator"></span>\n <span class="separator"></span>\n
<a tal:condition="search_actions" class="find" title="Find"\n <a tal:condition="search_actions" class="find" title="Find"\n
tal:attributes="href python: here.ERP5Site_renderCustomLink(search_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_search\')">\n tal:attributes="href python: here.ERP5XhtmlStyle_renderCustomLink(search_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_search\')">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Find</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Find</span>\n
</a>\n </a>\n
...@@ -257,7 +256,7 @@ XXX: Folder_filter accesses selection directly\n ...@@ -257,7 +256,7 @@ XXX: Folder_filter accesses selection directly\n
<span class="description" i18n:translate="" i18n:domain="ui">Filter</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Filter</span>\n
</button>\n </button>\n
<a tal:condition="sort_actions" class="sort" title="Sort"\n <a tal:condition="sort_actions" class="sort" title="Sort"\n
tal:attributes="href python: here.ERP5Site_renderCustomLink(sort_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_sort\')">\n tal:attributes="href python: here.ERP5XhtmlStyle_renderCustomLink(sort_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_sort\')">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Sort</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Sort</span>\n
</a>\n </a>\n
...@@ -265,19 +264,19 @@ XXX: Folder_filter accesses selection directly\n ...@@ -265,19 +264,19 @@ XXX: Folder_filter accesses selection directly\n
<span tal:condition="exchange_actions | report_actions"\n <span tal:condition="exchange_actions | report_actions"\n
class="separator"></span>\n class="separator"></span>\n
<a tal:condition="exchange_actions" class="import_export" title="Import / Export"\n <a tal:condition="exchange_actions" class="import_export" title="Import / Export"\n
tal:attributes="href python: here.ERP5Site_renderCustomLink(exchange_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_exchange\')">\n tal:attributes="href python: here.ERP5XhtmlStyle_renderCustomLink(exchange_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_exchange\')">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Import / Export</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Import / Export</span>\n
</a>\n </a>\n
<a tal:condition="report_actions" class="report" title="Report"\n <a tal:condition="report_actions" class="report" title="Report"\n
tal:attributes="href python: here.ERP5Site_renderCustomLink(report_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_report\')">\n tal:attributes="href python: here.ERP5XhtmlStyle_renderCustomLink(report_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_report\')">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Report</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Report</span>\n
</a>\n </a>\n
<tal:block tal:condition="button_actions">\n <tal:block tal:condition="button_actions">\n
<span class="separator"></span>\n <span class="separator"></span>\n
<tal:block tal:repeat="button_action button_actions">\n <tal:block tal:repeat="button_action button_actions">\n
<a tal:attributes="href python: here.ERP5Site_renderLink(button_action[\'url\'], http_parameters)">\n <a tal:attributes="href python: here.ERP5XhtmlStyle_renderLink(button_action[\'url\'], http_parameters)">\n
<img i18n:attributes="title" i18n:domain="ui"\n <img i18n:attributes="title" i18n:domain="ui"\n
tal:attributes="src python:button_action[\'icon\'];\n tal:attributes="src python:button_action[\'icon\'];\n
title python:button_action[\'name\'];\n title python:button_action[\'name\'];\n
...@@ -288,15 +287,16 @@ XXX: Folder_filter accesses selection directly\n ...@@ -288,15 +287,16 @@ XXX: Folder_filter accesses selection directly\n
<tal:block tal:condition="ui_actions">\n <tal:block tal:condition="ui_actions">\n
<span class="separator"></span>\n <span class="separator"></span>\n
<a class="configure" title="Configure"\n <a class="configure" title="Configure"\n
tal:attributes="href python: here.ERP5Site_renderCustomLink(ui_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_ui\')">\n tal:attributes="href python: here.ERP5XhtmlStyle_renderCustomLink(ui_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_ui\')">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Configure</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Configure</span>\n
</a>\n </a>\n
</tal:block>\n </tal:block>\n
</span>\n </span>\n
<span class="second">\n <span class="second">\n
<a class="jump_help" title="Help"\n <a tal:condition="here/portal_preferences/getPreferredHtmlStyleContextualHelp"\n
tal:attributes="href python: here.Base_getHelpUrl(current_action=current_action, dialog_id=dialog_id, workflow_action=request.get(\'workflow_action\'))">\n class="jump_help" title="Help"\n
tal:attributes="href python: here.ERP5XhtmlStyle_getHelpUrl(current_action=current_action, current_form_id=current_form_id, workflow_action=request.get(\'workflow_action\'))">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Help</span>\n <span class="description" i18n:translate="" i18n:domain="ui">Help</span>\n
</a>\n </a>\n
......
...@@ -73,7 +73,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -73,7 +73,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n -->\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="master">\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:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<div class="list_dialog">\n <div class="list_dialog">\n
......
...@@ -73,7 +73,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -73,7 +73,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n -->\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="field_render">\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:define="html_render python: field.render_htmlgrid(value, request)">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n <tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<div tal:repeat="html_tuple html_render" class="field"\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 ...@@ -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 right_group python: form.get_fields_in_group(\'right\');\n
center_group python: form.get_fields_in_group(\'center\');\n center_group python: form.get_fields_in_group(\'center\');\n
dialog_actions python: actions.get(dialog_category, [])">\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 <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 class="dialog_box">\n
<div tal:condition="python: len(dialog_actions) > 1"\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 ...@@ -108,9 +111,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</button>\n </button>\n
</div>\n </div>\n
<div class="content">\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 <div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n
class="top_group">\n class="top_group">\n
<div tal:condition="python: len(left_group) > 0"\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 ...@@ -81,7 +81,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="index_html">\n class="index_html">\n
<h2 i18n:translate="" i18n:domain="ui">Welcome to ERP5</h2>\n <h2 i18n:translate="" i18n:domain="ui">Welcome to ERP5</h2>\n
<table border="1">\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 module_len python: len(module_list);\n
col_size python: 12;\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 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 ...@@ -73,12 +73,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n -->\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n <tal:block tal:define="form_action string:Base_doSelect:method;\n
<tal:block metal:fill-slot="context_bar">\n form_id form/id;\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n list_mode python: True;\n
</tal:block>\n listmode_default_listbox python: here.ERP5XhtmlStyle_getListbox(form=form);\n
<tal:block metal:fill-slot="main">\n selection_name listmode_default_listbox/selection_name;\n
<tal:block metal:define-slot="main" />\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>\n </tal:block>\n
</tal:block> </tal:block>
......
...@@ -75,55 +75,57 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -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:define-macro="master">\n
<tal:block metal:use-macro="here/dialog_main/macros/master">\n <tal:block metal:use-macro="here/dialog_main/macros/master">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n <div class="dialog_box">\n
<tal:block metal:use-macro="template/macros/form" />\n <tal:block tal:define="template python: here.developper_shortcut_render">\n
</tal:block>\n <tal:block metal:use-macro="template/macros/form" />\n
<div class="content"\n </tal:block>\n
tal:define="items python:here.portal_selections.getSelectionSortOrder(selection_name, REQUEST=request);\n <div class="content"\n
base_form python:getattr(here,form_id);\n tal:define="items python:here.portal_selections.getSelectionSortOrder(request[\'selection_name\'], REQUEST=request);\n
groups base_form/get_groups;\n base_form python:getattr(here,request[\'form_id\']);\n
columns python:base_form.get_fields_in_group(groups[0])[0].get_value(\'all_columns\');\n groups base_form/get_groups;\n
global row_index python:0;\n columns python:base_form.get_fields_in_group(groups[0])[0].get_value(\'all_columns\');\n
global row_keys python:[\'None\'];\n global row_index python:0;\n
all_columns python: [(\'None\',\'None\')] + columns;">\n global row_keys python:[\'None\'];\n
<div tal:repeat="item items"\n all_columns python: [(\'None\',\'None\')] + columns;">\n
class="field">\n <div tal:repeat="item items"\n
<label>\n class="field">\n
<tal:block i18n:translate="" i18n:domain="ui">Sort</tal:block>\n <label>\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
<tal:block i18n:translate="" i18n:domain="ui">Sort</tal:block>\n <tal:block i18n:translate="" i18n:domain="ui">Sort</tal:block>\n
<tal:block tal:replace="row_index" />\n <tal:block tal:replace="row_index" />\n
</label>\n </label>\n
<div class="input" tal:attributes="id string:sort_${row_index}">\n <div class="input" tal:attributes="id string:sort_${row_index}">\n
<select name="field_sort_on">\n <select name="field_sort_on">\n
<option selected="selected" value="None">None</option>\n <tal:block tal:repeat="option all_columns">\n
<option tal:repeat="option columns"\n <option tal:content="python:option[1]"\n
tal:content="python:option[1]"\n tal:attributes="value python:option[0];\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 i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</select>\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 </div>\n
</tal:block>\n <h6 class="clear" />\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
<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
</div>\n </div>\n
</tal:block>\n </tal:block>\n
......
...@@ -76,42 +76,27 @@ IDEAS:\n ...@@ -76,42 +76,27 @@ IDEAS:\n
-->\n -->\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\n
<tal:block tal:condition="form/pt | nothing">\n <tal:block tal:define="\n
<tal:block tal:define="global list_mode python: form[\'pt\'] == \'form_list\';\n cancel_url request/cancel_url | request/ACTUAL_URL;\n
global listmode_default_listbox python: here.ERP5Site_getListbox(form=form)" />\n local_parameter_list local_parameter_list | python: {};\n
</tal:block>\n dummy python: local_parameter_list.update({\'cancel_url\': cancel_url});\n
<tal:block tal:define="global actions python:here.getPortalObject().portal_actions.listFilteredActionsFor(here);\n
global dialog_id form/id | template/id;\n
global form_id request/form_id | dialog_id;\n
global field_errors python: request.get(\'field_errors\',{});\n
global cancel_url request/cancel_url | request/ACTUAL_URL;\n
global dialog_method form/action | form_id;\n
global form_action form_action | dialog_method;\n
global dialog_category request/dialog_category | nothing;\n
global url python: \'%s%s\' % (request[\'SERVER_URL\'], here.getPath(), );\n
global ignore_layout request/ignore_layout | python: 0;\n
\n
global selection_name request/selection_name | listmode_default_listbox/selection_name | nothing;\n
dummy python: selection_name and request.set(\'selection_name\', selection_name);\n
global selection_index request/selection_index | nothing;\n
global selection_url python: selection_name and here.portal_selections.getSelectionListUrlFor(selection_name,REQUEST=request) or None;\n
\n
global current_url python: \'%s/%s\' % (url, dialog_id);\n
global current_action python: here.ERP5Site_getCurrentAction(current_url, actions);\n
form_pickle request/form_pickle | nothing;\n
form_signature request/form_signature | nothing;\n
field_id request/field_id | nothing;\n
object_uid here/getUid | nothing;\n
object_path here/getPath | nothing;\n
dummy python: request.set(\'here\',here);\n
\n
global http_parameter_list python: here.ERP5Site_getHTTPParameterList(request_form=request.form, form_id=form_id, dialog_id=dialog_id, selection_name=selection_name, selection_index=selection_index, selection_url=selection_url, cancel_url=cancel_url, form_action=form_action, dialog_method=dialog_method, dialog_category=dialog_category, form_pickle=form_pickle, form_signature=form_signature, field_id=field_id, object_uid=object_uid, object_path=object_path);\n
global http_parameters python: here.ERP5Site_renderHTTPParameterList(http_parameter_list);\n
\n \n
global actions python: here.getPortalObject().portal_actions.listFilteredActionsFor(here);\n
global url python: \'%s%s\' % (request[\'SERVER_URL\'], here.getPath(), );\n
global current_form_id python: local_parameter_list.get(\'dialog_id\', local_parameter_list.get(\'form_id\', \'view\'));\n
global current_url python: \'%s/%s\' % (url, current_form_id);\n
global current_action python: here.ERP5XhtmlStyle_getCurrentAction(current_url, actions);\n
dummy python: request.set(\'here\', here);\n
global css_list css_list | python: [];\n global css_list css_list | python: [];\n
dummy python: css_list.append(\'%s/erp5.css\' % (here.portal_url.getPortalPath(), ));\n dummy python: css_list.append(\'%s/erp5.css\' % (here.portal_url.getPortalPath(), ));\n
global js_list js_list | python: [];\n global js_list js_list | python: [];\n
dummy python: js_list.append(\'%s/erp5.js\' % (here.portal_url.getPortalPath(), ));\n dummy python: js_list.append(\'%s/erp5.js\' % (here.portal_url.getPortalPath(), ));\n
\n
\n
global http_parameter_list request/form/copy;\n
http_parameter_list python: here.ERP5XhtmlStyle_filterParameterList(http_parameter_list);\n
dummy python: http_parameter_list.update(local_parameter_list);\n
global http_parameters python: here.ERP5XhtmlStyle_renderHTTPParameterList(http_parameter_list);\n
" />\n " />\n
<?xml version="1.0" encoding="UTF-8"?>\n <?xml version="1.0" encoding="UTF-8"?>\n
<!DOCTYPE html\n <!DOCTYPE html\n
...@@ -133,7 +118,7 @@ IDEAS:\n ...@@ -133,7 +118,7 @@ IDEAS:\n
</tal:block>\n </tal:block>\n
\n \n
<tal:block tal:condition="form/pt | nothing">\n <tal:block tal:condition="form/pt | nothing">\n
<tal:block tal:define="planning_box python: here.ERP5Site_getPlanningBox(form)">\n <tal:block tal:define="planning_box python: here.ERP5XhtmlStyle_getPlanningBox(form)">\n
<tal:block tal:condition="python: planning_box">\n <tal:block tal:condition="python: planning_box">\n
\n \n
<style tal:content="structure python: planning_box.render_css(None,REQUEST=request)"\n <style tal:content="structure python: planning_box.render_css(None,REQUEST=request)"\n
...@@ -153,6 +138,7 @@ IDEAS:\n ...@@ -153,6 +138,7 @@ IDEAS:\n
</tal:block>\n </tal:block>\n
</head>\n </head>\n
<body>\n <body>\n
<!-- <tal:block tal:replace="structure request"/> -->\n
<form id="main_form"\n <form id="main_form"\n
tal:attributes="enctype form/enctype | nothing;\n tal:attributes="enctype form/enctype | nothing;\n
action url;\n action url;\n
...@@ -160,7 +146,7 @@ IDEAS:\n ...@@ -160,7 +146,7 @@ IDEAS:\n
<div id="bars">\n <div id="bars">\n
<!-- Hidden button as explained in http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html -->\n <!-- Hidden button as explained in http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html -->\n
<!-- We should probably call the default method instead -->\n <!-- We should probably call the default method instead -->\n
<input tal:condition="form_action"\n <input tal:condition="form_action | nothing"\n
id="hidden_button" type="submit" value="dummy"\n id="hidden_button" type="submit" value="dummy"\n
tal:attributes="name python: \'%s:method\' % (form_action, )" />\n tal:attributes="name python: \'%s:method\' % (form_action, )" />\n
<!-- Generic way of specifying http parameters -->\n <!-- Generic way of specifying http parameters -->\n
...@@ -172,10 +158,10 @@ IDEAS:\n ...@@ -172,10 +158,10 @@ IDEAS:\n
<div id="main_bar">\n <div id="main_bar">\n
<span class="first">\n <span class="first">\n
<span id="favourites">\n <span id="favourites">\n
<select name="favorite_select"\n <select name="select_favorite"\n
tal:define="ordered_global_actions python:here.getOrderedGlobalActionList(actions[\'global\']);\n tal:define="ordered_global_actions python:here.getOrderedGlobalActionList(actions[\'global\']);\n
user_actions actions/user;"\n user_actions actions/user;"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doFavorite\')">\n tal:attributes="onChange string:submitAction(this.form,\'${url}/ERP5XhtmlStyle_doFavorite\')">\n
<option selected="selected" value=""\n <option selected="selected" value=""\n
i18n:translate="" i18n:domain="ui">My favourites</option>\n i18n:translate="" i18n:domain="ui">My favourites</option>\n
<tal:block tal:condition="ordered_global_actions">\n <tal:block tal:condition="ordered_global_actions">\n
...@@ -202,7 +188,7 @@ IDEAS:\n ...@@ -202,7 +188,7 @@ IDEAS:\n
i18n:translate="" i18n:domain="ui"></option>\n i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n </tal:block>\n
</select>\n </select>\n
<button type="submit" name="Base_doFavorite:method" title="Select Favorite"\n <button type="submit" name="ERP5XhtmlStyle_doFavorite:method" title="Select Favorite"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description"\n <span class="description"\n
...@@ -211,9 +197,9 @@ IDEAS:\n ...@@ -211,9 +197,9 @@ IDEAS:\n
</span>\n </span>\n
<span class="separator"></span>\n <span class="separator"></span>\n
<span id="modules">\n <span id="modules">\n
<select name="module_select"\n <select name="select_module"\n
tal:define="module_list here/ERP5Site_getModuleItemList;"\n tal:define="module_list here/ERP5XhtmlStyle_getModuleItemList;"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doModule\')">\n tal:attributes="onChange string:submitAction(this.form,\'${url}/ERP5XhtmlStyle_doModule\')">\n
<option selected="selected" value=""\n <option selected="selected" value=""\n
i18n:translate="" i18n:domain="ui">ERP5 Modules</option>\n i18n:translate="" i18n:domain="ui">ERP5 Modules</option>\n
<tal:block tal:repeat="module module_list">\n <tal:block tal:repeat="module module_list">\n
...@@ -222,7 +208,7 @@ IDEAS:\n ...@@ -222,7 +208,7 @@ IDEAS:\n
tal:content="python: module[0]" />\n tal:content="python: module[0]" />\n
</tal:block>\n </tal:block>\n
</select>\n </select>\n
<button type="submit" name="Base_doModule:method" title="Select Module"\n <button type="submit" name="ERP5XhtmlStyle_doModule:method" title="Select Module"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description"\n <span class="description"\n
...@@ -232,8 +218,8 @@ IDEAS:\n ...@@ -232,8 +218,8 @@ IDEAS:\n
</span>\n </span>\n
<span class="second">\n <span class="second">\n
<span id="language">\n <span id="language">\n
<select name="language_select"\n <select name="select_language"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doLanguage\')">\n tal:attributes="onChange string:submitAction(this.form,\'${url}/ERP5XhtmlStyle_doLanguage\')">\n
<option value=""\n <option value=""\n
i18n:translate="" i18n:domain="ui">My language</option>\n i18n:translate="" i18n:domain="ui">My language</option>\n
<tal:block tal:repeat="language python: here.Localizer.get_languages_map()">\n <tal:block tal:repeat="language python: here.Localizer.get_languages_map()">\n
...@@ -242,7 +228,7 @@ IDEAS:\n ...@@ -242,7 +228,7 @@ IDEAS:\n
tal:content="python: here.Localizer.erp5_ui.gettext(language[\'title\'], lang=language[\'id\'])"></option>\n tal:content="python: here.Localizer.erp5_ui.gettext(language[\'title\'], lang=language[\'id\'])"></option>\n
</tal:block>\n </tal:block>\n
</select>\n </select>\n
<button type="submit" name="Base_doLanguage:method" title="Select Language"\n <button type="submit" name="ERP5XhtmlStyle_doLanguage:method" title="Select Language"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
<span class="description"\n <span class="description"\n
...@@ -271,12 +257,12 @@ IDEAS:\n ...@@ -271,12 +257,12 @@ IDEAS:\n
<tal:block tal:repeat="item here/breadcrumbs">\n <tal:block tal:repeat="item here/breadcrumbs">\n
<tal:block tal:condition="python: repeat[\'item\'].index < 2">\n <tal:block tal:condition="python: repeat[\'item\'].index < 2">\n
<a tal:attributes="href item/url"\n <a tal:attributes="href item/url"\n
tal:content="item/title"\n tal:content="item/title"\n
i18n:translate="" i18n:domain="ui"></a>\n i18n:translate="" i18n:domain="ui"></a>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: repeat[\'item\'].index >= 2">\n <tal:block tal:condition="python: repeat[\'item\'].index >= 2">\n
<a tal:attributes="href item/url"\n <a tal:attributes="href item/url"\n
tal:content="item/title"></a>\n tal:content="item/title"></a>\n
</tal:block>\n </tal:block>\n
/\n /\n
</tal:block>\n </tal:block>\n
......
...@@ -73,34 +73,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -73,34 +73,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n -->\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n <tal:block tal:define="object_uid here/getUid | nothing;\n
<tal:block metal:fill-slot="context_bar">\n object_path here/getPath | nothing;\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n form_id form/id | nothing;\n
</tal:block>\n form_action python: here.portal_membership.checkPermission(\'Modify portal content\', here) and \'Base_edit:method\' or nothing;\n
<tal:block metal:fill-slot="main">\n \n
<div class="document"\n local_parameter_list local_parameter_list | python: {};\n
tal:define="actions actions/object_view | python: []">\n dummy python: local_parameter_list.update({\'object_uid\': object_uid, \'object_path\': object_path, \'form_id\': form_id});\n
<div class="actions">\n ">\n
<tal:block tal:condition="editable_mode | python: 1">\n <tal:block metal:use-macro="here/main_template/macros/master">\n
<button tal:condition="python: here.portal_membership.checkPermission(\'Modify portal content\', here)"\n <tal:block metal:fill-slot="context_bar">\n
type="submit" name="Base_edit:method" class="save" title="Save"\n <tal:block metal:use-macro="here/context_box_render/macros/master" />\n
i18n:attributes="title" i18n:domain="ui">\n </tal:block>\n
<span class="image"></span>\n <tal:block metal:fill-slot="main">\n
<span class="description"\n <div class="document"\n
i18n:translate="" i18n:domain="ui">Save</span>\n tal:define="actions actions/object_view | python: []">\n
</button>\n <div class="actions">\n
</tal:block>\n <tal:block tal:condition="editable_mode | python: 1">\n
<ul tal:condition="python: len(actions)">\n <button tal:condition="python: here.portal_membership.checkPermission(\'Modify portal content\', here)"\n
<tal:block tal:repeat="action actions">\n type="submit" name="Base_edit:method" class="save" title="Save"\n
<li tal:attributes="class python: action == current_action and \'selected\' or \'not_selected\'">\n i18n:attributes="title" i18n:domain="ui">\n
<a tal:attributes="href python: here.ERP5Site_renderLink(action[\'url\'], http_parameters)"\n <span class="image"></span>\n
tal:content="action/name"></a>\n <span class="description"\n
</li>\n i18n:translate="" i18n:domain="ui">Save</span>\n
</button>\n
</tal:block>\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>\n
<div class="content"><tal:block metal:define-slot="main" /></div>\n </tal:block>\n
</div>\n
</tal:block>\n </tal:block>\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 2006-07-17 jerome
* fix object_jump actions that were not displayed. * fix object_jump actions that were not displayed.
......
This style is a rewrite of erp5_html_style more CSS and semantic html oriented. This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
\ No newline at end of file Handles page parameters dynamically.
\ No newline at end of file
25 33
\ No newline at end of file \ No newline at end of file
0.2 1.1
\ No newline at end of file \ 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