svn commit: r581958 - in /ofbiz/trunk/applications/product: webapp/catalog/promo/FindProductPromoCode.ftl webapp/catalog/promo/PromoForms.xml widget/catalog/PromoScreens.xml

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

svn commit: r581958 - in /ofbiz/trunk/applications/product: webapp/catalog/promo/FindProductPromoCode.ftl webapp/catalog/promo/PromoForms.xml widget/catalog/PromoScreens.xml

jacopoc
Author: jacopoc
Date: Thu Oct  4 09:07:33 2007
New Revision: 581958

URL: http://svn.apache.org/viewvc?rev=581958&view=rev
Log:
Partially converted to widgets one of the product promo code screens.

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl
    ofbiz/trunk/applications/product/webapp/catalog/promo/PromoForms.xml
    ofbiz/trunk/applications/product/widget/catalog/PromoScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl?rev=581958&r1=581957&r2=581958&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/promo/FindProductPromoCode.ftl Thu Oct  4 09:07:33 2007
@@ -17,40 +17,6 @@
 under the License.
 -->
 <#if productPromoId?exists>
-    <div>
-        <#if manualOnly?if_exists == "Y">
-            <a href="<@ofbizUrl>FindProductPromoCode?manualOnly=N&productPromoId=${productPromoId?if_exists}</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductPromotionManualImported}]</a>
-        <#else>
-            <a href="<@ofbizUrl>FindProductPromoCode?manualOnly=Y&productPromoId=${productPromoId?if_exists}</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductPromotionManual}</a>
-        </#if>
-    </div>
-    <br/>
-    <table border="1" cellpadding="2" cellspacing="0">
-        <tr>
-            <td><div class="tabletext"><b>${uiLabelMap.ProductPromotionCode}</b></div></td>
-            <td><div class="tabletext"><b>${uiLabelMap.ProductPromotionPerCode}</b></div></td>
-            <td><div class="tabletext"><b>${uiLabelMap.ProductPromotionPerCustomer}</b></div></td>
-            <td><div class="tabletext"><b>${uiLabelMap.ProductPromotionReqEmailOrParty}</b></div></td>
-            <td><div class="tabletext"><b>${uiLabelMap.CommonCreated}</b></div></td>
-            <td><div class="tabletext">&nbsp;</div></td>
-        </tr>
-        <#list productPromoCodes as productPromoCode>
-            <#assign productPromo = productPromoCode.getRelatedOne("ProductPromo")>
-            <tr valign="middle">
-                <td><div class='tabletext'>&nbsp;<a href="<@ofbizUrl>EditProductPromoCode?productPromoCodeId=${(productPromoCode.productPromoCodeId)?if_exists}</@ofbizUrl>" class="buttontext">[${(productPromoCode.productPromoCodeId)?if_exists}]</a></div></td>
-                <td><div class='tabletext'>&nbsp;${(productPromoCode.useLimitPerCode)?if_exists}</div></td>
-                <td><div class='tabletext'>&nbsp;${(productPromoCode.useLimitPerCustomer)?if_exists}</div></td>
-                <td><div class='tabletext'>&nbsp;${(productPromoCode.requireEmailOrParty)?if_exists}</div></td>
-                <td><div class='tabletext'>&nbsp;${(productPromoCode.createdDate)?if_exists}</div></td>
-                <td>
-                    <a href='<@ofbizUrl>EditProductPromoCode?productPromoCodeId=${(productPromoCode.productPromoCodeId)?if_exists}</@ofbizUrl>' class="buttontext">[${uiLabelMap.CommonEdit}]</a>
-                    <a href='<@ofbizUrl>deleteProductPromoCode?productPromoCodeId=${(productPromoCode.productPromoCodeId)?if_exists}&productPromoId=${productPromoId?if_exists}</@ofbizUrl>' class="buttontext">[${uiLabelMap.CommonDelete}]</a>
-                </td>
-            </tr>
-        </#list>
-    </table>
-    <br/>
-
     <h3>${uiLabelMap.ProductPromotionUploadSetOfPromotionCodes}:</h3>
     <div class="tabletext">
         <form method="post" action="<@ofbizUrl>createBulkProductPromoCode</@ofbizUrl>" enctype="multipart/form-data" style="margin: 0;">

Modified: ofbiz/trunk/applications/product/webapp/catalog/promo/PromoForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/promo/PromoForms.xml?rev=581958&r1=581957&r2=581958&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/promo/PromoForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/promo/PromoForms.xml Thu Oct  4 09:07:33 2007
@@ -84,4 +84,17 @@
             <display description="[${productPromoCode.createdByUserLogin}] ${uiLabelMap.CommonOn} ${productPromoCode.createdDate}" also-hidden="false"/>
         </field>
     </form>
+    
+    <form name="ListProductPromoCodes" type="list" title="" list-name="productPromoCodes">
+        <auto-fields-entity entity-name="ProductPromoCode" default-field-type="display"/>
+        <field name="productPromoId"><hidden/></field>
+        <field name="productPromoCodeId" widget-style="buttontext">
+            <hyperlink target="EditProductPromoCode?productPromoCodeId=${productPromoCodeId}"
+                description="${productPromoCodeId}" also-hidden="false"/>
+        </field>
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="deleteProductPromoCode?productPromoCodeId=${productPromoCodeId}&amp;productPromoId=${productPromoId}"
+                description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/product/widget/catalog/PromoScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/PromoScreens.xml?rev=581958&r1=581957&r2=581958&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/PromoScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/PromoScreens.xml Thu Oct  4 09:07:33 2007
@@ -47,7 +47,7 @@
                                             <label style="head1">${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${productPromo.promoName} [${uiLabelMap.CommonId}:${productPromoId}]  ${${extraFunctionName}}</label>
                                         </container>
                                         <container>
-                                            <link target="EditProductPromo" text="[${uiLabelMap.ProductNewProductPromo}]" style="buttontext"/>
+                                            <link target="EditProductPromo" text="${uiLabelMap.ProductNewProductPromo}" style="buttontext"/>
                                         </container>
                                     </widgets>
                                 </section>
@@ -234,6 +234,22 @@
                         <container>
                             <link target="EditProductPromoCode?productPromoId=${productPromoId}" text="${uiLabelMap.ProductNewPromotionCode}" style="buttontext"/>
                         </container>
+                        <section>
+                            <condition>
+                                <if-compare field-name="manualOnly" operator="equals" value="Y"/>
+                            </condition>
+                            <widgets>
+                                <container>
+                                    <link target="FindProductPromoCode?manualOnly=N&amp;productPromoId=${productPromoId}" text="${uiLabelMap.ProductPromotionManualImported}" style="buttontext"/>
+                                </container>
+                            </widgets>
+                            <fail-widgets>
+                                <container>
+                                    <link target="FindProductPromoCode?manualOnly=Y&amp;productPromoId=${productPromoId}" text="${uiLabelMap.ProductPromotionManual}" style="buttontext"/>
+                                </container>
+                            </fail-widgets>
+                        </section>
+                        <include-form name="ListProductPromoCodes" location="component://product/webapp/catalog/promo/PromoForms.xml"/>
                         <platform-specific>
                             <html><html-template location="component://product/webapp/catalog/promo/FindProductPromoCode.ftl"/></html>
                         </platform-specific>