You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/09/24 14:31:40 UTC

svn commit: r818462 - /ofbiz/branches/release09.04/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl

Author: ashish
Date: Thu Sep 24 12:31:39 2009
New Revision: 818462

URL: http://svn.apache.org/viewvc?rev=818462&view=rev
Log:
Applied fix from trunk revision: 818457.
Applied patch from jira issue - OFBIZ-2966 - User Friendly Urls on Breadcrumbs of ecommerce/order manager.
Thanks Chirag and Rishi for the contribution.

Modified:
    ofbiz/branches/release09.04/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl

Modified: ofbiz/branches/release09.04/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=818462&r1=818461&r2=818462&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original)
+++ ofbiz/branches/release09.04/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Thu Sep 24 12:31:39 2009
@@ -23,27 +23,23 @@
 <#-- looping macro -->
 <#macro categoryList parentCategory category>
   <#if parentCategory.productCategoryId != category.productCategoryId>
-    <#local pStr = "/~pcategory=" + parentCategory.productCategoryId>
+    <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, parentCategory.productCategoryId) />
+  <#else>
+    <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, "") />
   </#if>
 
   <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)>
     <li>
-    <#if curCategoryId?exists && curCategoryId == category.productCategoryId>
-        <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists>
-            <a href="<@o...@ofbizUrl>" class="buttontextdisabled">${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")}</a>
-        <#elseif catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>
-            <a href="<@o...@ofbizUrl>" class="buttontextdisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a>
+    <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists>
+      <a href="${categoryUrl}" class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext</#if>">
+        <#if catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists>
+          ${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")}
+        <#elseif catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>
+          ${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}
         <#else>
-            <a href="<@o...@ofbizUrl>" class="buttontextdisabled">${category.description?if_exists}</a>
-        </#if>
-    <#else>
-        <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists>
-            <a href="<@o...@ofbizUrl>" class="linktext">${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")}</a>
-        <#elseif catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>
-            <a href="<@o...@ofbizUrl>" class="linktext">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a>
-        <#else>
-            <a href="<@o...@ofbizUrl>" class="linktext">${category.description?if_exists}</a>
+          ${category.description?if_exists}
         </#if>
+      </a>
     </#if>
     </li>
     <#local subCatList = Static["org.ofbiz.product.category.CategoryWorker"].getRelatedCategoriesRet(request, "subCatList", category.getString("productCategoryId"), true)>