[Erp5-report] r37272 yusuke - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 27 08:20:38 CEST 2010
Author: yusuke
Date: Tue Jul 27 08:20:37 2010
New Revision: 37272
URL: http://svn.erp5.org?rev=37272&view=rev
Log:
2010-07-27 yusuke
* Exporting category list limits to appropriate properties.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_constructCategoryTableToExport.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_constructCategoryTableToExport.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_constructCategoryTableToExport.xml?rev=37272&r1=37271&r2=37272&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_constructCategoryTableToExport.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_constructCategoryTableToExport.xml [utf8] Tue Jul 27 08:20:37 2010
@@ -55,6 +55,12 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
+editable_property_id_list = (\'id\', \'title\', \'short_title\', \'reference\',\n
+ \'codification\', \'int_index\', \'description\')\n
+\n
+def getHeaderTitle(property_id):\n
+ return \' \'.join([s.capitalize() for s in property_id.split(\'_\')])\n
+\n
cat_info_list = []\n
for base_cat_id in context.REQUEST[\'category_list\']:\n
base_cat = context.portal_categories[base_cat_id]\n
@@ -88,14 +94,15 @@ for cat_info in cat_info_list:\n
max_cat_depth = cat_info[\'max_cat_depth\']\n
header_dict[\'path_cell_list\'] = [\'\'] * (max_cat_depth - 1)\n
header_dict[\'path_cell_list\'][0] = \'Path\'\n
- header_dict[\'category_property_list\'] = [\' \'.join([s.capitalize() for s in property_id.split(\'_\')]) for property_id in cat_list[0].getPropertyIdList() if property_id != \'uid\']\n
- \n
+ header_dict[\'category_property_list\'] = [getHeaderTitle(property_id)\n
+ for property_id in editable_property_id_list]\n
for cat in cat_list:\n
row = dict()\n
row[\'path_cell_list\'] = [\'\'] * (max_cat_depth - 1)\n
row[\'path_cell_list\'][len(cat.getRelativeUrl().split(\'/\')) - 2] = \'*\'\n
- row[\'category_property_list\'] = [item[1] for item in cat.getPropertyItemList() if item[0] != \'uid\']\n
- row_list.append(row) \n
+ row[\'category_property_list\'] = [cat.getProperty(property_id)\n
+ for property_id in editable_property_id_list]\n
+ row_list.append(row)\n
else:\n
header_dict[\'path_cell_list\'] = [\'Path\']\n
header_dict[\'category_property_list\'] = []\n
@@ -140,6 +147,8 @@ return result\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
+ <string>editable_property_id_list</string>
+ <string>getHeaderTitle</string>
<string>cat_info_list</string>
<string>_getiter_</string>
<string>_getitem_</string>
@@ -165,10 +174,7 @@ return result\n
<string>append</string>
<string>$append0</string>
<string>property_id</string>
- <string>$append1</string>
- <string>s</string>
<string>row</string>
- <string>item</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log?rev=37272&r1=37271&r2=37272&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log [utf8] Tue Jul 27 08:20:37 2010
@@ -1,3 +1,6 @@
+2010-07-27 yusuke
+* Exporting category list limits to appropriate properties.
+
2010-07-15 yusei
* Fix a bug on CategoryTool_getPreferredPredicateCategoryParentUidItemList to support multimembership category list.
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=37272&r1=37271&r2=37272&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Jul 27 08:20:37 2010
@@ -1 +1 @@
-1639
\ No newline at end of file
+1641
\ No newline at end of file
More information about the Erp5-report
mailing list