[OFBiz] SVN: r6667 - in trunk/applications/order: config webapp/ordermgr/WEB-INF/actions/return webapp/ordermgr/return widget/ordermgr
sichen@svn.ofbiz.org
sichen at svn.ofbiz.org
Thu Feb 2 15:53:59 CST 2006
Author: sichen
Date: 2006-02-02 15:53:49 -0600 (Thu, 02 Feb 2006)
New Revision: 6667
Removed:
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/findReturn.bsh
trunk/applications/order/webapp/ordermgr/return/findReturn.ftl
Modified:
trunk/applications/order/config/OrderUiLabels.properties
trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml
trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml
Log:
Fixed find returns by changing find/list returns to form widget. OFBIZ-715
Modified: trunk/applications/order/config/OrderUiLabels.properties
===================================================================
--- trunk/applications/order/config/OrderUiLabels.properties 2006-02-02 21:36:30 UTC (rev 6666)
+++ trunk/applications/order/config/OrderUiLabels.properties 2006-02-02 21:53:49 UTC (rev 6667)
@@ -252,6 +252,7 @@
OrderReturnFound = Return(s) Found
OrderReturnFromAddress = Return From Address
OrderReturnFromParty = Return From Party
+OrderReturnDestinationFacility = Destination Facility
OrderReturnHeader = Return Header
OrderReturnId = Return ID
OrderReturnItems = Return Items
Deleted: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/findReturn.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/findReturn.bsh 2006-02-02 21:36:30 UTC (rev 6666)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/findReturn.bsh 2006-02-02 21:53:49 UTC (rev 6667)
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2001-2005 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author Andy Zeneski (jaz at ofbiz.org)
- *@version $Rev$
- *@since 3.0
- */
-
-import java.util.*;
-import java.sql.Timestamp;
-import org.ofbiz.base.util.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.entity.util.*;
-import org.ofbiz.entity.condition.*;
-import org.ofbiz.entity.transaction.*;
-
-module = "findReturn.bsh";
-
-delegator = request.getAttribute("delegator");
-
-// get the return statuses
-returnStatuses = delegator.findByAnd("StatusItem", UtilMisc.toMap("statusTypeId", "ORDER_RETURN_STTS"), UtilMisc.toList("sequenceId", "description"));
-context.put("returnStatuses", returnStatuses);
-
-// current selected status
-currentStatusId = request.getParameter("returnStatusId");
-if (currentStatusId != null && currentStatusId.length() > 0) {
- currentStatus = delegator.findByPrimaryKeyCache("StatusItem", UtilMisc.toMap("statusId", currentStatusId));
- context.put("currentStatus", currentStatus);
-}
-
-// create the fromDate for calendar
-fromCal = Calendar.getInstance();
-fromCal.setTime(new java.util.Date());
-//fromCal.set(Calendar.DAY_OF_WEEK, fromCal.getActualMinimum(Calendar.DAY_OF_WEEK));
-fromCal.set(Calendar.HOUR_OF_DAY, fromCal.getActualMinimum(Calendar.HOUR_OF_DAY));
-fromCal.set(Calendar.MINUTE, fromCal.getActualMinimum(Calendar.MINUTE));
-fromCal.set(Calendar.SECOND, fromCal.getActualMinimum(Calendar.SECOND));
-fromCal.set(Calendar.MILLISECOND, fromCal.getActualMinimum(Calendar.MILLISECOND));
-fromTs = new Timestamp(fromCal.getTimeInMillis());
-fromStr = fromTs.toString();
-fromStr = fromStr.substring(0, fromStr.indexOf('.'));
-context.put("fromDateStr", fromStr);
-
-// create the thruDate for calendar
-toCal = Calendar.getInstance();
-toCal.setTime(new java.util.Date());
-//toCal.set(Calendar.DAY_OF_WEEK, toCal.getActualMaximum(Calendar.DAY_OF_WEEK));
-toCal.set(Calendar.HOUR_OF_DAY, toCal.getActualMaximum(Calendar.HOUR_OF_DAY));
-toCal.set(Calendar.MINUTE, toCal.getActualMaximum(Calendar.MINUTE));
-toCal.set(Calendar.SECOND, toCal.getActualMaximum(Calendar.SECOND));
-toCal.set(Calendar.MILLISECOND, toCal.getActualMaximum(Calendar.MILLISECOND));
-toTs = new Timestamp(toCal.getTimeInMillis());
-toStr = toTs.toString();
-context.put("thruDateStr", toStr);
-
-// set the page parameters
-viewIndex = 1;
-try {
- viewIndex = Integer.valueOf((String) request.getParameter("VIEW_INDEX")).intValue();
-} catch (Exception e) {
- viewIndex = 1;
-}
-context.put("viewIndex", viewIndex);
-
-viewSize = 20;
-try {
- viewSize = Integer.valueOf((String) request.getParameter("VIEW_SIZE")).intValue();
-} catch (Exception e) {
- viewSize = 20;
-}
-context.put("viewSize", viewSize);
-
-// get the lookup flag
-lookupFlag = request.getParameter("lookupFlag");
-
-// blank param list
-paramList = "";
-
-returnHeaderList = null;
-returnHeaderListSize = 0;
-lowIndex = 0;
-highIndex = 0;
-
-if (lookupFlag != null) {
- showAll = request.getParameter("showAll") != null ? request.getParameter("showAll") : "N";
- paramList = paramList + "&lookupFlag=" + lookupFlag + "&showAll=" + showAll;
- locale = UtilHttp.getLocale(request);
- uiLabelMap = UtilProperties.getResourceBundleMap("OrderErrorUiLabels", locale);
-
- // the lookup entity name
- entityName = "ReturnHeader";
- lookupErrorMessage = null;
-
- // define the main condition & expression list
- andExprs = new ArrayList();
- mainCond = null;
-
- // check for a returnId (happens in some browsers)
- returnId = request.getParameter("returnId");
- if (returnId != null && returnId.length() > 0) {
- paramList = paramList + "&returnId=" + returnId;
- andExprs.add(new EntityExpr("returnId", EntityOperator.EQUALS, returnId));
- }
-
- // find the returns for party
- partyId = request.getParameter("partyId");
- userLoginId = request.getParameter("userLoginId");
- if (userLoginId != null && userLoginId.length() > 0) {
- requestedUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", userLoginId));
- if (requestedUserLogin != null) {
- partyId = requestedUserLogin.getString("partyId");
- } else {
- lookupErrorMessage = uiLabelMap.get("OrderNoUserLoginFoundForUserLoginId") + userLoginId;
- }
- }
-
- if (partyId != null && partyId.length() > 0) {
- paramList = paramList + "&partyId=" + partyId;
- andExprs.add(new EntityExpr("fromPartyId", EntityOperator.EQUALS, partyId));
- }
-
- // filter on billing account
- billAcct = request.getParameter("billingAccountId");
- if (billAcct != null && billAcct.length() > 0) {
- paramList = paramList + "&billingAccountId=" + billAcct;
- andExprs.add(new EntityExpr("billingAccountId", EntityOperator.EQUALS, billAcct));
- }
-
- // filter on status
- returnStatus = request.getParameter("returnStatusId");
- if (!"ANY".equals(returnStatus)) {
- paramList = paramList + "&returnStatusId=" + returnStatus;
- andExprs.add(new EntityExpr("statusId", EntityOperator.EQUALS, returnStatus));
- }
-
- // filter on date
- minDate = request.getParameter("minDate");
- if (minDate != null && minDate.length() > 8) {
- minDate = minDate.trim();
- if (minDate.length() < 14) minDate = minDate + " " + "00:00:00.000";
- paramList = paramList + "&minDate=" + minDate;
- andExprs.add(new EntityExpr("entryDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(minDate, "Timestamp", null, null)));
- }
- maxDate = request.getParameter("maxDate");
- if (maxDate != null && maxDate.length() > 8) {
- maxDate = maxDate.trim();
- if (maxDate.length() < 14) maxDate = maxDate + " " + "23:59:59.999";
- paramList = paramList + "&maxDate=" + maxDate;
- andExprs.add(new EntityExpr("entryDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
- }
-
- Debug.log("Find return exprs : " + andExprs);
-
- // build the main condition
- if (andExprs.size() > 0 || showAll.equalsIgnoreCase("Y")) mainCond = new EntityConditionList(andExprs, EntityOperator.AND);
-
- // do the lookup
- if (lookupErrorMessage == null && mainCond != null) {
- // sorting by return entry date newest first
- List orderBy = UtilMisc.toList("-entryDate");
-
- // set distinct on so we only get one row per order
- EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
-
- boolean beganTransaction = false;
- try {
- beganTransaction = TransactionUtil.begin();
-
- // using list iterator
- EntityListIterator orli = delegator.findListIteratorByCondition(entityName, mainCond, null, null, orderBy, findOpts);
-
- // get the indexes for the partial list
- lowIndex = (((viewIndex - 1) * viewSize) + 1);
- highIndex = viewIndex * viewSize;
-
- // attempt to get the full size
- orli.last();
- returnHeaderListSize = orli.currentIndex();
- if (highIndex > returnHeaderListSize) {
- highIndex = returnHeaderListSize;
- }
-
- // get the partial list for this page
- orli.first();
- if (returnHeaderListSize > 0) {
- returnHeaderList = orli.getPartialList(lowIndex, viewSize);
- } else {
- returnHeaderList = new ArrayList();
- }
-
- // close the list iterator
- orli.close();
- } catch (GenericEntityException e) {
- String errMsg = "Failure in operation, rolling back transaction";
- Debug.logError(e, errMsg, module);
- try {
- // only rollback the transaction if we started one...
- TransactionUtil.rollback(beganTransaction, errMsg, e);
- } catch (GenericEntityException e2) {
- Debug.logError(e2, "Could not rollback transaction: " + e2.toString(), module);
- }
- // after rolling back, rethrow the exception
- throw e;
- } finally {
- // only commit the transaction if we started one... this will throw an exception if it fails
- TransactionUtil.commit(beganTransaction);
- }
- } else {
- returnHeaderList = new ArrayList();
- returnHeaderListSize = 0;
- }
-
- context.put("returnHeaderList", returnHeaderList);
- context.put("returnHeaderListSize", returnHeaderListSize);
-
- if (lookupErrorMessage != null) {
- context.put("lookupErrorMessage", lookupErrorMessage);
- }
-}
-
-context.put("paramList", paramList);
-context.put("highIndex", highIndex);
-context.put("lowIndex", lowIndex);
Modified: trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml
===================================================================
--- trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml 2006-02-02 21:36:30 UTC (rev 6666)
+++ trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml 2006-02-02 21:53:49 UTC (rev 6667)
@@ -65,4 +65,56 @@
<field name="orderItemSeqId"><hidden/></field>
<field name="statusId"><ignored/></field>
</form>
+
+ <form name="FindReturns" type="single" target="findreturn" title=""
+ default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
+ <field name="returnId" title="${uiLabelMap.OrderReturnId}"><text-find/></field>
+ <field name="fromPartyId" title="${uiLabelMap.OrderReturnFromParty}">
+ <lookup target-form-name="LookupPartyName"/>
+ </field>
+ <field name="billingAccountId" title="${uiLabelMap.AccountingBillingAccount}">
+ <text-find/>
+ </field>
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
+ <drop-down allow-empty="true">
+ <entity-options entity-name="StatusItem" description="${description}">
+ <entity-constraint name="statusTypeId" operator="equals" value="ORDER_RETURN_STTS"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="entryDate" title="${uiLabelMap.OrderEntryDate}">
+ <date-find/>
+ </field>
+
+ <field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit">
+ <submit button-type="button"/>
+ </field>
+ </form>
+
+ <form name="ListReturns" type="list" target="findreturn" title=""
+ list-iterator-name="listIt" paginate-target="findreturn"
+ default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
+ <actions>
+ <service service-name="performFind" result-map-name="result" result-map-list-iterator-name="listIt">
+ <field-map field-name="inputFields" env-name="requestParameters"/>
+ <field-map field-name="entityName" value="ReturnHeader"/>
+ </service>
+ </actions>
+ <field name="returnId" widget-style="buttontext" title="${uiLabelMap.OrderReturnId}">
+ <hyperlink description="${returnId}" target="returnMain?returnId=${returnId}"/>
+ </field>
+ <field name="entryDate" title="${uiLabelMap.OrderEntryDate}">
+ <display/>
+ </field>
+ <field name="fromPartyId" widget-style="buttontext" title="${uiLabelMap.OrderReturnFromParty}">
+ <hyperlink target-type="inter-app" description="${fromPartyId}" target="/partymgr/control/viewprofile?partyId=${fromPartyId}${externalKeyParam}"/>
+ </field>
+ <field name="destinationFacilityId" widget-style="buttontext" title="${uiLabelMap.OrderReturnDestinationFacility}">
+ <hyperlink target-type="inter-app" description="${destinationFacilityId}" target="/facility/control/EditFacility?facilityId=${destinationFacilityId}${externalKeyParam}"/>
+ </field>
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
+ <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
+ </field>
+ </form>
+
</forms>
\ No newline at end of file
Deleted: trunk/applications/order/webapp/ordermgr/return/findReturn.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/return/findReturn.ftl 2006-02-02 21:36:30 UTC (rev 6666)
+++ trunk/applications/order/webapp/ordermgr/return/findReturn.ftl 2006-02-02 21:53:49 UTC (rev 6667)
@@ -1,246 +0,0 @@
-<#--
- * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
- * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- *@author Andy Zeneski (jaz at ofbiz.org)
- *@author Jean-Luc.Malet at nereide.biz (migration to uiLabelMap)
- *@version $Rev$
- *@since 2.2
--->
-
-<script language="JavaScript" type="text/javascript">
-<!-- //
-function lookupReturn(click) {
- returnIdValue = document.lookupreturn.returnId.value;
- if (returnIdValue.length > 1) {
- document.lookupreturn.action = "<@ofbizUrl>returnMain</@ofbizUrl>";
- } else {
- document.lookupreturn.action = "<@ofbizUrl>findreturn</@ofbizUrl>";
- }
-
- if (click) {
- document.lookupreturn.submit();
- }
- return true;
-}
-// -->
-</script>
-
-<#if security.hasEntityPermission("ORDERMGR", "_VIEW", session)>
- <form method='post' name="lookupreturn" action="<@ofbizUrl>findreturn</@ofbizUrl>" onsubmit="javascript:lookupReturn();">
- <input type='hidden' name='lookupFlag' value='A'>
- <input type='hidden' name='hideFields' value='Y'>
- <table border='0' width='100%' cellspacing='0' cellpadding='0' class='boxoutside'>
- <tr>
- <td width='100%'>
- <table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxtop'>
- <tr>
- <td><div class='boxhead'>${uiLabelMap.OrderFindReturn}</div></td>
- <td align='right'>
- <div class="tabletext">
- <#if requestParameters.hideFields?default("N") == "Y">
- <a href="<@ofbizUrl>findreturn?hideFields=N${paramList}</@ofbizUrl>" class="submenutextright">${uiLabelMap.CommonShowLookupFields}</a>
- <#else>
- <#if returnHeaderList?exists><a href="<@ofbizUrl>findreturn?hideFields=Y${paramList}</@ofbizUrl>" class="submenutext">${uiLabelMap.CommonHideFields}</a></#if>
- <a href="#" onclick="javascript:lookupReturn(true);" class="submenutext">${uiLabelMap.OrderLookupReturn}</a><a href="<@ofbizUrl>returnMain</@ofbizUrl>" class="submenutextright">${uiLabelMap.OrderCreateReturn}</a>
- </#if>
- </div>
- </td>
- </tr>
- </table>
- <#if requestParameters.hideFields?default("N") != "Y">
- <table width='100%' border='0' cellspacing='0' cellpadding='2' class='boxbottom'>
- <tr>
- <td align='center' width='100%'>
- <table border='0' cellspacing='0' cellpadding='2'>
- <tr>
- <td width='25%' align='right'><div class='tableheadtext'>${uiLabelMap.OrderReturnId}</div></td>
- <td width='5%'> </td>
- <td><input type='text' class='inputBox' name='returnId'></td>
- </tr>
- <tr>
- <td width='25%' align='right'><div class='tableheadtext'>${uiLabelMap.PartyPartyId}</div></td>
- <td width='5%'> </td>
- <td><input type='text' class='inputBox' name='partyId' value='${requestParameters.partyId?if_exists}'></td>
- </tr>
- <tr>
- <td width='25%' align='right'><div class='tableheadtext'>${uiLabelMap.PartyUserLoginId}</div></td>
- <td width='5%'> </td>
- <td><input type='text' class='inputBox' name='userLoginId' value='${requestParameters.userLoginId?if_exists}'></td>
- </tr>
- <tr>
- <td width='25%' align='right'><div class='tableheadtext'>${uiLabelMap.AccountingBillingAccount}</div>
- <td width='5%'> </td>
- <td><input type='text' class='inputBox' name='billingAccountId' value='${requestParameters.billingAccountId?if_exists}'></td>
- </tr>
- <tr>
- <td width='25%' align='right'><div class='tableheadtext'>${uiLabelMap.CommonStatus}</div></td>
- <td width='5%'> </td>
- <td>
- <select name='returnStatusId' class='selectBox'>
- <#if currentStatus?has_content>
- <option value="${currentStatus.statusId}">${currentStatus.description}</option>
- <option value="${currentStatus.statusId}">---</option>
- </#if>
- <option value="ANY">${uiLabelMap.CommonAnyReturnStatus}</option>
- <#list returnStatuses as returnStatus>
- <option value="${returnStatus.statusId}">${returnStatus.description}</option>
- </#list>
- </select>
- </td>
- </tr>
- <tr>
- <td width='25%' align='right'>
- <div class='tableheadtext'>${uiLabelMap.CommonDateFilter}</div>
- </td>
- <td width='5%'> </td>
- <td>
- <table border='0' cellspacing='0' cellpadding='0'>
- <tr>
- <td nowrap>
- <input type='text' size='25' class='inputBox' name='minDate' value='${requestParameters.minDate?if_exists}'>
- <a href="javascript:call_cal(document.lookupreturn.minDate, '${fromDateStr}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a>
- <span class='tabletext'>${uiLabelMap.CommonFrom}</span>
- </td>
- </tr>
- <tr>
- <td nowrap>
- <input type='text' size='25' class='inputBox' name='maxDate' value='${requestParameters.maxDate?if_exists}'>
- <a href="javascript:call_cal(document.lookupreturn.maxDate, '${thruDateStr}');"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a>
- <span class='tabletext'>${uiLabelMap.CommonThru}</span>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr><td colspan="3"><hr class="sepbar"></td></tr>
- <tr>
- <td width='25%' align='right'> </td>
- <td width='5%'> </td>
- <td>
- <div class="tabletext">
- <input type='checkbox' name='showAll' value='Y' onclick="javascript:lookupReturn(true);"> ${uiLabelMap.CommonShowAllRecords}
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </#if>
- </td>
- </tr>
- </table>
- <input type="image" src="<@ofbizContentUrl>/images/spacer.gif</@ofbizContentUrl>" onClick="javascript:document.lookupreturn.submit();">
- </form>
-<#if requestParameters.hideFields?default("N") != "Y">
- <script language="JavaScript" type="text/javascript">
- <!--//
- document.lookupreturn.returnId.focus();
- //-->
- </script>
-</#if>
- <#if returnHeaderList?exists>
- <br/>
- <table border="0" width='100%' cellspacing='0' cellpadding='0' class='boxoutside'>
- <tr>
- <td width='100%'>
- <table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxtop'>
- <tr>
- <td width="50%"><div class="boxhead">${uiLabelMap.OrderReturnFound}</div></td>
- <td width="50%">
- <div class="boxhead" align="right">
- <#if (returnHeaderListSize > 0)>
- <#if (viewIndex > 1)>
- <a href="<@ofbizUrl>findreturn?VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndex-1}&hideFields=${requestParameters.hideFields?default("N")}${paramList}</@ofbizUrl>" class="submenutext">${uiLabelMap.CommonPrevious}</a>
- <#else>
- <span class="submenutextdisabled">${uiLabelMap.CommonPrevious}</span>
- </#if>
- <#if (returnHeaderListSize > 0)>
- <span class="submenutextinfo">${lowIndex} - ${highIndex} of ${returnHeaderListSize}</span>
- </#if>
- <#if (returnHeaderListSize > highIndex)>
- <a href="<@ofbizUrl>findreturn?VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndex+1}&hideFields=${requestParameters.hideFields?default("N")}${paramList}</@ofbizUrl>" class="submenutextright">Next</a>
- <#else>
- <span class="submenutextrightdisabled">${uiLabelMap.CommonNext}</span>
- </#if>
- </#if>
-
- </div>
- </td>
- </tr>
- </table>
-
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><div class="tableheadtext">${uiLabelMap.OrderOrderReturn} #</div></td>
- <td><div class="tableheadtext">${uiLabelMap.OrderEntryDate}</div></td>
- <td><div class="tableheadtext">${uiLabelMap.PartyParty}</div></td>
- <td><div class="tableheadtext">${uiLabelMap.FacilityFacility}</div></td>
- <td><div class="tableheadtext">${uiLabelMap.CommonStatus}</div></td>
- <td> </td>
- </tr>
- <tr><td colspan="6"><hr class="sepbar"></td></tr>
- <#if returnHeaderList?has_content>
- <#assign rowClass = "viewManyTR2">
- <#list returnHeaderList as returnHeader>
- <#assign statusItem = returnHeader.getRelatedOne("StatusItem")>
- <#if returnHeader.destinationFacilityId?exists>
- <#assign facility = returnHeader.getRelatedOne("Facility")>
- </#if>
- <tr class='${rowClass}'>
- <td><a href="<@ofbizUrl>returnMain?returnId=${returnHeader.returnId}</@ofbizUrl>" class="buttontext">${returnHeader.returnId}</a></td>
- <td><div class="tabletext">${returnHeader.entryDate.toString()}</div></td>
- <td>
- <#if returnHeader.fromPartyId?exists>
- <a href="/partymgr/control/viewprofile?partyId=${returnHeader.fromPartyId}${externalKeyParam}" class='buttontext'>${returnHeader.fromPartyId}</a>
- <#else>
- <span class="tabletext">N/A</span>
- </#if>
- </td>
- <td><div class="tabletext"><#if facility?exists>${facility.facilityName?default(facility.facilityId)}<#else>${uiLabelMap.CommonNone}</#if></div></td>
- <td><div class="tabletext">${statusItem.get("description",locale)}</div></td>
- <td align="center"><a href="<@ofbizUrl>returnMain?returnId=${returnHeader.returnId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonView}</a>
- </tr>
- <#-- toggle the row color -->
- <#if rowClass == "viewManyTR2">
- <#assign rowClass = "viewManyTR1">
- <#else>
- <#assign rowClass = "viewManyTR2">
- </#if>
- </#list>
- <#else>
- <tr>
- <td colspan='5'><div class='head3'>${uiLabelMap.OrderNoReturnFound}</div></td>
- </tr>
- </#if>
- <#if lookupErrorMessage?exists>
- <tr>
- <td colspan='5'><div class="head3">${lookupErrorMessage}</div></td>
- </tr>
- </#if>
- </table>
- </td>
- </tr>
- </table>
- </#if>
-<#else>
- <h3>You do not have permission to view this page. ("ORDERMGR_VIEW" or "ORDERMGR_ADMIN" needed)</h3>
-</#if>
Modified: trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml
===================================================================
--- trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml 2006-02-02 21:36:30 UTC (rev 6666)
+++ trunk/applications/order/widget/ordermgr/OrderReturnScreens.xml 2006-02-02 21:53:49 UTC (rev 6667)
@@ -41,18 +41,22 @@
<screen name="OrderFindReturn">
<section>
<actions>
- <set field="title" value="Return"/>
+ <set field="title" value="Find Return"/>
<set field="headerItem" value="return"/>
- <script location="component://order/webapp/ordermgr/WEB-INF/actions/return/findReturn.bsh"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
</actions>
<widgets>
<decorator-screen name="CommonOrderReturnDecorator">
<decorator-section name="body">
- <platform-specific>
- <html>
- <html-template location="component://order/webapp/ordermgr/return/findReturn.ftl"/>
- </html>
- </platform-specific>
+ <container>
+ <label style="head1">${uiLabelMap.OrderOrderReturns}</label>
+ </container>
+ <container>
+ <link style="buttontext" target="returnMain" text="${uiLabelMap.OrderCreateNewReturn}"></link>
+ </container>
+ <include-form name="FindReturns" location="component://order/webapp/ordermgr/return/ReturnForms.xml"/>
+ <include-form name="ListReturns" location="component://order/webapp/ordermgr/return/ReturnForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
More information about the Svn
mailing list