Author: jleroux
Date: Sun Dec 18 20:24:48 2011 New Revision: 1220527 URL: http://svn.apache.org/viewvc?rev=1220527&view=rev Log: A patch from andrewzn "Help screen/navigation do not take into account content expiration" https://issues.apache.org/jira/browse/OFBIZ-4626 Help screens use entity-and to retrieve ContentAssoc without fromDate/truDate conditions while help content expiration still may be useful. Modified: ofbiz/trunk/framework/common/widget/HelpScreens.xml Modified: ofbiz/trunk/framework/common/widget/HelpScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/HelpScreens.xml?rev=1220527&r1=1220526&r2=1220527&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/HelpScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/HelpScreens.xml Sun Dec 18 20:24:48 2011 @@ -76,10 +76,17 @@ under the License. <if-empty field="parameters.portalPageId"/> </condition> <actions> - <entity-and entity-name="ContentAssoc" list="contentAssocs"> - <field-map field-name="mapKey" from-field="parameters.helpTopic"/> + <entity-condition entity-name="ContentAssoc" list="contentAssocs"> + <condition-list> + <condition-expr field-name="mapKey" from-field="parameters.helpTopic"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> + </condition-list> + </condition-list> <order-by field-name="sequenceNum"/> - </entity-and> + </entity-condition> <set field="contentId" from-field="contentAssocs[0].contentIdTo"/> <entity-one entity-name="Content" value-field="content"/> </actions> @@ -168,11 +175,18 @@ under the License. <section> <actions> <set field="titleProperty" value="PageTitleNavigateContent"/> - <entity-and entity-name="ContentAssoc" list="contentAssoc"> - <field-map field-name="contentId" value="HELP_ROOT"/> - <field-map field-name="contentAssocTypeId" value="TREE_CHILD"/> + <entity-condition entity-name="ContentAssoc" list="contentAssoc"> + <condition-list> + <condition-expr field-name="contentId" value="HELP_ROOT"/> + <condition-expr field-name="contentAssocTypeId" value="TREE_CHILD"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> + </condition-list> + </condition-list> <order-by field-name="sequenceNum"/> - </entity-and> + </entity-condition> <set field="contentId" from-field="parameters.contentId" default-value="HELP_ROOT"/> </actions> <widgets> |
Free forum by Nabble | Edit this page |