You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2008/07/27 08:33:34 UTC

svn commit: r680068 - in /ofbiz/trunk: applications/ecommerce/data/DemoProduct.xml applications/ecommerce/widget/CatalogScreens.xml applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl framework/images/webapp/images/ecommain.css

Author: jleroux
Date: Sat Jul 26 23:33:34 2008
New Revision: 680068

URL: http://svn.apache.org/viewvc?rev=680068&view=rev
Log:
A slightly modified enhancing patch from Bruno Busco " Matrix layout for Featured Products" (https://issues.apache.org/jira/browse/OFBIZ-1890) - OFBIZ-1890

Modified:
    ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
    ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
    ofbiz/trunk/framework/images/webapp/images/ecommain.css

Modified: ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml?rev=680068&r1=680067&r2=680068&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoProduct.xml Sat Jul 26 23:33:34 2008
@@ -127,7 +127,7 @@
         primaryParentCategoryId="201" productCategoryId="2012" productCategoryTypeId="CATALOG_CATEGORY"/>
     <ProductCategory longDescription="long description of Micro Widgets"
         primaryParentCategoryId="2011" productCategoryId="20111" productCategoryTypeId="CATALOG_CATEGORY"/>
-    <ProductCategory categoryName="Featured Products" productCategoryId="PROMOTIONS" productCategoryTypeId="CATALOG_CATEGORY"/>
+    <ProductCategory categoryName="Featured Products" productCategoryId="PROMOTIONS" productCategoryTypeId="CATALOG_CATEGORY" detailScreen="component://ecommerce/widget/CatalogScreens.xml#categorydetailmatrix"/>
     <ProductCategory categoryName="Demo Default Search"
         longDescription="Catalog1 Search Products - only products in this category will show up in a search in catalog1"
         productCategoryId="CATALOG1_SEARCH" productCategoryTypeId="SEARCH_CATEGORY"/>

Modified: ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml?rev=680068&r1=680067&r2=680068&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml Sat Jul 26 23:33:34 2008
@@ -213,6 +213,20 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="categorydetailmatrix">
+        <section>
+            <actions>
+                <set field="numCol" value="1"/>
+                <set field="searchInCategory" value="N"/>
+                <set field="parameters.VIEW_SIZE" from-field="parameters.VIEW_SIZE" default-value="9"/>
+            </actions>
+            <widgets>
+                <include-screen name="categorydetail"/>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="ProductCategoryLink">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=680068&r1=680067&r2=680068&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Sat Jul 26 23:33:34 2008
@@ -58,7 +58,9 @@
             <a href="javascript:document.thecategoryform.submit()" class="buttontext"><span style="white-space: nowrap;">${uiLabelMap.ProductAddProductsUsingDefaultQuantities}</span></a>
           </form>
         </#if>
-        <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.ProductSearchinCategory}</a>
+        <#if searchInCategory?default("Y") == "Y">
+          <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.ProductSearchinCategory}</a>
+        </#if>
     </h1>
   <#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION")?if_exists/>
   <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL")?if_exists/>
@@ -85,14 +87,31 @@
 
 <#if productCategoryMembers?has_content>
     <@paginationControls/>
-    <div class="productsummary-container">
+      <#assign numCol = numCol?default(1)>
+      <#assign numCol = numCol?number>
+      <#assign tabCol = 1>
+      <div class="productsummary-container <#if (numCol?int > 1)>matrix</#if>">
         <#list productCategoryMembers as productCategoryMember>
+          <#if (numCol?int == 1)>
             ${setRequestAttribute("optProductId", productCategoryMember.productId)}
             ${setRequestAttribute("productCategoryMember", productCategoryMember)}
             ${setRequestAttribute("listIndex", productCategoryMember_index)}
             ${screens.render(productsummaryScreen)}
+          <#else>
+            <table>
+              <#if (tabCol?int = 1)><tr></#if>
+                  <td>
+                      ${setRequestAttribute("optProductId", productCategoryMember.productId)}
+                      ${setRequestAttribute("productCategoryMember", productCategoryMember)}
+                      ${setRequestAttribute("listIndex", productCategoryMember_index)}
+                      ${screens.render(productsummaryScreen)}
+                  </td>
+              <#if (tabCol?int = numCol)></tr></#if>
+              <#assign tabCol = tabCol+1><#if (tabCol?int > numCol)><#assign tabCol = 1></#if>
+            </table>
+           </#if>
         </#list>
-    </div>
+      </div>
     <@paginationControls/>
 <#else>
     <div><hr class='sepbar'/></div>

Modified: ofbiz/trunk/framework/images/webapp/images/ecommain.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/ecommain.css?rev=680068&r1=680067&r2=680068&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/ecommain.css (original)
+++ ofbiz/trunk/framework/images/webapp/images/ecommain.css Sat Jul 26 23:33:34 2008
@@ -949,6 +949,30 @@
 text-align: left;
 }
 
+.matrix .productsummary {
+border: none;
+padding: 10px;
+height: 200px;
+width:  200px;
+}
+
+.matrix .productsummary .smallimage {
+float: none;
+text-align: center;
+}
+.matrix .productsummary .smallimage img {
+height: 100px;
+}
+
+.matrix .productsummary .productbuy {
+float: none;
+text-align: left;
+}
+
+.productsummary .productinfo {
+text-align: left;
+}
+
 /* ===== Product Detail Styles ===== */
 #productdetail #download-files {
 margin-top: 10px;