From 96ec918d2aec33c3e521a6ff39c8587d5458ada7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 1 Feb 2007 20:10:30 +0000 Subject: [PATCH] ListBox.getParentValue never existed When rendering a list value in a listbox cell, display one value per line. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12508 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_pdf_style/ListBox_getColumnWithDict.xml | 2 +- .../erp5_pdf_style/listbox_pdf_macro.xml | 14 +++++++++++--- bt5/erp5_pdf_style/bt/revision | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml index 96726a47e1..4f2be0ebc0 100644 --- a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml +++ b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml @@ -73,7 +73,7 @@ if listbox is not None:\n cache = context.REQUEST.other.get(\n \'%s/%s/ListBox_getColumnWithDict\' % (\n - listbox.getParentValue().getId(), listbox.getId()), None)\n + listbox.aq_parent.getId(), listbox.getId()), None)\n if cache is not None:\n return cache\n \n diff --git a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml index a5b903c2c7..87fb496141 100644 --- a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml +++ b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml @@ -67,7 +67,7 @@ <tal:block tal:define="listboxline_list python:listbox.get_value(\'default\', render_format=\'list\', REQUEST=request);\n selection_name python:listbox.get_value(\'selection_name\', REQUEST=request);\n editable_columns python:listbox.get_value(\'editable_columns\', REQUEST=request);\n - editable_fields python:dict([(column[0], getattr(listbox.getParentValue(), \'listbox_%s\' % column[0], None)) for column in editable_columns]);\n + editable_fields python:dict([(column[0], getattr(listbox.aq_parent, \'listbox_%s\' % column[0], None)) for column in editable_columns]);\n selection python:here.portal_selections.getSelectionFor(selection_name, REQUEST=request);\n is_domain_tree_mode python:selection.domain_tree_mode;\n is_report_tree_mode python:selection.report_tree_mode;" >\n @@ -128,8 +128,16 @@ <tal:block tal:condition="python: listboxline.isDataLine() ">\n <tal:block tal:repeat="column_item python: listboxline.getColumnItemList()">\n <tal:block tal:define="column_property python: column_item[1];\n - column_id python: column_item[0]">\n - <tal:block tal:condition="python: column_property is not None">\n + column_id python: column_item[0];\n + is_list python:same_type(column_property, []) or same_type(column_property, ())">\n + <tal:block tal:condition="python: is_list">\n + <td>\n + <tal:block tal:repeat="item column_property">\n + <para style="TableStandard" tal:content="item"/>\n + </tal:block>\n + </td>\n + </tal:block>\n + <tal:block tal:condition="python: column_property is not None and not is_list">\n <td tal:attributes="colwidth python:\'%.2fcm\' % float(column_width[column_id])"\n tal:define="field python: editable_fields.get(column_id, None)" >\n <para tal:condition="python: field is None"\n diff --git a/bt5/erp5_pdf_style/bt/revision b/bt5/erp5_pdf_style/bt/revision index 25bf17fc5a..dec2bf5d61 100644 --- a/bt5/erp5_pdf_style/bt/revision +++ b/bt5/erp5_pdf_style/bt/revision @@ -1 +1 @@ -18 \ No newline at end of file +19 \ No newline at end of file -- 2.30.9