Commit b8d4fb21 authored by Sebastien Robin's avatar Sebastien Robin

2008-09-03 Seb

* When the untranslatable columns is set, do not translate some columns title
* A the title of the listbox, this allows to understand what is the content of the listbox

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23361 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1f8f3d3e
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</style:style>\n </style:style>\n
</office:automatic-styles>\n </office:automatic-styles>\n
\n \n
<office:body> \n <office:body>\n
<office:text>\n <office:text>\n
<text:sequence-decls>\n <text:sequence-decls>\n
<text:sequence-decl text:display-outline-level=\'0\' text:name=\'Illustration\'/>\n <text:sequence-decl text:display-outline-level=\'0\' text:name=\'Illustration\'/>\n
...@@ -95,10 +95,11 @@ ...@@ -95,10 +95,11 @@
<text:sequence-decl text:display-outline-level=\'0\' text:name=\'Drawing\'/>\n <text:sequence-decl text:display-outline-level=\'0\' text:name=\'Drawing\'/>\n
</text:sequence-decls>\n </text:sequence-decls>\n
***** ########### listbox: must define the field listbox before calling this macro ! ########### *****\n ***** ########### listbox: must define the field listbox before calling this macro ! ########### *****\n
<tal:block metal:define-macro="listbox"> \n <tal:block metal:define-macro="listbox">\n
<tal:block tal:define="listboxline_list python:listbox.get_value(\'default\', render_format=\'list\', REQUEST=request);\n <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 selection_name python:listbox.get_value(\'selection_name\', REQUEST=request);\n
editable_columns python:listbox.get_value(\'editable_columns\', REQUEST=request);\n editable_columns python:listbox.get_value(\'editable_columns\', REQUEST=request);\n
untranslatable_columns_dict python:dict([(column[0],1) for column in listbox.get_value(\'untranslatable_columns\', REQUEST=request)]);\n
editable_fields python:dict([(column[0], getattr(listbox.aq_parent, \'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 selection python:here.portal_selections.getSelectionFor(selection_name, REQUEST=request);\n
is_domain_tree_mode selection/domain_tree_mode | nothing;\n is_domain_tree_mode selection/domain_tree_mode | nothing;\n
...@@ -117,9 +118,9 @@ ...@@ -117,9 +118,9 @@
</table:table-row>\n </table:table-row>\n
</table:table>\n </table:table>\n
</tal:block>\n </tal:block>\n
</tal:block> \n </tal:block>\n
\n \n
<table:table table:style-name=\'listbox-table\' table:name=\'listbox-table\'> \n <table:table table:style-name=\'listbox-table\' table:name=\'listbox-table\'>\n
<tal:block tal:repeat="column_item python:listboxline_list[0].getColumnItemList()">\n <tal:block tal:repeat="column_item python:listboxline_list[0].getColumnItemList()">\n
<table:table-column table:style-name=\'listbox-table.A\'/>\n <table:table-column table:style-name=\'listbox-table.A\'/>\n
</tal:block> \n </tal:block> \n
...@@ -137,8 +138,8 @@ ...@@ -137,8 +138,8 @@
<tal:block tal:condition="repeat/listboxline/even">\n <tal:block tal:condition="repeat/listboxline/even">\n
<!-- <tal:block tal:define="global style_cell python:\'listbox-table.C3\'"/> -->\n <!-- <tal:block tal:define="global style_cell python:\'listbox-table.C3\'"/> -->\n
<tal:block tal:define="global style_text python:\'listbox-data-b\'"/>\n <tal:block tal:define="global style_text python:\'listbox-data-b\'"/>\n
</tal:block> \n </tal:block>\n
\n \n
<tal:block tal:condition="python: is_report_tree_mode">\n <tal:block tal:condition="python: is_report_tree_mode">\n
<table:table-row>\n <table:table-row>\n
<table:table-cell style:name=\'listbox-table.A1\' office:value-type=\'string\'>\n <table:table-cell style:name=\'listbox-table.A1\' office:value-type=\'string\'>\n
...@@ -150,28 +151,45 @@ ...@@ -150,28 +151,45 @@
</tal:block> \n </tal:block> \n
\n \n
<tal:block tal:condition="python: listboxline.isTitleLine()">\n <tal:block tal:condition="python: listboxline.isTitleLine()">\n
<table:table-header-rows>\n <table:table-header-rows>\n
<table:table-row>\n
<table:table-cell table:style-name=\'listbox-table.A1\' \n
tal:attributes="table:number-columns-spanned python: len(listboxline.getColumnItemList())" \n
office:value-type=\'string\'>\n
<text:p text:style-name=\'listbox-header\'\n
tal:content="python: listbox.get_value(\'title\') or \'\'"/> \n
</table:table-cell>\n
</table:table-row>\n
</table:table-header-rows>\n
<table:table-header-rows>\n
<table:table-row>\n <table:table-row>\n
<tal:block tal:repeat="column_item python: listboxline.getColumnItemList()">\n <tal:block tal:repeat="column_item python: listboxline.getColumnItemList()">\n
<tal:block tal:define="column_property python: column_item[1];\n <tal:block tal:define="column_property python: column_item[1];\n
column_id python: column_item[0]">\n column_id python: column_item[0]">\n
<tal:block tal:condition="python: column_property is not None">\n <tal:block tal:condition="python: column_property is not None">\n
<table:table-cell table:style-name=\'listbox-table.A1\' office:value-type=\'string\'> \n <table:table-cell table:style-name=\'listbox-table.A1\' office:value-type=\'string\'>\n
<text:p text:style-name=\'listbox-header\'\n <tal:block tal:condition="python: untranslatable_columns_dict.has_key(column_id)">\n
tal:content="python: here.Localizer.erp5_ui.gettext(column_property).encode(\'utf8\')"/> \n <text:p text:style-name=\'listbox-header\'\n
tal:content="python: column_property"/> \n
</tal:block>\n
<tal:block tal:condition="python: not(untranslatable_columns_dict.has_key(column_id))">\n
<text:p text:style-name=\'listbox-header\'\n
tal:content="python: here.Base_translateString(column_property)"/> \n
</tal:block>\n
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: column_property is None">\n <tal:block tal:condition="python: column_property is None">\n
<table:table-cell table:style-name=\'listbox-table.A1\' office:value-type=\'string\'>\n <table:table-cell table:style-name=\'listbox-table.A1\' office:value-type=\'string\'>\n
<text:p text:style-name=\'listbox-header\' tal:content="python: \'\'" /> \n <text:p text:style-name=\'listbox-header\' tal:content="python: \'\'" />\n
</table:table-cell>\n </table:table-cell>\n
</tal:block> \n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</table:table-row>\n </table:table-row>\n
</table:table-header-rows>\n </table:table-header-rows>\n
</tal:block>\n </tal:block>\n
\n \n
\n
<!-- Data Line -->\n <!-- Data Line -->\n
<tal:block tal:condition="python: listboxline.isDataLine() ">\n <tal:block tal:condition="python: listboxline.isDataLine() ">\n
<table:table-row>\n <table:table-row>\n
...@@ -182,7 +200,7 @@ ...@@ -182,7 +200,7 @@
<tal:block tal:condition="python: is_list">\n <tal:block tal:condition="python: is_list">\n
<table:table-cell tal:attributes="table:style-name style_cell" office:value-type=\'string\'>\n <table:table-cell tal:attributes="table:style-name style_cell" office:value-type=\'string\'>\n
<tal:block tal:repeat="item column_property">\n <tal:block tal:repeat="item column_property">\n
<text:p tal:attributes="text:style-name style_text" \n <text:p tal:attributes="text:style-name style_text"\n
tal:content="item"/>\n tal:content="item"/>\n
</tal:block>\n </tal:block>\n
</table:table-cell>\n </table:table-cell>\n
...@@ -201,7 +219,7 @@ ...@@ -201,7 +219,7 @@
<tal:block tal:condition="python: column_property is None">\n <tal:block tal:condition="python: column_property is None">\n
<table:table-cell tal:attributes="table:style-name style_cell" office:value-type=\'string\'>\n <table:table-cell tal:attributes="table:style-name style_cell" office:value-type=\'string\'>\n
<text:p tal:attributes="text:style-name style_text" tal:content="string:" />\n <text:p tal:attributes="text:style-name style_text" tal:content="string:" />\n
</table:table-cell> \n </table:table-cell>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
...@@ -226,15 +244,15 @@ ...@@ -226,15 +244,15 @@
</table:table-cell>\n </table:table-cell>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: column_property is None">\n <tal:block tal:condition="python: column_property is None">\n
<table:table-cell tal:attributes="table:style-name style_cell" office:value-type=\'string\'> \n <table:table-cell tal:attributes="table:style-name style_cell" office:value-type=\'string\'>\n
<text:p tal:attributes="text:style-name style_text"/>\n <text:p tal:attributes="text:style-name style_text"/>\n
</table:table-cell> \n </table:table-cell>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</table:table-row>\n </table:table-row>\n
</tal:block> \n </tal:block>\n
</tal:block> \n </tal:block>\n
</table:table>\n </table:table>\n
<text:p></text:p>\n <text:p></text:p>\n
</tal:block>\n </tal:block>\n
......
56 58
\ 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