svn commit: r718168 - in /ofbiz/trunk/applications/order: webapp/ordermgr/includes/ webapp/ordermgr/quote/ webapp/ordermgr/request/ webapp/ordermgr/requirement/ widget/ordermgr/

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

svn commit: r718168 - in /ofbiz/trunk/applications/order: webapp/ordermgr/includes/ webapp/ordermgr/quote/ webapp/ordermgr/request/ webapp/ordermgr/requirement/ widget/ordermgr/

ashish-18
Author: ashish
Date: Sun Nov 16 19:53:47 2008
New Revision: 718168

URL: http://svn.apache.org/viewvc?rev=718168&view=rev
Log:
Applied patch from Bruno Busco "Replacing FTL TabBar with menu widgets in Ordermgr" https://issues.apache.org/jira/browse/OFBIZ-2049.

PS :- Anybody of you having framework access can commit the changes from CommonMenus.xml file ?

Thanks Bruno Busco for your contribution.

Added:
    ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml   (with props)
Removed:
    ofbiz/trunk/applications/order/webapp/ordermgr/includes/appheader.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteTabBar.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestTabBar.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementTabBar.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementsTabBar.ftl
Modified:
    ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml
    ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml
    ofbiz/trunk/applications/order/widget/ordermgr/RequirementScreens.xml

Modified: ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml?rev=718168&r1=718167&r2=718168&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/CommonScreens.xml Sun Nov 16 19:53:47 2008
@@ -43,7 +43,8 @@
                 <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
                 <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
                 <set field="activeApp" value="ordermgr" global="true"/>
-                <set field="appheaderTemplate" value="component://order/webapp/ordermgr/includes/appheader.ftl" global="true"/>
+                <set field="applicationMenuName" value="OrderAppBar" global="true"/>
+                <set field="applicationMenuLocation" value="component://order/widget/ordermgr/Menus.xml" global="true"/>
 
                 <!-- globally parametrize the link to a customer's detail information, to help with cases when such details are accessed via external application. -->
                 <set field="customerDetailLink" value="/partymgr/control/viewprofile?partyId=" global="true"/>
@@ -96,9 +97,14 @@
                                 <if-has-permission permission="ORDERMGR" action="_VIEW"/>
                             </condition>
                             <widgets>
-                                <platform-specific>
-                                    <html><html-template location="component://order/webapp/ordermgr/quote/QuoteTabBar.ftl"/></html>
-                                </platform-specific>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field-name="quote"/></not>
+                                    </condition>
+                                    <widgets>
+                                        <include-menu name="QuoteTabBar" location="component://order/widget/ordermgr/Menus.xml"/>
+                                    </widgets>
+                                </section>
                                 <container>
                                     <label style="h1">[${uiLabelMap.CommonId}:${quote.quoteId}] ${quote.description}</label>
                                 </container>
@@ -127,9 +133,14 @@
                                 <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
                             </condition>
                             <widgets>
-                                <platform-specific>
-                                    <html><html-template location="component://order/webapp/ordermgr/quote/QuoteTabBar.ftl"/></html>
-                                </platform-specific>
+                                <section>
+                                    <condition>
+                                        <not><if-empty field-name="quote"/></not>
+                                    </condition>
+                                    <widgets>
+                                        <include-menu name="QuoteTabBar" location="component://order/widget/ordermgr/Menus.xml"/>
+                                    </widgets>
+                                </section>
                                 <container>
                                     <label style="h1">[${uiLabelMap.CommonId}:${quote.quoteId}] ${quote.description}</label>
                                 </container>

Added: ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml?rev=718168&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml (added)
+++ ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml Sun Nov 16 19:53:47 2008
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
+    <menu name="OrderAppBar" title="${uiLabelMap.OrderOrderManagerApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="request" title="${uiLabelMap.OrderRequests}">
+            <condition>
+                <or>
+                    <if-has-permission permission="ORDERMGR" action="_VIEW"/>
+                    <if-has-permission permission="ORDERMGR" action="_PURCHASE_VIEW"/>
+                </or>
+            </condition>
+            <link target="FindRequest"/>
+        </menu-item>
+
+        <menu-item name="quote" title="${uiLabelMap.OrderOrderQuotes}">
+            <condition>
+                <or>
+                    <if-has-permission permission="ORDERMGR" action="_VIEW"/>
+                    <if-has-permission permission="ORDERMGR" action="_PURCHASE_VIEW"/>
+                </or>
+            </condition>
+            <link target="FindQuote"/>
+        </menu-item>
+
+        <menu-item name="orderlist" title="${uiLabelMap.OrderOrderList}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_VIEW"/>
+            </condition>
+            <link target="orderlist"/>
+        </menu-item>
+
+        <menu-item name="findorders" title="${uiLabelMap.OrderFindOrder}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_VIEW"/>
+            </condition>
+            <link target="findorders"/>
+        </menu-item>
+
+        <menu-item name="orderentry" title="${uiLabelMap.OrderOrderEntry}">
+            <condition>
+                <or>
+                    <if-has-permission permission="ORDERMGR" action="_CREATE"/>
+                    <if-has-permission permission="ORDERMGR" action="_PURCHASE_CREATE"/>
+                </or>
+            </condition>
+            <link target="orderentry"/>
+        </menu-item>
+
+        <menu-item name="return" title="${uiLabelMap.OrderOrderReturns}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_RETURN"/>
+            </condition>
+            <link target="findreturn"/>
+        </menu-item>
+
+        <menu-item name="requirement" title="${uiLabelMap.OrderRequirements}">
+            <condition>
+                <or>
+                    <if-has-permission permission="ORDERMGR" action="_VIEW"/>
+                    <if-has-permission permission="ORDERMGR_ROLE" action="_VIEW"/>
+                </or>
+            </condition>
+            <link target="FindRequirements"/>
+        </menu-item>
+
+        <menu-item name="reports" title="${uiLabelMap.CommonReports}">
+            <link target="OrderPurchaseReportOptions"/>
+        </menu-item>
+
+        <menu-item name="stats" title="${uiLabelMap.CommonStats}">
+            <link target="orderstats"/>
+        </menu-item>
+    </menu>
+
+    <menu name="RequirementsTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="FindRequirements" title="${uiLabelMap.OrderRequirements}">
+            <link target="FindRequirements"/>
+        </menu-item>
+        <menu-item name="ApproveRequirements" title="${uiLabelMap.OrderApproveRequirements}">
+            <link target="ApproveRequirements"/>
+        </menu-item>
+        <menu-item name="ApprovedProductRequirementsByVendor" title="${uiLabelMap.OrderApprovedProductRequirementsByVendor}">
+            <link target="ApprovedProductRequirementsByVendor"/>
+        </menu-item>
+        <menu-item name="ApprovedProductRequirements" title="${uiLabelMap.OrderApprovedProductRequirements}">
+            <link target="ApprovedProductRequirements"/>
+        </menu-item>
+    </menu>
+
+    <menu name="RequirementTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="EditRequirement" title="${uiLabelMap.OrderRequirement}">
+            <link target="EditRequirement?requirementId=${requirement.requirementId}"/>
+        </menu-item>
+        <menu-item name="ListRequirementCustRequests" title="${uiLabelMap.OrderRequests}">
+            <link target="ListRequirementCustRequests?requirementId=${requirement.requirementId}"/>
+        </menu-item>
+        <menu-item name="ListRequirementOrdersTab" title="${uiLabelMap.OrderOrders}">
+            <link target="ListRequirementOrders?requirementId=${requirement.requirementId}"/>
+        </menu-item>
+        <menu-item name="ListRequirementRolesTab" title="${uiLabelMap.PartyRoles}">
+            <link target="ListRequirementRoles?requirementId=${requirement.requirementId}"/>
+        </menu-item>
+    </menu>
+    
+    <menu name="QuoteTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="ViewQuote" title="${uiLabelMap.OrderViewQuote}">
+            <link target="ViewQuote?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="EditQuote" title="${uiLabelMap.OrderOrderQuote}">
+            <link target="EditQuote?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ListQuoteRoles" title="${uiLabelMap.OrderOrderQuoteRoles}">
+            <link target="ListQuoteRoles?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ListQuoteItems" title="${uiLabelMap.OrderOrderQuoteItems}">
+            <link target="ListQuoteItems?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ListQuoteAttributes" title="${uiLabelMap.OrderOrderQuoteAttributes}">
+            <link target="ListQuoteAttributes?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ListQuoteCoefficients" title="${uiLabelMap.OrderOrderQuoteCoefficients}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
+            </condition>
+            <link target="ListQuoteCoefficients?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ManageQuotePrices" title="${uiLabelMap.OrderOrderQuotePrices}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
+            </condition>
+            <link target="ManageQuotePrices?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ListQuoteAdjustments" title="${uiLabelMap.OrderOrderQuoteAdjustments}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
+            </condition>
+            <link target="ListQuoteAdjustments?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="ViewQuoteProfit" title="${uiLabelMap.OrderViewQuoteProfit}">
+            <condition>
+                <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
+            </condition>
+            <link target="ViewQuoteProfit?quoteId=${quote.quoteId}"/>
+        </menu-item>
+
+        <menu-item name="QuoteWorkEfforts" title="${uiLabelMap.OrderOrderQuoteWorkEfforts}">
+            <link target="ListQuoteWorkEfforts?quoteId=${quote.quoteId}"/>
+        </menu-item>
+    </menu>
+
+</menus>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/order/widget/ordermgr/Menus.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml?rev=718168&r1=718167&r2=718168&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequestMenus.xml Sun Nov 16 19:53:47 2008
@@ -21,8 +21,7 @@
 <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">      
 
-    <menu name="RequestTabBar"  default-selected-style="selected" type="simple" selected-menuitem-context-field-name="tabButtonItem"
-        menu-container-style="button-bar tab-bar">
+    <menu name="RequestTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
         <menu-item name="ViewRequest" title="Overview" >
             <link target="ViewRequest?custRequestId=${custRequest.custRequestId}"/>
         </menu-item>
@@ -39,6 +38,7 @@
             <link target="EditCustRequestContent?custRequestId=${custRequest.custRequestId}"/>
         </menu-item>
     </menu>
+
     <menu name="RequestSubTabBar" type="simple" menu-container-style="button-bar button-style-2">
         <menu-item name="newRequest" title="${uiLabelMap.OrderNewRequest}">
             <link target="request"/>
@@ -48,8 +48,7 @@
         </menu-item>
     </menu>
 
-    <menu name="editrequestitemmenu" default-selected-style="selected" type="simple"
-        menu-container-style="button-bar tab-bar">
+    <menu name="editrequestitemmenu" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
         <menu-item name="requestitem">
             <link id="requestitem" target="requestitem?custRequestId=${custRequest.custRequestId}&amp;custRequestItemSeqId=${custRequestItem.custRequestItemSeqId}"/>
         </menu-item>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/RequirementScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/RequirementScreens.xml?rev=718168&r1=718167&r2=718168&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/RequirementScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/RequirementScreens.xml Sun Nov 16 19:53:47 2008
@@ -31,9 +31,12 @@
                                 <if-has-permission permission="ORDERMGR" action="_VIEW"/>
                             </condition>
                             <widgets>
-                                <platform-specific>
-                                    <html><html-template location="component://order/webapp/ordermgr/requirement/RequirementTabBar.ftl"/></html>
-                                </platform-specific>
+                                <section>
+                                    <condition><not><if-empty field-name="requirement"/></not></condition>
+                                    <widgets>
+                                        <include-menu name="RequirementTabBar" location="component://order/widget/ordermgr/Menus.xml"/>
+                                    </widgets>
+                                </section>
                                 <container>
                                     <label style="h1">${uiLabelMap.OrderRequirement} [${requirementId}]</label>
                                 </container>
@@ -61,9 +64,7 @@
                                 <if-has-permission permission="ORDERMGR" action="_VIEW"/>
                             </condition>
                             <widgets>
-                                <platform-specific>
-                                    <html><html-template location="component://order/webapp/ordermgr/requirement/RequirementsTabBar.ftl"/></html>
-                                </platform-specific>
+                                <include-menu name="RequirementsTabBar" location="component://order/widget/ordermgr/Menus.xml"/>
                                 <container>
                                     <link target="EditRequirement" text="${uiLabelMap.OrderNewRequirement}" style="buttontext"/>
                                 </container>