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:
@@ -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}"> </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}&mode=DOWN</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletDown}"> </a></li>
|
||||
</#if>
|
||||
<#if !firstInColumn>
|
||||
<li class="move-up"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=UP</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletUp}"> </a></li>
|
||||
</#if>
|
||||
<#if portlet_has_next>
|
||||
<li class="move-down"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=DOWN</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletDown}"> </a></li>
|
||||
</#if>
|
||||
<#if portalPageColumn_has_next>
|
||||
<li class="move-right"><a href="<@ofbizUrl>updatePortalPagePortlet?${portletUrlLink}&columnSeqId=${portalPageColumnList[portalPageColumn_index+1].columnSeqId}</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletRight}"> </a></li>
|
||||
</#if>
|
||||
@@ -80,7 +80,7 @@ under the License.
|
||||
<#if !firstInColumn>
|
||||
<li class="move-top"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=TOP</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletTop}"> </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}&mode=BOTTOM</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletBottom}"> </a></li>
|
||||
</#if>
|
||||
<#if (portalPages.size() > 1)>
|
||||
|
||||
Reference in New Issue
Block a user