You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/02/07 12:59:54 UTC

svn commit: r504515 - in /ofbiz/trunk/applications/product: config/ script/org/ofbiz/shipment/shipment/ servicedef/ webapp/catalog/WEB-INF/ webapp/catalog/includes/ webapp/catalog/store/ widget/catalog/

Author: jacopoc
Date: Wed Feb  7 03:59:53 2007
New Revision: 504515

URL: http://svn.apache.org/viewvc?view=rev&rev=504515
Log:
Added new services and screens to manage the QuantityBreak entity.

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
    ofbiz/trunk/applications/product/servicedef/services_shipment.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/catalog/includes/appheader.ftl
    ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml
    ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Wed Feb  7 03:59:53 2007
@@ -1028,6 +1028,7 @@
 ProductQtyOffsetQOHBelow=QOH minus Min Stock <=
 ProductQuantity=Quantity
 ProductQuantityAccepted=Quantity Accepted
+ProductQuantityBreaks=Quantity Breaks
 ProductQuantityIncluded=Quantity Included
 ProductQuantityNotSet=Quantity Not Set
 ProductQuantityRequested=Quantity Requested

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Wed Feb  7 03:59:53 2007
@@ -1596,6 +1596,45 @@
         </calculate>
         <field-to-result field-name="remainingQuantity"/>
     </simple-method>
+
+    <!-- QuantityBreak services -->
+    <!-- create a new QuantityBreak -->
+    <simple-method method-name="createQuantityBreak" short-description="Create a QuoteAttribute">
+        <check-permission permission="FACILITY" action="_CREATE">
+            <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunCreateQuantityBreak"/>
+        </check-permission>
+        <check-errors/>
+        <make-value value-name="quantityBreak" entity-name="QuantityBreak"/>
+        <set-nonpk-fields map-name="parameters" value-name="quantityBreak"/>
+        <sequenced-id-to-env sequence-name="QuantityBreak" env-name="quantityBreak.quantityBreakId"/>
+        <create-value value-name="quantityBreak"/>
+        <check-errors/>
+    </simple-method>
+
+    <!-- update an existing QuantityBreak -->
+    <simple-method method-name="updateQuantityBreak" short-description="Update an existing QuantityBreak">
+        <check-permission permission="FACILITY" action="_CREATE">
+            <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunUpdateQuantityBreak"/>
+        </check-permission>
+        <check-errors/>
+        <entity-one entity-name="QuantityBreak" value-name="quantityBreak" auto-field-map="true"/>
+        <check-errors/>
+        <set-nonpk-fields map-name="parameters" value-name="quantityBreak"/>
+        <store-value value-name="quantityBreak"/>
+        <check-errors/>
+    </simple-method>
+
+    <!-- remove an existing QuantityBreak -->
+    <simple-method method-name="deleteQuantityBreak" short-description="Remove an existing QuantityBreak">
+        <check-permission permission="FACILITY" action="_CREATE">
+            <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunRemoveQuantityBreak"/>
+        </check-permission>
+        <check-errors/>
+        <entity-one entity-name="QuantityBreak" value-name="quantityBreak" auto-field-map="true"/>
+        <check-errors/>
+        <remove-value value-name="quantityBreak"/>
+        <check-errors/>
+    </simple-method>
 </simple-methods>
 
     <!-- FooBar services -->

Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_shipment.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Wed Feb  7 03:59:53 2007
@@ -576,4 +576,22 @@
         <description>Generic Shipment Cost Estimate Calc Service - Use ShipmentCostEstimate Entities</description>
         <implements service="calcShipmentEstimateInterface"/>
     </service>
+
+    <!-- QuantityBreak services -->
+    <service name="createQuantityBreak" engine="simple"
+            location="org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="createQuantityBreak" auth="true">
+        <description>Create a QuantityBreak</description>
+        <auto-attributes entity-name="QuantityBreak" include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="updateQuantityBreak" engine="simple"
+            location="org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="updateQuantityBreak" auth="true">
+        <description>Update a QuantityBreak</description>
+        <auto-attributes entity-name="QuantityBreak" include="pk" mode="IN" optional="false"/>
+        <auto-attributes entity-name="QuantityBreak" include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="deleteQuantityBreak" engine="simple"
+            location="org/ofbiz/shipment/shipment/ShipmentServices.xml" invoke="deleteQuantityBreak" auth="true">
+        <description>Delete a QuantityBreak</description>
+        <auto-attributes entity-name="QuantityBreak" include="pk" mode="IN" optional="false"/>
+    </service>
 </services>

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Wed Feb  7 03:59:53 2007
@@ -1886,6 +1886,34 @@
         <response name="error" type="view" value="EditProductStoreShipSetup"/>
     </request-map>
 
+    <!-- ================ QuantityBreak Requests ================= -->
+    <request-map uri="ListQuantityBreaks">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ListQuantityBreaks"/>
+    </request-map>
+    <request-map uri="EditQuantityBreak">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditQuantityBreak"/>
+    </request-map>
+    <request-map uri="createQuantityBreak">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createQuantityBreak"/>
+        <response name="success" type="view" value="ListQuantityBreaks"/>
+        <response name="error" type="view" value="EditQuantityBreak"/>
+    </request-map>
+    <request-map uri="updateQuantityBreak">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateQuantityBreak"/>
+        <response name="success" type="view" value="ListQuantityBreaks"/>
+        <response name="error" type="view" value="EditQuantityBreak"/>
+    </request-map>
+    <request-map uri="deleteQuantityBreak">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteQuantityBreak"/>
+        <response name="success" type="view" value="ListQuantityBreaks"/>
+        <response name="error" type="view" value="ListQuantityBreaks"/>
+    </request-map>
+
     <!-- ================ ProductStore Survey Requests ================= -->
     <request-map uri="EditProductStoreSurveys">
         <security https="true" auth="true"/>
@@ -2353,6 +2381,9 @@
     <view-map name="EditProductConfigItemContentContent" type="screen" page="component://product/widget/catalog/ConfigScreens.xml#EditProductConfigItemContentContent"/>
     
     <view-map name="EditProductWorkEfforts" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductWorkEfforts"/>        
+
+    <view-map name="ListQuantityBreaks" type="screen" page="component://product/widget/catalog/StoreScreens.xml#ListQuantityBreaks"/>
+    <view-map name="EditQuantityBreak" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditQuantityBreak"/>
 
     <!-- Lookup request mappings -->
     <view-map name="LookupContent" page="component://content/widget/content/ContentScreens.xml#LookupContent" type="screen"/>

Modified: ofbiz/trunk/applications/product/webapp/catalog/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/includes/appheader.ftl?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/includes/appheader.ftl Wed Feb  7 03:59:53 2007
@@ -38,6 +38,7 @@
   <div class="col"><a href="<@o...@ofbizUrl>" class="${selectedLeftClassMap.reviews?default(unselectedLeftClassName)}">${uiLabelMap.ProductReviews}</a></div>
   <div class="col"><a href="<@o...@ofbizUrl>" class="${selectedLeftClassMap.configs?default(unselectedLeftClassName)}">${uiLabelMap.ProductConfigItems}</a></div>
   <div class="col"><a href="<@o...@ofbizUrl>" class="${selectedLeftClassMap.Subscription?default(unselectedLeftClassName)}">${uiLabelMap.ProductSubscriptions}</a></div>
+  <div class="col"><a href="<@o...@ofbizUrl>" class="${selectedLeftClassMap.ListQuantityBreaks?default(unselectedLeftClassName)}">${uiLabelMap.ProductQuantityBreaks}</a></div>
 
   <#if userLogin?has_content>
     <div class="col-right"><a href="<@o...@ofbizUrl>" class="${selectedRightClassMap.logout?default(unselectedRightClassName)}">${uiLabelMap.CommonLogout}</a></div>

Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Wed Feb  7 03:59:53 2007
@@ -344,4 +344,31 @@
                 description="${uiLabelMap.CommonDelete}" also-hidden="false" target-type="inter-app"/>
         </field>
     </form>
+    <!-- QuantityBreak forms -->
+    <form name="ListQuantityBreaks" default-title-style="tableheadtext"
+            default-tooltip-style="tabletext" default-widget-style="tabletext" list-name="quantityBreaks"
+            target="" paginate-target="ListQuantityBreaks" title="" type="list">
+        <auto-fields-entity entity-name="QuantityBreak" default-field-type="display"/>
+        <field name="quantityBreakId" widget-style="buttontext">
+            <hyperlink target="EditQuantityBreak?quantityBreakId=${quantityBreakId}" description="${quantityBreakId}" also-hidden="false"/>
+        </field>
+        <field name="quantityBreakTypeId" title="${uiLabelMap.CommonType}"><display-entity also-hidden="false" entity-name="QuantityBreakType"/></field>
+        <field name="deleteLink" title="" widget-style="buttontext">
+            <hyperlink target="deleteQuantityBreak?quantityBreakId=${quantityBreakId}" description="${uiLabelMap.CommonRemove}" also-hidden="false"/>
+        </field>
+    </form>
+    <form name="EditQuantityBreak" type="single" target="createQuantityBreak" title="" default-map-name="quantityBreak"
+            default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <alt-target use-when="quantityBreak!=null" target="updateQuantityBreak"/>
+        <auto-fields-entity entity-name="QuantityBreak" default-field-type="edit"/>
+        <field name="quantityBreakId"><hidden/></field>
+        <field name="quantityBreakTypeId" title="${uiLabelMap.CommonType}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="QuantityBreakType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml?view=diff&rev=504515&r1=504514&r2=504515
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Wed Feb  7 03:59:53 2007
@@ -349,4 +349,62 @@
             </widgets>
        </section>
     </screen>
+
+    <!-- QuantityBreak screens -->
+    <screen name="ListQuantityBreaks">
+       <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleListQuantityBreaks"/>
+                <set field="headerItem" value="ListQuantityBreaks"/>
+
+                <set field="leftbarScreenName" value="leftbar"/>
+                <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/>
+                <set field="MainColumnStyle" value="leftonly"/>
+
+                <entity-condition entity-name="QuantityBreak" list-name="quantityBreaks">
+                    <order-by field-name="quantityBreakId"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container>
+                            <label style="head1">${uiLabelMap.QuantityBreaks}</label>
+                        </container>
+                        <container>
+                            <link target="EditQuantityBreak" text="${uiLabelMap.CommonNew}" style="buttontext"/>
+                        </container>
+                        <include-form name="ListQuantityBreaks" location="component://product/webapp/catalog/store/ProductStoreForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+       </section>
+    </screen>
+
+    <screen name="EditQuantityBreak">
+       <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditQuantityBreak"/>
+                <set field="headerItem" value="ListQuantityBreaks"/>
+
+                <set field="leftbarScreenName" value="leftbar"/>
+                <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/>
+                <set field="MainColumnStyle" value="leftonly"/>
+
+                <!--<set field="quantityBreakId" from-field="parameters.quantityBreakId"/>-->
+                <entity-one entity-name="QuantityBreak" value-name="quantityBreak" auto-field-map="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container>
+                            <label style="head1">${uiLabelMap.QuantityBreaks}</label>
+                        </container>
+                        <include-form name="EditQuantityBreak" location="component://product/webapp/catalog/store/ProductStoreForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+       </section>
+    </screen>
+
 </screens>