Author: pranayp
Date: Sat Jun 4 11:20:19 2016 New Revision: 1746809 URL: http://svn.apache.org/viewvc?rev=1746809&view=rev Log: [OFBIZ-7170] Improvements in 'Find Shipment' screen to make it consistent with other find screens. - Moved Create and Find Shipment button in screenlet-body - Use Like operator for 'Shipment Id' search constraint. Thanks Chandan Khandelwal for suggesting this improvement and Vaibhav Jain for providing the patch. Modified: ofbiz/trunk/applications/product/template/shipment/FindShipment.ftl ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy Modified: ofbiz/trunk/applications/product/template/shipment/FindShipment.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/template/shipment/FindShipment.ftl?rev=1746809&r1=1746808&r2=1746809&view=diff ============================================================================== --- ofbiz/trunk/applications/product/template/shipment/FindShipment.ftl (original) +++ ofbiz/trunk/applications/product/template/shipment/FindShipment.ftl Sat Jun 4 11:20:19 2016 @@ -32,27 +32,28 @@ function lookupShipments() { <div id="findOrders" class="screenlet"> <div class="screenlet-title-bar"> <ul> - <li class="h3">${uiLabelMap.ProductFindShipmentTitle}</li> - <#if requestParameters.facilityId?has_content> - <li><a href="<@ofbizUrl>quickShipOrder?facilityId=${requestParameters.facilityId}</@ofbizUrl>">${uiLabelMap.ProductQuickShipOrder}</a></li> - </#if> - <li><a href="<@ofbizUrl>EditShipment</@ofbizUrl>">${uiLabelMap.ProductNewShipment}</a></li> - <li><a href="javascript:lookupShipments();">${uiLabelMap.ProductFindShipment}</a></li> + <li class="h3">${uiLabelMap.ProductFindShipmentTitle}</li> </ul> <br class="clear"/> </div> <div class="screenlet-body"> - <form method="post" name="lookupShipmentForm" action="<@ofbizUrl>FindShipment</@ofbizUrl>"> + <#if requestParameters.facilityId?has_content> + <div class="button-bar"> + <a href="<@ofbizUrl>quickShipOrder?facilityId=${requestParameters.facilityId}</@ofbizUrl>">${uiLabelMap.ProductQuickShipOrder}</a> + </div> + </#if> + <div class="button-bar"> + <a class="buttontext" href="<@ofbizUrl>EditShipment</@ofbizUrl>">${uiLabelMap.ProductNewShipment}</a> + </div> + <form method="post" name="lookupShipmentForm" action="javascript:lookupShipments();"> <input type="hidden" name="lookupFlag" value="Y" /> <table cellspacing="0" cellpadding="2" class="basic-table"> <tr> <td width="25%" align="right" class="label">${uiLabelMap.ProductShipmentId}</td> - <td width="5%"> </td> <td><input type="text" name="shipmentId" value="${shipmentId!}" /></td> </tr> <tr> <td width="25%" align="right" class="label">${uiLabelMap.ProductShipmentType}</td> - <td width="5%"> </td> <td> <select name="shipmentTypeId"> <#if currentShipmentType?has_content> @@ -68,7 +69,6 @@ function lookupShipments() { </tr> <tr> <td width="25%" align="right" class="label">${uiLabelMap.ProductOriginFacility}</td> - <td width="5%"> </td> <td> <select name="originFacilityId"> <#if currentOriginFacility?has_content> @@ -84,7 +84,6 @@ function lookupShipments() { </tr> <tr> <td width="25%" align="right" class="label">${uiLabelMap.ProductDestinationFacility}</td> - <td width="5%"> </td> <td> <select name="destinationFacilityId"> <#if currentDestinationFacility?has_content> @@ -100,7 +99,6 @@ function lookupShipments() { </tr> <tr> <td width="25%" align="right" class="label">${uiLabelMap.CommonStatus}</td> - <td width="5%"> </td> <td> <select name="statusId"> <#if currentStatus?has_content> @@ -128,7 +126,6 @@ function lookupShipments() { </tr> <tr> <td width="25%" align="right" class="label">${uiLabelMap.ProductDateFilter}</td> - <td width="5%"> </td> <td> <table cellspacing="0" class="basic-table"> <tr> @@ -146,6 +143,12 @@ function lookupShipments() { </table> </td> </tr> + <tr> + <td class="label"></td> + <td colspan="4"> + <input type="submit" value="Find"> + </td> + </tr> </table> </form> </div> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy?rev=1746809&r1=1746808&r2=1746809&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy Sat Jun 4 11:20:19 2016 @@ -52,7 +52,7 @@ if (UtilValidate.isNotEmpty(statusId) && orderReturnValue = true; } if (parameters.shipmentId) { - findShipmentExprs.add(EntityCondition.makeCondition("shipmentId", EntityOperator.EQUALS, parameters.shipmentId)); + findShipmentExprs.add(EntityCondition.makeCondition("shipmentId", EntityOperator.LIKE, "%"+parameters.shipmentId+"%")); } if (shipmentTypeId) { @@ -241,4 +241,4 @@ toCal.set(Calendar.SECOND, toCal.getActu toCal.set(Calendar.MILLISECOND, toCal.getActualMaximum(Calendar.MILLISECOND)); toTs = new Timestamp(toCal.getTimeInMillis()); toStr = toTs.toString(); -context.thruDateStr = toStr; \ No newline at end of file +context.thruDateStr = toStr; |
Free forum by Nabble | Edit this page |