[Erp5-report] r9464 - in /erp5/trunk/bt5/erp5_web: SkinTemplateItem/portal_skins/erp5_web/ bt/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Aug 25 15:38:33 CEST 2006
Author: kevin
Date: Fri Aug 25 15:38:31 2006
New Revision: 9464
URL: http://svn.erp5.org?rev=9464&view=rev
Log:
(Stefan) Membership and Multimembership can be used simultaneously. The corresponding
base categories may not overlap. The results of both memberships are unified.
Modified:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValueList.xml
erp5/trunk/bt5/erp5_web/bt/change_log
erp5/trunk/bt5/erp5_web/bt/revision
erp5/trunk/bt5/erp5_web/bt/version
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValueList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValueList.xml?rev=9464&r1=9463&r2=9464&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValueList.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValueList.xml Fri Aug 25 15:38:31 2006
@@ -93,6 +93,8 @@
# This script is intended to be overriden by creating an instance \n
# in each section if necessary\n
\n
+from string import split\n
+\n
portal_catalog = container.portal_catalog\n
\n
# First find the web section we are in\n
@@ -102,15 +104,27 @@
\n
# Then find the publication categories referenced by the web section\n
section_categories = current_node.getMembershipCriterionCategoryList()\n
-\n
+section_base_categories_conjunctive = current_node.getMembershipCriterionBaseCategoryList()\n
+section_base_categories_disjunctive = current_node.getMultimembershipCriterionBaseCategoryList()\n
\n
def checkMember(x):\n
the_categories = x.getCategoriesList()\n
if the_categories:\n
for the_category in the_categories:\n
if the_category in section_categories:\n
- if x.getValidationState()==\'published\':\n
- return x\n
+ if split(the_category,"/")[0] in section_base_categories_disjunctive:\n
+ if x.getValidationState()==\'published\':\n
+ return True # one disjunctive category was found\n
+ checker=False\n
+ for one_category in section_categories:\n
+ if split(one_category,"/")[0] in section_base_categories_conjunctive:\n
+ if one_category not in the_categories:\n
+ return False # one conjunctive category was not found\n
+ else:\n
+ checker=True\n
+ return checker # loop ends, so all conjunctive categories were found - If there were any.\n
+ else:\n
+ return False\n
\n
# get all web pages and check if their publication category is in the category list of the web section\n
# reference_list = map(lambda x:x.getReference(), context.getSourceValueList(portal_type="Web Page"))\n
@@ -233,12 +247,16 @@
<value>
<tuple>
<string>kw</string>
+ <string>string</string>
+ <string>split</string>
<string>_getattr_</string>
<string>container</string>
<string>portal_catalog</string>
<string>context</string>
<string>current_node</string>
<string>section_categories</string>
+ <string>section_base_categories_conjunctive</string>
+ <string>section_base_categories_disjunctive</string>
<string>checkMember</string>
<string>map</string>
<string>reference_list</string>
Modified: erp5/trunk/bt5/erp5_web/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/change_log?rev=9464&r1=9463&r2=9464&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_web/bt/change_log Fri Aug 25 15:38:31 2006
@@ -1,3 +1,7 @@
+2006-08-25 Stefan
+* Membership and Multimembership can be used simultaneously. The corresponding
+base categories may not overlap. The results of both memberships are unified.
+
2006-08-25 Kevin
* Move all scripts and forms in uncertain state to erp5_web_old skin folder.
* Move all specific scripts and forms from erp5_web skin folder to brand new web widget libray folder.
Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=9464&r1=9463&r2=9464&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision Fri Aug 25 15:38:31 2006
@@ -1,1 +1,1 @@
-233
+237
Modified: erp5/trunk/bt5/erp5_web/bt/version
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/version?rev=9464&r1=9463&r2=9464&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/version (original)
+++ erp5/trunk/bt5/erp5_web/bt/version Fri Aug 25 15:38:31 2006
@@ -1,1 +1,1 @@
-0.3.7
+0.3.8
More information about the Erp5-report
mailing list