svn commit: r1175130 - /ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl

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

svn commit: r1175130 - /ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl

jleroux@apache.org
Author: jleroux
Date: Sat Sep 24 08:43:22 2011
New Revision: 1175130

URL: http://svn.apache.org/viewvc?rev=1175130&view=rev
Log:
For a better formatting of breadcrumbs in all cases, fixes a bug introduced (for Visual themes) at r737506

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=1175130&r1=1175129&r2=1175130&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Sat Sep 24 08:43:22 2011
@@ -17,14 +17,20 @@ specific language governing permissions
 under the License.
 -->
 <div class="breadcrumbs">
+<#assign isDefaultTheme = !layoutSettings.VT_FTR_TMPLT_LOC?contains("multiflex")>        
+<#if isDefaultTheme>
+  <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">${uiLabelMap.CommonMain}</a> &gt;
+<#else>
   <ul>
     <li>
-      <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">${uiLabelMap.CommonMain}</a> &gt;
+      <a href="<@ofbizUrl>main</@ofbizUrl>" class="linktext">${uiLabelMap.CommonMain}</a>
     </li>
+</#if>    
     <#-- Show the category branch -->
     <#assign crumbs = Static["org.ofbiz.product.category.CategoryWorker"].getTrail(request)/>
     <#list crumbs as crumb>
          <#if catContentWrappers?exists && catContentWrappers[crumb]?exists>
+            <#if !isDefaultTheme>        
               <li>
                  <a href="<@ofbizCatalogUrl currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>" class="<#if crumb_has_next>linktext<#else>buttontextdisabled</#if>">
                    <#if catContentWrappers[crumb].get("CATEGORY_NAME")?exists>
@@ -36,12 +42,28 @@ under the License.
                    </#if>
                  </a>
               </li>
-              <#assign previousCategoryId = crumb />
+            <#else>  
+               <a href="<@ofbizCatalogUrl currentCategoryId=crumb previousCategoryId=previousCategoryId!""/>" class="<#if crumb_has_next>linktext<#else>buttontextdisabled</#if>">
+                 <#if catContentWrappers[crumb].get("CATEGORY_NAME")?exists>
+                   ${catContentWrappers[crumb].get("CATEGORY_NAME")}
+                 <#elseif catContentWrappers[crumb].get("DESCRIPTION")?exists>
+                   ${catContentWrappers[crumb].get("DESCRIPTION")}
+                 <#else>
+                   ${crumb}
+                 </#if>
+               </a>
+               <#if crumb_has_next> &gt;</#if>              
+            </#if>  
+            <#assign previousCategoryId = crumb />
          </#if>
     </#list>    
     <#-- Show the product, if there is one -->
     <#if productContentWrapper?exists>
-    <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
+      <#if isDefaultTheme>        
+         &nbsp;&gt; ${productContentWrapper.get("PRODUCT_NAME")?if_exists}
+      <#else>
+          <li>${productContentWrapper.get("PRODUCT_NAME")?if_exists}</li>
+        </ul>  
+      </#if>
     </#if>
-  </ul>  
 </div>