Commit 5449b37d authored by Yusei Tahara's avatar Yusei Tahara

2008-06-20 yusei

* Fixed category list fields. List items are sorted by displayed title.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21731 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 175e96e0
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_categories.region.getCategoryChildTitleItemList(sort_id=\'translated_title\', checked_permission=\'View\', filter_node=1)</string> </value>
<value> <string>python: here.portal_categories.region.getCategoryChildTranslatedCompactTitleItemList(sort_id=\'translated_short_title\', checked_permission=\'View\', filter_node=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.activity, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=\'translated_title\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.activity)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(filter_node=1, local_sort_id=\'translated_title\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.function, filter_node=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.group, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\').replace(\'Translated\', \'\'))(local_sort_id=\'title\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.group, translate=False)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.site, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\').replace(\'Translated\', \'\'))(local_sort_id=\'title\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.site, translate=False)</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</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>default_method_name = \'getCategoryChildTranslatedCompactLogicalPathItemList\'\n
method_name = context.portal_preferences.getPreference(\'preferred_category_child_item_list_method_id\', default=default_method_name)\n
\n
if not translate:\n
method_name = method_name.replace(\'Translated\', \'\')\n
\n
if translate:\n
if \'Compact\' in method_name:\n
local_sort_id_list = (\'int_index\', \'translated_short_title\')\n
else:\n
local_sort_id_list = (\'int_index\', \'translated_title\')\n
else:\n
if \'Compact\' in method_name:\n
local_sort_id_list = (\'int_index\', \'short_title\')\n
else:\n
local_sort_id_list = (\'int_index\', \'title\')\n
\n
method = getattr(base_category, method_name)\n
\n
return method(local_sort_id=local_sort_id_list, checked_permission=\'View\', **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>base_category, translate=True, **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>base_category</string>
<string>translate</string>
<string>kw</string>
<string>default_method_name</string>
<string>_getattr_</string>
<string>context</string>
<string>method_name</string>
<string>local_sort_id_list</string>
<string>getattr</string>
<string>method</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>1</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getPreferredCategoryChildItemList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -73,7 +73,19 @@
portal = context.getPortalObject()\n
category_child_item_list_method_id = portal.portal_preferences.getPreference(\n
\'preferred_category_child_item_list_method_id\',\n
\'getCategoryChildCompactLogicalPathItemList\')\n
\'getCategoryChildTranslatedCompactLogicalPathItemList\')\n
\n
if \'Translated\' in category_child_item_list_method_id:\n
if \'Compact\' in category_child_item_list_method_id:\n
local_sort_id_list = (\'int_index\', \'translated_short_title\')\n
else:\n
local_sort_id_list = (\'int_index\', \'translated_title\')\n
else:\n
if \'Compact\' in category_child_item_list_method_id:\n
local_sort_id_list = (\'int_index\', \'short_title\')\n
else:\n
local_sort_id_list = (\'int_index\', \'title\')\n
\n
result = []\n
\n
if context.getSubordination():\n
......@@ -82,12 +94,12 @@ if context.getSubordination():\n
function_value = subordination_value.getFunctionValue()\n
if function_value is not None:\n
result.extend(getattr(function_value, category_child_item_list_method_id)(\n
filter_node=1, local_sort_id="translated_title"))\n
filter_node=1, local_sort_id=local_sort_id_list))\n
\n
result.extend(getattr(\n
portal.portal_categories.function,\n
category_child_item_list_method_id)(\n
filter_node=1, local_sort_id="translated_title"))\n
filter_node=1, local_sort_id=local_sort_id_list))\n
\n
return result\n
</string> </value>
......@@ -136,6 +148,7 @@ return result\n
<string>context</string>
<string>portal</string>
<string>category_child_item_list_method_id</string>
<string>local_sort_id_list</string>
<string>result</string>
<string>subordination_value</string>
<string>None</string>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories.activity, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'))</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.activity)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories.grade, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.grade)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -124,7 +124,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories.salary_level, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.salary_level)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories.skill, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.skill)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.product_line, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\').replace(\'Translated\', \'\'))(local_sort_id=("int_index", "title"))</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.product_line, translate=False)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories.function, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(filter_leave=1, local_sort_id="translated_title", checked_permission=\'View\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.function, filter_leave=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories.group, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\').replace(\'Translated\', \'\'))(local_sort_id=\'title\', checked_permission=\'View\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(here.portal_categories.group, translate=False)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.site, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\').replace(\'Translated\', \'\'))(local_sort_id=\'title\')</string> </value>
<value> <string>python:here.Base_getPreferredCategoryChildItemList(context.portal_categories.site, translate=False)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.ProxyField</string>
<string>ProxyField</string>
</tuple>
<none/>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -18,6 +15,7 @@
<list>
<string>title</string>
<string>description</string>
<string>items</string>
</list>
</value>
</item>
......@@ -59,6 +57,10 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -100,6 +102,12 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -117,18 +125,15 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(context.portal_categories.nationality, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))()</string> </value>
<value> <string>python: here.portal_categories.nationality.getCategoryChildTranslatedCompactTitleItemList(sort_id=\'translated_short_title\', checked_permission=\'View\', filter_node=1)</string> </value>
</item>
</dictionary>
</pickle>
......
2008-06-20 yusei
* Fixed category list fields. List items are sorted by displayed title.
2008-06-18 Nicolas
Add Notification Message Module
......
347
\ No newline at end of file
348
\ 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