correction on last commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@743199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2009-02-11 03:00:30 +00:00
parent 8e54581455
commit 541e72feb5
2 changed files with 20 additions and 14 deletions
@@ -162,25 +162,31 @@ under the License.
<first-from-list entry="ppEntry" list="ppList"/>
<set field="portalPagePortlet.sequenceNum" value="${ppEntry.sequenceNum + 1}" type="Long"/>
</if-compare>
<!-- update conflicting entries -->
<!-- update folowing entries in the same column if any -->
<if-compare field="parameters.mode" value="BOTTOM" operator="not-equals">
<if-compare field="parameters.mode" value="DOWN" operator="equals">
<entity-and entity-name="PortalPagePortlet" list="ppList">
<field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
<field-map field-name="sequenceNum" from-field="portalPagePortlet.sequenceNum"/>
<entity-condition entity-name="PortalPagePortlet" list="ppList">
<condition-list combine="and">
<condition-expr field-name="portalPageId" operator="equals" from-field="parameters.portalPageId"/>
<condition-expr field-name="columnSeqId" operator="equals" from-field="portalPagePortlet.columnSeqId"/>
<condition-expr field-name="sequenceNum" operator="greater-equals" from-field="portalPagePortlet.sequenceNum"/>
</condition-list>
<order-by field-name="+sequenceNum"/>
</entity-and>
</entity-condition>
<if-not-empty field="ppList">
<first-from-list entry="ppEntry" list="ppList"/>
<set field="ppEntry.sequenceNum" value="${portalPagePortlet.sequenceNum - 1}" type="Long"/>
<store-value value-field="ppEntry"/>
</if-not-empty>
<else>
<entity-and entity-name="PortalPagePortlet" list="ppList">
<field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
<field-map field-name="sequenceNum" from-field="portalPagePortlet.sequenceNum"/>
<else><!-- this for up and top -->
<entity-condition entity-name="PortalPagePortlet" list="ppList">
<condition-list combine="and">
<condition-expr field-name="portalPageId" operator="equals" from-field="parameters.portalPageId"/>
<condition-expr field-name="columnSeqId" operator="equals" from-field="portalPagePortlet.columnSeqId"/>
<condition-expr field-name="sequenceNum" operator="less-equals" from-field="portalPagePortlet.sequenceNum"/>
</condition-list>
<order-by field-name="-sequenceNum"/>
</entity-and>
</entity-condition>
<if-not-empty field="ppList">
<first-from-list entry="ppEntry" list="ppList"/>
<set field="ppEntry.sequenceNum" value="${portalPagePortlet.sequenceNum + 1}" type="Long"/>
@@ -65,12 +65,12 @@ under the License.
<li class="edit"><a href="<@ofbizUrl>EditPortlet?${portletUrlLink}</@ofbizUrl>" title="${uiLabelMap.CommonEditPortletAttributes}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
<#if portlet_has_next> <#-- TODO: this doesn't take into account that later items in the list might be in a different column -->
<li class="move-down"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&amp;mode=DOWN</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletDown}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
<#if !firstInColumn>
<li class="move-up"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&amp;mode=UP</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletUp}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
<#if portlet_has_next>
<li class="move-down"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&amp;mode=DOWN</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletDown}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
<#if portalPageColumn_has_next>
<li class="move-right"><a href="<@ofbizUrl>updatePortalPagePortlet?${portletUrlLink}&amp;columnSeqId=${portalPageColumnList[portalPageColumn_index+1].columnSeqId}</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletRight}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
@@ -80,7 +80,7 @@ under the License.
<#if !firstInColumn>
<li class="move-top"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&amp;mode=TOP</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletTop}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
<#if portlet_has_next> <#-- TODO: this doesn't take into account that later items in the list might be in a different column -->
<#if portlet_has_next>
<li class="move-bottom"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&amp;mode=BOTTOM</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletBottom}">&nbsp;&nbsp;&nbsp;</a></li>
</#if>
<#if (portalPages.size() > 1)>