svn commit: r487648 - in /incubator/ofbiz/trunk/applications/product: webapp/facility/WEB-INF/web.xml webapp/facility/facility/FacilityTabBar.ftl widget/facility/CommonScreens.xml widget/facility/FacilityScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r487648 - in /incubator/ofbiz/trunk/applications/product: webapp/facility/WEB-INF/web.xml webapp/facility/facility/FacilityTabBar.ftl widget/facility/CommonScreens.xml widget/facility/FacilityScreens.xml

jleroux@apache.org
Author: jleroux
Date: Fri Dec 15 12:26:40 2006
New Revision: 487648

URL: http://svn.apache.org/viewvc?view=rev&rev=487648
Log:
A patch from Anil K Patel " Parameterize CommonFacilityDecorator location in FaclityScreens" (https://issues.apache.org/jira/browse/OFBIZ-538).
   

Modified:
    incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/web.xml
    incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityTabBar.ftl
    incubator/ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml
    incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml

Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/web.xml?view=diff&rev=487648&r1=487647&r2=487648
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/web.xml (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/web.xml Fri Dec 15 12:26:40 2006
@@ -38,6 +38,11 @@
         <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
     </context-param>
     <context-param>
+        <param-name>commonFacilityDecoratorLocation</param-name>
+        <param-value>component://product/widget/facility/CommonScreens.xml</param-value>
+        <description>The location of the CommonFacilityDecorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
+    </context-param>
+    <context-param>
         <param-name>serviceReaderUrls</param-name>
         <param-value>/WEB-INF/services.xml</param-value>
         <description>Configuration File(s) For The Service Dispatcher</description>

Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityTabBar.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityTabBar.ftl?view=diff&rev=487648&r1=487647&r2=487648
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityTabBar.ftl (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityTabBar.ftl Fri Dec 15 12:26:40 2006
@@ -1,37 +0,0 @@
-<#--
-
-Copyright 2001-2006 The Apache Software Foundation
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations
-under the License.
--->
-<#assign unselectedClassName = "tabButton">
-<#assign selectedClassMap = {page.tabButtonItem?default("void") : "tabButtonSelected"}>
-
-<#if facilityId?has_content>
-  <div class='tabContainer'>
-    <a href="<@ofbizUrl>EditFacility?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.EditFacility?default(unselectedClassName)}">${uiLabelMap.ProductFacility}</a>
-    <a href="<@ofbizUrl>ViewContactMechs?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.ViewContactMechs?default(unselectedClassName)}">${uiLabelMap.PartyContactMechs}</a>
-    <a href="<@ofbizUrl>EditFacilityGroups?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.EditFacilityGroups?default(unselectedClassName)}">${uiLabelMap.ProductGroups}</a>
-    <a href="<@ofbizUrl>FindFacilityLocation?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.FindFacilityLocation?default(unselectedClassName)}">${uiLabelMap.ProductLocations}</a>
-    <a href="<@ofbizUrl>EditFacilityRoles?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.EditFacilityRoles?default(unselectedClassName)}">${uiLabelMap.PartyRoles}</a>
-    <a href="<@ofbizUrl>ViewFacilityInventoryByProduct?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.EditFacilityInventoryItems?default(unselectedClassName)}">${uiLabelMap.ProductInventory}</a>
-    <a href="<@ofbizUrl>ReceiveInventory?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.ReceiveInventory?default(unselectedClassName)}">${uiLabelMap.ProductInventoryReceive}</a>
-    <a href="<@ofbizUrl>FindFacilityTransfers?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.FindFacilityTransfers?default(unselectedClassName)}">${uiLabelMap.ProductInventoryXfers}</a>
-    <a href="<@ofbizUrl>ReceiveReturn?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.ReceiveReturn?default(unselectedClassName)}">${uiLabelMap.ProductReceiveReturn}</a>
-    <a href="<@ofbizUrl>PicklistOptions?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.PicklistOptions?default(unselectedClassName)}">${uiLabelMap.ProductPicking}</a>
-    <a href="<@ofbizUrl>PackOrder?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.PackOrder?default(unselectedClassName)}">${uiLabelMap.ProductPacking}</a>
-    <a href="<@ofbizUrl>Scheduling?facilityId=${facilityId}</@ofbizUrl>" class="${selectedClassMap.Scheduling?default(unselectedClassName)}">${uiLabelMap.ProductScheduling}</a>
-    <a href="<@ofbizUrl>FindShipment?destinationFacilityId=${facilityId}&amp;lookupFlag=Y</@ofbizUrl>" class="${selectedClassMap.FindShipment?default(unselectedClassName)}">${uiLabelMap.ProductIncomingShipments}</a>
-    <a href="<@ofbizUrl>FindShipment?originFacilityId=${facilityId}&amp;lookupFlag=Y</@ofbizUrl>" class="${selectedClassMap.FindShipment?default(unselectedClassName)}">${uiLabelMap.ProductOutgoingShipments}</a>
-  </div>
-</#if>

Modified: incubator/ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml?view=diff&rev=487648&r1=487647&r2=487648
==============================================================================
--- incubator/ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml (original)
+++ incubator/ofbiz/trunk/applications/product/widget/facility/CommonScreens.xml Fri Dec 15 12:26:40 2006
@@ -53,5 +53,47 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="CommonFacilityDecorator">
+        <section>
+            <actions>
+                <set field="facilityId" from-field="parameters.facilityId"/>
+                <entity-one entity-name="Facility" value-name="facility"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="FACILITY" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <section>
+                                    <condition>
+                                        <or>
+                                            <not><if-empty field-name="facility"/></not>
+                                            <not><if-empty field-name="displayWithNoFacility"/></not>
+                                        </or>
+                                    </condition>
+                                    <widgets>
+                                        <include-menu name="FacilityTabBar" location="component://product/widget/facility/Menus.xml"/>
+                                        <decorator-section-include name="body"/>
+                                    </widgets>
+                                    <fail-widgets>
+                                        <label style="head3">${uiLabelMap.ProductErrorFacilityIdNotFound}</label>
+                                    </fail-widgets>
+                                </section>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="head3">${uiLabelMap.ProductFacilityViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>
+
 

Modified: incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?view=diff&rev=487648&r1=487647&r2=487648
==============================================================================
--- incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Fri Dec 15 12:26:40 2006
@@ -36,48 +36,6 @@
         </section>
     </screen>
 
-    <screen name="CommonFacilityDecorator">
-        <section>
-            <actions>
-                <set field="facilityId" from-field="parameters.facilityId"/>
-                <entity-one entity-name="Facility" value-name="facility"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <section>
-                            <condition>
-                                <if-has-permission permission="FACILITY" action="_VIEW"/>
-                            </condition>
-                            <widgets>
-                                <section>
-                                    <condition>
-                                        <or>
-                                            <not><if-empty field-name="facility"/></not>
-                                            <not><if-empty field-name="displayWithNoFacility"/></not>
-                                        </or>
-                                    </condition>
-                                    <widgets>
-                                        <platform-specific>
-                                            <html><html-template location="component://product/webapp/facility/facility/FacilityTabBar.ftl"/></html>
-                                        </platform-specific>
-
-                                        <decorator-section-include name="body"/>
-                                    </widgets>
-                                    <fail-widgets>
-                                        <label style="head3">${uiLabelMap.ProductErrorFacilityIdNotFound}</label>
-                                    </fail-widgets>
-                                </section>
-                            </widgets>
-                            <fail-widgets>
-                                <label style="head3">${uiLabelMap.ProductFacilityViewPermissionError}</label>
-                            </fail-widgets>
-                        </section>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
 
     <screen name="EditFacility">
         <section>
@@ -94,7 +52,7 @@
                         <not><if-empty field-name="facility"/></not>
                     </condition>
                     <widgets>
-                        <decorator-screen name="CommonFacilityDecorator">
+                        <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                             <decorator-section name="body">
                                 <platform-specific>
                                     <html><html-template location="component://product/webapp/facility/facility/EditFacility.ftl"/></html>
@@ -125,7 +83,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/FindFacilityTransfers.ftl"/></html>
@@ -145,7 +103,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/FindFacilityLocation.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/FindFacilityLocation.ftl"/></html>
@@ -165,7 +123,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/EditFacilityLocation.ftl"/></html>
@@ -197,7 +155,7 @@
                 </entity-condition>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <container>
                             <label style="head1">${uiLabelMap.ProductInventoryItemsFor}</label>
@@ -221,7 +179,7 @@
             <actions>
                 <set field="titleProperty" value="PageTitleEditFacilityInventoryItems"/>
                 <set field="headerItem" value="facility"/>
-                <set field="tabButtonItem" value="EditFacilityInventoryItems"/>
+                <set field="tabButtonItem" value="ViewFacilityInventoryByProduct"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="50"/>
 
@@ -241,7 +199,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
 
                         <container>
@@ -385,7 +343,7 @@
                 <set field="manufacturerPartyId" from-field="parameters.manufacturerPartyId"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
 
                         <container>
@@ -414,7 +372,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/EditFacilityGroups.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/EditFacilityGroups.ftl"/></html>
@@ -434,7 +392,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/EditFacilityRoles.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/EditFacilityRoles.ftl"/></html>
@@ -454,7 +412,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/ViewContactMechs.ftl"/></html>
@@ -474,7 +432,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/EditContactMech.ftl"/></html>
@@ -495,7 +453,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/inventory/EditInventoryItem.ftl"/></html>
@@ -524,7 +482,7 @@
 
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <container>
                             <label style="head1">${uiLabelMap.ProductInventoryDetails} ${uiLabelMap.CommonFor} ${inventoryItemId}</label>
@@ -548,7 +506,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/inventory/TransferInventoryItem.ftl"/></html>
@@ -568,7 +526,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/inventory/receiveInventory.ftl"/></html>
@@ -588,7 +546,7 @@
                 <script location="component://product/webapp/facility/WEB-INF/actions/returns/receiveReturn.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/returns/receiveReturn.ftl"/></html>
@@ -622,7 +580,7 @@
                 </entity-condition>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/PicklistOptions.ftl"/></html>
@@ -658,7 +616,7 @@
                 </entity-condition>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/PicklistManage.ftl"/></html>
@@ -687,7 +645,7 @@
                 <set field="pflWarningMessageList" from-field="warningMessageList"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
                             <html><html-template location="component://product/webapp/facility/facility/PickMoveStock.ftl"/></html>
@@ -756,7 +714,7 @@
     <screen name="CommonFacilityScheduleDecorator">
         <section>
             <widgets>
-                <decorator-screen name="CommonFacilityDecorator">
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <widgets>