[OFBiz] SVN: r7765 - in trunk/applications: order/webapp/ordermgr/WEB-INF/actions/entry/catalog order/webapp/ordermgr/entry/catalog product/data product/src/org/ofbiz/product/category product/webapp/catalog/category
jonesde@svn.ofbiz.org
jonesde at svn.ofbiz.org
Sat Jun 10 10:48:22 CDT 2006
Author: jonesde
Date: 2006-06-10 10:48:12 -0500 (Sat, 10 Jun 2006)
New Revision: 7765
Modified:
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh
trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
trunk/applications/product/data/ProductTypeData.xml
trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java
trunk/applications/product/webapp/catalog/category/EditCategory.ftl
trunk/applications/product/webapp/catalog/category/EditCategoryContent.ftl
Log:
Some cleanups to the ProductCategoryContent stuff, and added use of it to the categorydetail template; still a couple of things to fix in the admin area for both ProductContent and ProductCategoryContent
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh 2006-06-10 08:31:55 UTC (rev 7764)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh 2006-06-10 15:48:12 UTC (rev 7765)
@@ -60,11 +60,12 @@
andMap.put("prodCatalogId", currentCatalogId);
andMap.put("checkViewAllow", Boolean.TRUE);
catResult = dispatcher.runSync("getProductCategoryAndLimitedMembers", andMap);
-
+
+productCategory = catResult.get("productCategory");
context.put("productCategoryId", request.getAttribute("productCategoryId"));
if (catResult != null) {
context.put("productCategoryMembers", catResult.get("productCategoryMembers"));
- context.put("productCategory", catResult.get("productCategory"));
+ context.put("productCategory", productCategory);
context.put("viewIndex", catResult.get("viewIndex"));
context.put("viewSize", catResult.get("viewSize"));
context.put("lowIndex", catResult.get("lowIndex"));
@@ -101,3 +102,6 @@
}
}
}
+
+CategoryContentWrapper categoryContentWrapper = new CategoryContentWrapper(productCategory, request);
+context.put("productContentWrapper", productContentWrapper);
Modified: trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl 2006-06-10 08:31:55 UTC (rev 7764)
+++ trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl 2006-06-10 15:48:12 UTC (rev 7765)
@@ -27,7 +27,8 @@
<#if productCategory?exists>
<div class="head1">
- ${productCategory.description?if_exists}
+ <div>${categoryContentWrapper.get("CATEGORY_NAME")?if_exists}</div>
+ <div>${categoryContentWrapper.get("DESCRIPTION")?if_exists}</div>
<#if hasQuantities?exists>
<form method="post" action="<@ofbizUrl>addCategoryDefaults<#if requestAttributes._CURRENT_VIEW_?exists>/${requestAttributes._CURRENT_VIEW_}</#if></@ofbizUrl>" name="thecategoryform" style='margin: 0;'>
<input type='hidden' name='add_category_id' value='${productCategory.productCategoryId}'/>
@@ -41,13 +42,15 @@
</#if>
<a href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${productCategory.productCategoryId}</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductSearchinCategory}</a>
</div>
- <#if productCategory.categoryImageUrl?exists || productCategory.longDescription?exists>
+ <#assign longDescription = categoryContentWrapper.get("LONG_DESCRIPTION")?if_exists/>
+ <#assign categoryImageUrl = categoryContentWrapper.get("CATEGORY_IMAGE_URL")?if_exists/>
+ <#if categoryImageUrl?has_content || longDescription?has_content>
<div class="tabletext">
- <#if productCategory.categoryImageUrl?exists>
- <img src='<@ofbizContentUrl>${productCategory.categoryImageUrl}</@ofbizContentUrl>' vspace='5' hspace='5' border='1' height='100' align='left'/>
+ <#if categoryImageUrl?has_content>
+ <img src='<@ofbizContentUrl>${categoryImageUrl}</@ofbizContentUrl>' vspace='5' hspace='5' border='1' height='100' align='left'/>
</#if>
- <#if productCategory.longDescription?exists>
- ${productCategory.longDescription}
+ <#if longDescription?has_content>
+ ${longDescription}
</#if>
</div>
</#if>
Modified: trunk/applications/product/data/ProductTypeData.xml
===================================================================
--- trunk/applications/product/data/ProductTypeData.xml 2006-06-10 08:31:55 UTC (rev 7764)
+++ trunk/applications/product/data/ProductTypeData.xml 2006-06-10 15:48:12 UTC (rev 7765)
@@ -155,9 +155,12 @@
<ProductCategoryType description="Cross Sell" hasTable="N" parentTypeId="" productCategoryTypeId="CROSS_SELL_CATEGORY"/>
<ProductCategoryType description="Tax" hasTable="N" parentTypeId="" productCategoryTypeId="TAX_CATEGORY"/>
+ <ProductCategoryContentType description="Category Name" hasTable="N" parentTypeId="" prodCatContentTypeId="CATEGORY_NAME"/>
<ProductCategoryContentType description="Description" hasTable="N" parentTypeId="" prodCatContentTypeId="DESCRIPTION"/>
<ProductCategoryContentType description="Description - Long" hasTable="N" parentTypeId="" prodCatContentTypeId="LONG_DESCRIPTION"/>
-
+ <ProductCategoryContentType description="Category Image URL" hasTable="N" parentTypeId="" prodCatContentTypeId="CATEGORY_IMAGE_URL"/>
+ <ProductCategoryContentType description="Footer" hasTable="N" parentTypeId="" prodCatContentTypeId="FOOTER"/>
+
<ProductContentType description="Online Access" hasTable="N" parentTypeId="" productContentTypeId="ONLINE_ACCESS"/>
<ProductContentType description="Digital Download" hasTable="N" parentTypeId="" productContentTypeId="DIGITAL_DOWNLOAD"/>
<ProductContentType description="Fulfillment Email" hasTable="N" parentTypeId="" productContentTypeId="FULFILLMENT_EMAIL"/>
Modified: trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java
===================================================================
--- trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java 2006-06-10 08:31:55 UTC (rev 7764)
+++ trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java 2006-06-10 15:48:12 UTC (rev 7765)
@@ -61,8 +61,6 @@
protected Locale locale;
protected String mimeTypeId;
-
-
public static CategoryContentWrapper makeCategoryContentWrapper(GenericValue productCategory, HttpServletRequest request) {
return new CategoryContentWrapper(productCategory, request);
}
@@ -155,4 +153,3 @@
}
}
}
-
Modified: trunk/applications/product/webapp/catalog/category/EditCategory.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/category/EditCategory.ftl 2006-06-10 08:31:55 UTC (rev 7764)
+++ trunk/applications/product/webapp/catalog/category/EditCategory.ftl 2006-06-10 15:48:12 UTC (rev 7765)
@@ -175,7 +175,7 @@
<td> </td>
<td width="74%">
<input type="text" <#if productCategory?has_content>value="${productCategory.detailScreen?if_exists}"</#if> name="detailScreen" size="60" maxlength="250" class="inputBox"/>
- <br/><span class="tabletext">${uiLabelMap.ProductDefaultsTo} "/catalog/categorydetail.ftl"</span>
+ <br/><span class="tabletext">${uiLabelMap.ProductDefaultsTo} "categorydetail", ${uiLabelMap.ProductDetailScreenMessage}: "component://ecommerce/widget/CatalogScreens.xml#categorydetail"</span>
</td>
</tr>
Modified: trunk/applications/product/webapp/catalog/category/EditCategoryContent.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/category/EditCategoryContent.ftl 2006-06-10 08:31:55 UTC (rev 7764)
+++ trunk/applications/product/webapp/catalog/category/EditCategoryContent.ftl 2006-06-10 15:48:12 UTC (rev 7765)
@@ -48,7 +48,6 @@
<td>${uiLabelMap.ProductUseDays}</td>
<td> </td>
</tr>
-
<#list categoryContentList as entry>
<#assign categoryContent=entry.categoryContent/>
<#assign prodCatContentType=categoryContent.getRelatedOneCache("ProductCategoryContentType")/>
@@ -65,7 +64,6 @@
<td><a href="/content/control/EditContent?contentId=${categoryContent.contentId}&externalLoginKey=${requestAttributes.externalLoginKey?if_exists}" class="buttontext">[${uiLabelMap.CommonEdit} ${uiLabelMap.Content} ${entry.content.contentId}]</td>
</tr>
</#list>
-
</table>
<div class="head2">${uiLabelMap.ProductAddProductCategoryContentFromDate}</div>
@@ -126,7 +124,5 @@
</tr>
</table>
</form>
-
<hr class="sepbar"/>
-
</#if>
More information about the Svn
mailing list