svn commit: r544778 - in /ofbiz/trunk/applications/product: config/ webapp/catalog/product/ widget/catalog/

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

svn commit: r544778 - in /ofbiz/trunk/applications/product: config/ webapp/catalog/product/ widget/catalog/

jacopoc
Author: jacopoc
Date: Wed Jun  6 02:18:05 2007
New Revision: 544778

URL: http://svn.apache.org/viewvc?view=rev&rev=544778
Log:
Applied patch from Mario Cappellato to conver the product ids and keyword screens to widgets: part of OFBIZ-1046

Removed:
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductGoodIdentifications.ftl
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductKeyword.ftl
Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.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=544778&r1=544777&r2=544778
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Wed Jun  6 02:18:05 2007
@@ -73,6 +73,7 @@
 PageTitleCreateNewPartyDetail=Create New Party Detail
 PageTitleCreateProductCategoryCheckExisting=Create Product in Category - Check Existing
 PageTitleCreateProductCategoryStart=Create Product in Category - Start
+PageTitleCreateProductGoodIdentifications=Add Good Identifications
 PageTitleCreateVirtualWithVariants=Create Virtual with Variants
 PageTitleEditCategory=Edit Category
 PageTitleEditCategoryAttributes=Edit Product Category Attributes

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml?view=diff&rev=544778&r1=544777&r2=544778
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml Wed Jun  6 02:18:05 2007
@@ -1365,4 +1365,47 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
     </form>
-</forms>
+    <!-- ProductIDs -->
+    <form name="AddProductGoodIdentification" type="single" target="createGoodIdentification" title="">
+        <auto-fields-service service-name="createGoodIdentification"/>
+        <field name="productId"><hidden/></field>
+        <field name="goodIdentificationTypeId" title="${uiLabelMap.ProductIdType}">
+            <drop-down allow-empty="false" no-current-selected-key="ISBN">
+                <entity-options entity-name="GoodIdentificationType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>
+    </form>
+    <form name="UpdateProductGoodIdentifications" type="list" target="updateGoodIdentification" title="" list-name="goodIdentifications"
+        default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <auto-fields-service service-name="updateGoodIdentification" map-name="updateGoodIdentification"/>
+        <field name="goodIdentificationTypeId" title="${uiLabelMap.ProductIdType}"><display-entity entity-name="GoodIdentificationType"/></field>
+        <field name="productId"><hidden/></field>
+        <field name="idValue"></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
+        <field name="deleteLink" title="" widget-style="buttontext">
+            <hyperlink target="deleteGoodIdentification?productId=${productId}&amp;goodIdentificationTypeId=${goodIdentificationTypeId}"
+                description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
+    <!-- ProductKeywords -->
+    <form name="AddProductKeyword" type="single" target="UpdateProductKeyword" title="">
+        <field name="productId"><hidden/></field>
+        <field name="UPDATE_MODE"><hidden value="CREATE"/></field>
+        <field name="PRODUCT_ID" entry-name="productId"><hidden/></field>
+        <field name="KEYWORD" title="${uiLabelMap.Keyword}"><text/></field>
+        <field name="relevancyWeight" title="${uiLabelMap.Weight}"><text default-value="1"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>
+    </form>
+    <form name="UpdateProductKeyword" type="list" target="UpdateProductKeywords" title="" list-name="productKeywords">
+        <field name="productId"><hidden/></field>
+        <field name="relevancyWeight" title="${uiLabelMap.Weight}"><display/></field>
+        <field name="keyword" title="${uiLabelMap.keyword}"><display/></field>
+        <field name="deleteLink" title="" widget-style="buttontext">
+            <hyperlink target="UpdateProductKeyword?productId=${productId}&amp;keyword=${keyword}&amp;UPDATE_MODE=DELETE&amp;PRODUCT_ID=${productId}&amp;KEYWORD=${keyword}"
+                description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
+ </forms>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?view=diff&rev=544778&r1=544777&r2=544778
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Wed Jun  6 02:18:05 2007
@@ -428,16 +428,24 @@
                 <set field="titleProperty" value="PageTitleEditProductKeywords"/>
                 <set field="tabButtonItem" value="EditProductKeyword"/>
                 <set field="labelTitleProperty" value="ProductKeywords"/>
-
                 <set field="productId" from-field="parameters.productId"/>
                 <entity-one entity-name="Product" value-name="product"/>
+                <set field="orderByList[]" value="-relevancyWeight"/>
+                <set field="orderByList[]" value="keyword"/>
+                <get-related value-name="product" relation-name="ProductKeyword" list-name="productKeywords" order-by-list-name="orderByList"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonProductDecorator"  location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/product/EditProductKeyword.ftl"/></html>
-                        </platform-specific>
+                      <container>
+                          <link target="UpdateProductKeywords?UPDATE_MODE=CREATE&amp;PRODUCT_ID=${productId}&amp;productId=${productId}" text="${uiLabelMap.ProductReInduceKeywords}" style="buttontext"/>
+                          <link target="UpdateProductKeywords?UPDATE_MODE=DELETE&amp;PRODUCT_ID=${productId}&amp;productId=${productId}" text="${uiLabelMap.ProductDeleteAllKeywords}" style="buttontext"/>
+                      </container>
+                      <container>
+                          <label style="head2">${uiLabelMap.ProductAddProductKeyword}</label>
+                      </container>
+                      <include-form name="AddProductKeyword" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                      <include-form name="UpdateProductKeyword" location="component://product/webapp/catalog/product/ProductForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
@@ -489,7 +497,6 @@
     
                 <set field="productId" from-field="parameters.productId"/>
                 <entity-one entity-name="Product" value-name="product"/>
-                
                 <entity-condition entity-name="GoodIdentification" list-name="goodIdentifications">
                     <condition-expr field-name="productId" env-name="productId"/>
                     <order-by field-name="goodIdentificationTypeId"/>
@@ -502,9 +509,11 @@
             <widgets>
                 <decorator-screen name="CommonProductDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/product/EditProductGoodIdentifications.ftl"/></html>
-                        </platform-specific>
+                        <include-form name="UpdateProductGoodIdentifications" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                        <container>
+                            <label style="head2">${uiLabelMap.PageTitleCreateProductGoodIdentifications}</label>
+                        </container>
+                        <include-form name="AddProductGoodIdentification" location="component://product/webapp/catalog/product/ProductForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>