From 32282e9b48ec1d3d392e685e8fda13419335e50a Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Tue, 21 Apr 2009 15:41:28 +0000
Subject: [PATCH] improve Predicate_view. * group membership criteria related
 items. * display base category id in membership values lists.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26569 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...cate_getMembershipCriterionCategoryList.xml |  7 ++++++-
 .../portal_skins/erp5_core/Predicate_view.xml  | 18 +++++++++++++-----
 .../my_membership_criterion_category_list.xml  |  9 +++------
 product/ERP5/bootstrap/erp5_core/bt/revision   |  2 +-
 4 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml
index 85fc7ee4b2..b5b63403fb 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml
@@ -75,7 +75,11 @@ for item in mixed_list:\n
           for x in fallback_category.getCategoryChildCompactLogicalPathItemList(base=1) if x[0]])\n
         break\n
 \n
-  category_list.extend(item_list)\n
+  for i in item_list:\n
+    if i[0] != \'\':\n
+      category_list.append([\'%s/%s\' % (item, i[0]), i[1]])\n
+    else:\n
+      category_list.append(i)\n
 \n
 return category_list\n
 </string> </value>
@@ -131,6 +135,7 @@ return category_list\n
                             <string>append</string>
                             <string>$append0</string>
                             <string>x</string>
+                            <string>i</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml
index a4b54b289a..d53755f491 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml
@@ -58,7 +58,8 @@
               <list>
                 <string>left</string>
                 <string>right</string>
-                <string>center</string>
+                <string>center left</string>
+                <string>center right</string>
                 <string>bottom</string>
                 <string>hidden</string>
               </list>
@@ -77,7 +78,16 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>center</string> </key>
+                    <key> <string>center left</string> </key>
+                    <value>
+                      <list>
+                        <string>my_membership_criterion_base_category_list</string>
+                        <string>my_multimembership_criterion_base_category_list</string>
+                      </list>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>center right</string> </key>
                     <value>
                       <list>
                         <string>my_membership_criterion_category_list</string>
@@ -99,7 +109,6 @@
                     <value>
                       <list>
                         <string>my_title</string>
-                        <string>my_criterion_property_list</string>
                         <string>my_string_index</string>
                         <string>my_int_index</string>
                         <string>my_test_method_id</string>
@@ -110,8 +119,7 @@
                     <key> <string>right</string> </key>
                     <value>
                       <list>
-                        <string>my_membership_criterion_base_category_list</string>
-                        <string>my_multimembership_criterion_base_category_list</string>
+                        <string>my_criterion_property_list</string>
                       </list>
                     </value>
                 </item>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml
index 2e2957e06d..07a607125c 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml
@@ -234,7 +234,7 @@
                 </item>
                 <item>
                     <key> <string>size</string> </key>
-                    <value> <int>5</int> </value>
+                    <value> <int>10</int> </value>
                 </item>
                 <item>
                     <key> <string>title</string> </key>
@@ -261,11 +261,8 @@
   <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>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index b90f3750fe..208e76adef 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-1164
\ No newline at end of file
+1165
\ No newline at end of file
-- 
2.30.9