You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/10/17 05:35:04 UTC

svn commit: r705451 - in /ofbiz/trunk/applications/product: webapp/catalog/WEB-INF/actions/price/FindProductPriceRule.groovy webapp/catalog/price/FindProductPriceRule.ftl webapp/catalog/price/PriceForms.xml widget/catalog/PriceScreens.xml

Author: hansbak
Date: Thu Oct 16 20:35:03 2008
New Revision: 705451

URL: http://svn.apache.org/viewvc?rev=705451&view=rev
Log:
convert pricerule ftl list to forms to have paging on many rules. removed the 'old' function because not working and related service deletes physically the records anyway

Added:
    ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml   (with props)
Removed:
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/FindProductPriceRule.groovy
    ofbiz/trunk/applications/product/webapp/catalog/price/FindProductPriceRule.ftl
Modified:
    ofbiz/trunk/applications/product/widget/catalog/PriceScreens.xml

Added: ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml?rev=705451&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml (added)
+++ ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml Thu Oct 16 20:35:03 2008
@@ -0,0 +1,48 @@
+<?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.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+    <form name="FindProductPriceRules" list-name="listIt" title="" type="list" 
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="FindProductPriceRules">
+        <actions>
+            <set field="noConditionFind" value="Y"/>
+            <set field="parameters.productPriceRuleId" value=""/>
+            <set field="parameters.ruleName" value=""/>
+            <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">      
+                <field-map field-name="inputFields" env-name="parameters"/>
+                <field-map field-name="entityName" value="ProductPriceRule"/>
+            </service>
+        </actions>
+        <field name="productPriceRuleId" title="${uiLabelMap.ProductPriceRuleNameId}" widget-style="buttontext">
+            <hyperlink target="EditProductPriceRules?productPriceRuleId=${productPriceRuleId}" description="${ruleName}[${productPriceRuleId}]" />
+        </field>
+        <field name="isSale" title="${uiLabelMap.ProductSaleRule}?"><display/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field>
+        <field name="editLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="EditProductPriceRules?productPriceRuleId=${productPriceRuleId}" description="${uiLabelMap.CommonEdit}"/>
+        </field>
+    </form>
+    <form name="AddPriceRules" type="single" target="createProductPriceRule">
+        <field name="ruleName" title="${uiLabelMap.ProductName}"><text size="30"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
+    </form>
+</forms>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/widget/catalog/PriceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/PriceScreens.xml?rev=705451&r1=705450&r2=705451&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/PriceScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/PriceScreens.xml Thu Oct 16 20:35:03 2008
@@ -52,15 +52,30 @@
             <actions>
                 <set field="titleProperty" value="PageTitleFindProductPriceRule"/>
                 <set field="headerItem" value="pricerules"/>
-                
-                <script location="component://product/webapp/catalog/WEB-INF/actions/price/FindProductPriceRule.groovy"/>
+                <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="20"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonPriceDecorator">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/price/FindProductPriceRule.ftl"/></html>
-                        </platform-specific>
+                        <screenlet>
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.ProductGlobalPriceRules}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form name="FindProductPriceRules" location="component://product/webapp/catalog/price/PriceForms.xml"/>
+                            </container>
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.ProductAddPriceRule}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form location="component://product/webapp/catalog/price/PriceForms.xml" name="AddPriceRules"/>
+                            </container>
+                        </screenlet>    
                     </decorator-section>
                 </decorator-screen>
             </widgets>