Author: jleroux
Date: Fri Nov 21 11:19:11 2008 New Revision: 719677 URL: http://svn.apache.org/viewvc?rev=719677&view=rev Log: A patch from Bruno Busco "Replacing FTL TabBar with menu widgets in Manufacturing" (https://issues.apache.org/jira/browse/OFBIZ-2055) - OFBIZ-2055 Added: ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml Removed: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomTabBar.ftl ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/MrpTabBar.ftl ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/CalendarTabBar.ftl ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTabBar.ftl ofbiz/trunk/applications/manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml ofbiz/trunk/applications/manufacturing/widget/manufacturing/CalendarScreens.xml ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml ofbiz/trunk/applications/manufacturing/widget/manufacturing/MrpScreens.xml ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml?rev=719677&r1=719676&r2=719677&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml Fri Nov 21 11:19:11 2008 @@ -35,9 +35,7 @@ <if-has-permission permission="MANUFACTURING" action="_VIEW"/> </condition> <widgets> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/bom/BomTabBar.ftl"/></html> - </platform-specific> + <include-menu name="BomTabBar" location="component://manufacturing/widget/manufacturing/Menus.xml"/> <decorator-section-include name="body"/> </widgets> <fail-widgets> @@ -147,4 +145,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/CalendarScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/CalendarScreens.xml?rev=719677&r1=719676&r2=719677&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/CalendarScreens.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/CalendarScreens.xml Fri Nov 21 11:19:11 2008 @@ -35,9 +35,7 @@ <if-has-permission permission="MANUFACTURING" action="_VIEW"/> </condition> <widgets> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/routing/CalendarTabBar.ftl"/></html> - </platform-specific> + <include-menu name="CalendarTabBar" location="component://manufacturing/widget/manufacturing/Menus.xml"/> <decorator-section-include name="body"/> </widgets> <fail-widgets> @@ -230,4 +228,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=719677&r1=719676&r2=719677&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Fri Nov 21 11:19:11 2008 @@ -35,9 +35,14 @@ <if-has-permission permission="MANUFACTURING" action="_VIEW"/> </condition> <widgets> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl"/></html> - </platform-specific> + <section> + <condition> + <not><if-empty field-name="productionRun"/></not> + </condition> + <widgets> + <include-menu name="ProductionRunTabBar" location="component://manufacturing/widget/manufacturing/Menus.xml"/> + </widgets> + </section> <container> <label style="h1">[${uiLabelMap.CommonId} ${productionRunId}]</label> </container> @@ -751,4 +756,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Added: ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml?rev=719677&view=auto ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml (added) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml Fri Nov 21 11:19:11 2008 @@ -0,0 +1,167 @@ +<?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="BomTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="findBom" title="${uiLabelMap.ManufacturingBomSimulation}"> + <link target="BomSimulation"/> + </menu-item> + <menu-item name="EditProductBom" title="${uiLabelMap.ManufacturingEditProductBom}"> + <link target="EditProductBom"/> + </menu-item> + <menu-item name="productManufacturingRules" title="${uiLabelMap.ManufacturingManufacturingRules}"> + <link target="EditProductManufacturingRules"/> + </menu-item> + </menu> + + <menu name="ProductionRunTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="edit" title="${uiLabelMap.ManufacturingEditProductionRun}"> + <condition> + <or> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_CREATED"/> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_SCHEDULED"/> + </or> + </condition> + <link target="EditProductionRun?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="tasks" title="${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}"> + <condition> + <or> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_CREATED"/> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_SCHEDULED"/> + </or> + </condition> + <link target="ProductionRunTasks?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="components" title="${uiLabelMap.ManufacturingMaterials}"> + <condition> + <or> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_CREATED"/> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_SCHEDULED"/> + </or> + </condition> + <link target="ProductionRunComponents?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="fixedAssets" title="${uiLabelMap.AccountingFixedAssets}"> + <condition> + <or> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_CREATED"/> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_SCHEDULED"/> + </or> + </condition> + <link target="ProductionRunFixedAssets?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="declaration" title="${uiLabelMap.ManufacturingProductionRunDeclaration}"> + <condition> + <not> + <or> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_CREATED"/> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_SCHEDULED"/> + </or> + </not> + </condition> + <link target="ProductionRunDeclaration?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="actualComponents" title="${uiLabelMap.ManufacturingActualMaterials}"> + <condition> + <not> + <or> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_CREATED"/> + <if-compare field-name="productionRun.currentStatusId" operator="equals" value="PRUN_SCHEDULED"/> + </or> + </not> + </condition> + <link target="ProductionRunDeclaration?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="assocs" title="${uiLabelMap.ManufacturingProductionRunAssocs}"> + <link target="ProductionRunAssocs?productionRunId=${productionRunId}"/> + </menu-item> + <menu-item name="costs" title="${uiLabelMap.ManufacturingActualCosts}"> + <link target="ProductionRunCosts?productionRunId=${productionRunId}"/> + </menu-item> + </menu> + + <menu name="MrpTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="RunMrp" title="${uiLabelMap.ManufacturingRunMrp}"> + <link target="RunMrp"/> + </menu-item> + <menu-item name="findInventoryEventPlan" title="${uiLabelMap.ManufacturingMrpLog}"> + <link target="FindInventoryEventPlan"/> + </menu-item> + </menu> + + <menu name="CalendarTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="Calendar" title="${uiLabelMap.ManufacturingCalendars}"> + <link target="FindCalendar"/> + </menu-item> + <menu-item name="CalendarWeek" title="${uiLabelMap.ManufacturingCalendarWeeks}"> + <link target="ListCalendarWeek"/> + </menu-item> + + <menu-item name="calendar" title="${uiLabelMap.CommonEdit}"> + <condition> + <not><if-empty field-name="techDataCalendar"/></not> + </condition> + <link target="EditCalendar?calendarId=${techDataCalendar.calendarId}"/> + </menu-item> + <menu-item name="calendarExceptionDay" title="${uiLabelMap.ManufacturingCalendarExceptionDate}"> + <condition> + <not><if-empty field-name="techDataCalendar"/></not> + </condition> + <link target="EditCalendarExceptionDay?calendarId=${techDataCalendar.calendarId}"/> + </menu-item> + <menu-item name="calendarExceptionWeek" title="${uiLabelMap.ManufacturingCalendarExceptionWeek}"> + <condition> + <not><if-empty field-name="techDataCalendar"/></not> + </condition> + <link target="EditCalendarExceptionWeek?calendarId=${techDataCalendar.calendarId}"/> + </menu-item> + </menu> + + <menu name="RoutingTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="editRouting" title="${uiLabelMap.ManufacturingEditRouting}"> + <link target="EditRouting?workEffortId=${routing.workEffortId}"/> + </menu-item> + <menu-item name="routingTaskAssoc" title="${uiLabelMap.ManufacturingEditRoutingTaskAssoc}"> + <link target="EditRoutingTaskAssoc?workEffortId=${routing.workEffortId}"/> + </menu-item> + <menu-item name="routingProductLink" title="${uiLabelMap.ManufacturingEditRoutingProductLink}"> + <link target="EditRoutingProductLink?workEffortId=${routing.workEffortId}"/> + </menu-item> + </menu> + + <menu name="RoutingTaskTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="editRoutingTask" title="${uiLabelMap.ManufacturingEditRoutingTask}"> + <link target="EditRoutingTask?workEffortId=${routingTask.workEffortId}"/> + </menu-item> + <menu-item name="editRoutingTaskCosts" title="${uiLabelMap.ManufacturingListRoutings}"> + <link target="EditRoutingTaskCosts?workEffortId=${routingTask.workEffortId}"/> + </menu-item> + <menu-item name="listRoutingTaskProducts" title="${uiLabelMap.ManufacturingListProducts}"> + <link target="ListRoutingTaskProducts?workEffortId=${routingTask.workEffortId}"/> + </menu-item> + <menu-item name="editRoutingTaskFixedAssets" title="${uiLabelMap.ManufacturingRoutingTaskFixedAssets}"> + <link target="EditRoutingTaskFixedAssets?workEffortId=${routingTask.workEffortId}"/> + </menu-item> + </menu> + +</menus> Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/MrpScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/MrpScreens.xml?rev=719677&r1=719676&r2=719677&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/MrpScreens.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/MrpScreens.xml Fri Nov 21 11:19:11 2008 @@ -35,9 +35,7 @@ <if-has-permission permission="MANUFACTURING" action="_VIEW"/> </condition> <widgets> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/mrp/MrpTabBar.ftl"/></html> - </platform-specific> + <include-menu name="MrpTabBar" location="component://manufacturing/widget/manufacturing/Menus.xml"/> <decorator-section-include name="body"/> </widgets> <fail-widgets> @@ -169,4 +167,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml?rev=719677&r1=719676&r2=719677&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/RoutingScreens.xml Fri Nov 21 11:19:11 2008 @@ -38,9 +38,14 @@ <if-has-permission permission="MANUFACTURING" action="_VIEW"/> </condition> <widgets> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/routing/RoutingTabBar.ftl"/></html> - </platform-specific> + <section> + <condition> + <not><if-empty field-name="routing"/></not> + </condition> + <widgets> + <include-menu name="RoutingTabBar" location="component://manufacturing/widget/manufacturing/Menus.xml"/> + </widgets> + </section> <container> <label style="h1">[${uiLabelMap.CommonId} ${routing.workEffortId}] ${routing.workEffortName}</label> </container> @@ -70,9 +75,14 @@ <if-has-permission permission="MANUFACTURING" action="_VIEW"/> </condition> <widgets> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/routing/RoutingTaskTabBar.ftl"/></html> - </platform-specific> + <section> + <condition> + <not><if-empty field-name="routing"/></not> + </condition> + <widgets> + <include-menu name="RoutingTaskTabBar" location="component://manufacturing/widget/manufacturing/Menus.xml"/> + </widgets> + </section> <container> <label style="h1">[${uiLabelMap.CommonId} ${routingTask.workEffortId}] ${routingTask.workEffortName}</label> </container> @@ -487,4 +497,4 @@ </widgets> </section> </screen> -</screens> \ No newline at end of file +</screens> |
Free forum by Nabble | Edit this page |