svn commit: r680016 - in /ofbiz/trunk: applications/product/config/ applications/product/entitydef/ applications/product/webapp/facility/WEB-INF/ applications/product/webapp/facility/facility/ applications/product/webapp/facility/lookup/ applications/p...

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

svn commit: r680016 - in /ofbiz/trunk: applications/product/config/ applications/product/entitydef/ applications/product/webapp/facility/WEB-INF/ applications/product/webapp/facility/facility/ applications/product/webapp/facility/lookup/ applications/p...

adrianc
Author: adrianc
Date: Sat Jul 26 10:15:12 2008
New Revision: 680016

URL: http://svn.apache.org/viewvc?rev=680016&view=rev
Log:
Added parentFacilityId to the Facility entity.

I added a CommonEntityChildren UI label to CommonUiLabels.xml because a number of components implement parent->child relationships and they all have their own "Children" UI label. This will help reduce UI label redundancy. I'll make the change in the other components in another commit.

Internationalization note: this commit contains new UI labels.

Added:
    ofbiz/trunk/applications/product/widget/facility/FacilityTrees.xml   (with props)
Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/facility/EditFacility.ftl
    ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
    ofbiz/trunk/applications/product/widget/facility/Menus.xml
    ofbiz/trunk/framework/common/config/CommonUiLabels.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Sat Jul 26 10:15:12 2008
@@ -2350,6 +2350,9 @@
         <value xml:lang="th">รหัสของหัวข้อ</value>
         <value xml:lang="zh">拥有者内容标识</value>
     </property>
+    <property key="FormFieldTitle_parentFacilityId">
+        <value xml:lang="en">Parent Facility Id</value>
+    </property>
     <property key="FormFieldTitle_parentFacilityGroupId">
         <value xml:lang="en">Parent Facility Group Id</value>
         <value xml:lang="fr">Réf. de groupe de lieux de stockage parent</value>
@@ -9155,6 +9158,9 @@
         <value xml:lang="th">คลังสินค้า</value>
         <value xml:lang="zh">场所</value>
     </property>
+    <property key="ProductFacilityChildren">
+        <value xml:lang="en">Facility Children for ${facility.facilityName}</value>
+    </property>
     <property key="ProductFacilityContainer">
         <value xml:lang="en">Facility / Container</value>
         <value xml:lang="es">Almacén / Contenedor</value>

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Sat Jul 26 10:15:12 2008
@@ -878,6 +878,7 @@
     <entity entity-name="Facility" package-name="org.ofbiz.product.facility" title="Facility Entity">
         <field name="facilityId" type="id-ne"></field>
         <field name="facilityTypeId" type="id"></field>
+        <field name="parentFacilityId" type="id"></field>
         <field name="ownerPartyId" type="id-ne"/>
         <field name="defaultInventoryItemTypeId" type="id"></field>
         <field name="facilityName" type="name"></field>
@@ -893,6 +894,9 @@
         <relation type="one" fk-name="FACILITY_FCTYP" rel-entity-name="FacilityType">
             <key-map field-name="facilityTypeId"/>
         </relation>
+        <relation type="one" fk-name="FACILITY_PARENT" title="Parent" rel-entity-name="Facility">
+            <key-map field-name="parentFacilityId" rel-field-name="facilityId"/>
+        </relation>
         <relation type="one" fk-name="FACILITY_PGRP" rel-entity-name="FacilityGroup">
             <key-map field-name="primaryFacilityGroupId" rel-field-name="facilityGroupId"/>
         </relation>

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Sat Jul 26 10:15:12 2008
@@ -71,6 +71,10 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditFacility"/>
     </request-map>
+    <request-map uri="FacilityChildren">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FacilityChildren"/>
+    </request-map>
     <request-map uri="CreateFacility">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="createFacility"/>
@@ -1094,6 +1098,7 @@
     <request-map uri="LookupProduct"><security auth="true" https="true"/><response name="success" type="view" value="LookupProduct"/></request-map>
     <request-map uri="LookupVariantProduct"><security auth="true" https="true"/><response name="success" type="view" value="LookupVariantProduct"/></request-map>
     <request-map uri="LookupProductCategory"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductCategory"/></request-map>
+    <request-map uri="LookupFacility"><security https="true" auth="true"/><response name="success" type="view" value="LookupFacility"/></request-map>
     <request-map uri="LookupFacilityLocation"><security auth="true" https="true"/><response name="success" type="view" value="LookupFacilityLocation"/></request-map>
     <request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
     
@@ -1105,6 +1110,7 @@
     <view-map name="FindFacility" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacility"/>
     <view-map name="FacilitySearchResults" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FacilitySearchResults"/>
     <view-map name="EditFacility" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacility"/>
+    <view-map name="FacilityChildren" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FacilityChildren"/>
     <view-map name="FindFacilityTransfers" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacilityTransfers"/>
     <view-map name="FindFacilityLocation" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacilityLocation"/>
     <view-map name="EditFacilityLocation" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityLocation"/>
@@ -1177,6 +1183,7 @@
     <view-map name="LookupProduct" page="component://product/widget/catalog/LookupScreens.xml#LookupProduct" type="screen"/>
     <view-map name="LookupVariantProduct" page="component://product/widget/catalog/LookupScreens.xml#LookupVariantProduct" type="screen"/>
     <view-map name="LookupProductCategory" type="screen" page="component://product/widget/catalog/LookupScreens.xml#LookupProductCategory"/>
+    <view-map name="LookupFacility" type="screen" page="component://product/widget/facility/LookupScreens.xml#LookupFacility"/>
     <view-map name="LookupFacilityLocation" page="component://product/widget/facility/LookupScreens.xml#LookupFacilityLocation" type="screen"/>
     <view-map name="LookupPartyName" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/>
     <!-- end of view mappings -->

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/EditFacility.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/EditFacility.ftl?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/EditFacility.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/EditFacility.ftl Sat Jul 26 10:15:12 2008
@@ -58,12 +58,22 @@
     </td>
   </tr>
   <tr>
+    <td class="label">${uiLabelMap.FormFieldTitle_parentFacilityId}</td>
+    <td>
+      <input type="text" name="parentFacilityId" value="${facility.parentFacilityId?if_exists}"/>
+      <a href="javascript:call_fieldlookup2(document.EditFacilityForm.parentFacilityId,'LookupFacility');" title="${uiLabelMap.CommonFieldLookup}">
+        <img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15" height="14" border="0" alt="${uiLabelMap.CommonFieldLookup}"/>
+      </a>
+    </td>
+  </tr>
+  <tr>
     <td class="label">${uiLabelMap.ProductFacilityOwner}</td>
     <td>
-      <input type="text" name="ownerPartyId" value="${facility.ownerPartyId?if_exists}"/>
-      <a href="javascript:call_fieldlookup2(document.EditFacilityForm.ownerPartyId,'LookupPartyName');">
-        <img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15" height="14" border="0" alt="Click here For Field Lookup"/>
+      <input type="text" class="required" name="ownerPartyId" value="${facility.ownerPartyId?if_exists}"/>
+      <a href="javascript:call_fieldlookup2(document.EditFacilityForm.ownerPartyId,'LookupPartyName');" title="${uiLabelMap.CommonFieldLookup}">
+        <img src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15" height="14" border="0" alt="${uiLabelMap.CommonFieldLookup}"/>
       </a>
+      <span class="tooltip">${uiLabelMap.CommonRequired}</span>
     </td>
   </tr>
   <tr>

Modified: ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml Sat Jul 26 10:15:12 2008
@@ -25,6 +25,7 @@
         <!--<auto-fields-entity entity-name="Facility" default-field-type="hidden"/> -->
         <field name="facilityId"><text-find/></field>
         <field name="facilityName"><text-find/></field>
+        <field name="parentFacilityId"><text-find/></field>
         <field name="facilityTypeId">
             <drop-down allow-empty="true">
                 <entity-options description="${description}" entity-name="FacilityType" key-field-name="facilityTypeId">

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Sat Jul 26 10:15:12 2008
@@ -118,6 +118,26 @@
         </section>
     </screen>
     
+    <screen name="FacilityChildren">
+        <section>
+            <actions>
+                <set field="titleProperty" value="ProductFacilityChildren"/>
+                <set field="headerItem" value="facility"/>
+                <set field="tabButtonItem" value="FacilityChildren"/>
+                <set field="facilityId" from-field="parameters.facilityId"/>
+                <set field="trail" from-field="parameters.trail" default-value="${facilityId}"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="h1"><label text="${uiLabelMap.ProductFacilityChildren}"/></container>
+                        <include-tree location="component://product/widget/facility/FacilityTrees.xml" name="FacilityTree"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
     <screen name="FindFacilityTransfers">
         <section>
             <actions>

Added: ofbiz/trunk/applications/product/widget/facility/FacilityTrees.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityTrees.xml?rev=680016&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityTrees.xml (added)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityTrees.xml Sat Jul 26 10:15:12 2008
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-tree.xsd">
+    <tree name="FacilityTree" root-node-name="node-root" entity-name="Facility" expand-collapse-request="FacilityChildren?facilityId=${facilityId}"
+        default-render-style="expand-collapse">
+        <node name="node-root" render-style="simple">
+            <sub-node node-name="node-body">
+                <entity-and entity-name="Facility">
+                    <field-map field-name="parentFacilityId" env-name="facilityId"/>
+                    <order-by field-name="facilityName"/>
+                </entity-and>
+            </sub-node>
+        </node>
+        <node name="node-body">
+            <link target="EditFacility?facilityId=${facilityId}" text="${facilityName} [${facilityId}]"/>
+            <sub-node node-name="node-body">
+                <entity-and entity-name="Facility">
+                    <field-map field-name="parentFacilityId" env-name="facilityId"/>
+                    <order-by field-name="facilityName"/>
+                </entity-and>
+            </sub-node>
+        </node>
+    </tree>
+</trees>

Propchange: ofbiz/trunk/applications/product/widget/facility/FacilityTrees.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ofbiz/trunk/applications/product/widget/facility/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/Menus.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/Menus.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/Menus.xml Sat Jul 26 10:15:12 2008
@@ -26,6 +26,9 @@
         <menu-item name="EditFacility" title="${uiLabelMap.ProductFacility}">
             <link target="EditFacility?facilityId=${facilityId}"/>
         </menu-item>
+        <menu-item name="FacilityChildren" title="${uiLabelMap.CommonEntityChildren}">
+            <link target="FacilityChildren?facilityId=${facilityId}"/>
+        </menu-item>
         <menu-item name="ViewContactMechs" title="${uiLabelMap.PartyContactMechs}">
             <link target="ViewContactMechs?facilityId=${facilityId}"/>
         </menu-item>

Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=680016&r1=680015&r2=680016&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Sat Jul 26 10:15:12 2008
@@ -1885,6 +1885,17 @@
         <value xml:lang="zh_CN">结束日期/时间</value>
         <value xml:lang="zh">结束日期/时间</value>
     </property>
+    <property key="CommonEntityChildren">
+        <value xml:lang="ar">الفروع</value>
+        <value xml:lang="en">Children</value>
+        <value xml:lang="es">Niños</value>
+        <value xml:lang="fr">Descendant</value>
+        <value xml:lang="it">Figli</value>
+        <value xml:lang="ro">Copii-Fii</value>
+        <value xml:lang="ru">Подчиненные</value>
+        <value xml:lang="th">เด็ก</value>
+        <value xml:lang="zh">下级固定资产</value>
+    </property>
     <property key="CommonEntries">
         <value xml:lang="ar">مداخيل</value>
         <value xml:lang="de">Einträge</value>
@@ -1980,7 +1991,7 @@
         <value xml:lang="de">Erweitern</value>
         <value xml:lang="en">Expand</value>
         <value xml:lang="fr">Augmenter</value>
-        <value xml:lang="en">แผ่ขยาย</value>
+        <value xml:lang="th">แผ่ขยาย</value>
     </property>
     <property key="CommonExclude">
         <value xml:lang="de">Ausschliessen</value>
@@ -2135,6 +2146,9 @@
         <value xml:lang="th">เพศหญิง</value>
         <value xml:lang="zh">女</value>
     </property>
+    <property key="CommonFieldLookup">
+        <value xml:lang="en">Field Lookup</value>
+    </property>
     <property key="CommonFieldsMarkedAreRequired">
         <value xml:lang="ar">الحقول المعلمة ب (*) إلزامية</value>
         <value xml:lang="cs">(*) označená pole jsou nutná</value>