Author: jleroux
Date: Tue Sep 26 02:13:32 2006 New Revision: 449957 URL: http://svn.apache.org/viewvc?view=rev&rev=449957 Log: Closes I18n of categories Thanks to Si and Marco for their tests and help. In this last version I have added the breadcrumbs and a demo file. I have also commented some stuff in CategoryContentWrapper For more informations see https://issues.apache.org/jira/browse/OFBIZ-75 Added: incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml (with props) incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh (with props) Modified: incubator/ofbiz/trunk/ (props changed) incubator/ofbiz/trunk/applications/content/ofbiz-component.xml incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl incubator/ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/sidedeepcategory.ftl incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.bsh incubator/ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl Propchange: incubator/ofbiz/trunk/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Tue Sep 26 02:13:32 2006 @@ -1,3 +1,3 @@ ofbiz.jar bin - +patchDos.bat Added: incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml?view=auto&rev=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml (added) +++ incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml Tue Sep 26 02:13:32 2006 @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright 2001-2006 The Apache Software Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. +--> +<entity-engine-xml> + <!-- Gizmos category --> + <DataResource dataResourceId="DR100DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR100DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR100DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR100DESCFR" textData="Gizmos fr"/> + <ElectronicText dataResourceId="DR100DESCIT" textData="Gizmos it"/> + <ElectronicText dataResourceId="DR100DESCEN" textData="Gizmos en"/> + + <Content contentId="C100DESC" contentTypeId="DOCUMENT" dataResourceId="DR100DESCFR" description="DESCRIPTION FR Gizmos" localeString="fr" /> + <Content contentId="C100DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR100DESCIT" description="DESCRIPTION IT Gizmos" localeString="it" /> + <Content contentId="C100DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR100DESCEN" description="DESCRIPTION EN Gizmos" localeString="en"/> + + <ProductCategoryContent productCategoryId="100" contentId="C100DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C100DESC" contentIdTo="C100DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C100DESC" contentIdTo="C100DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Small Gizmos category --> + <DataResource dataResourceId="DR101DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR101DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR101DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR101DESCFR" textData="Petis Gizmos"/> + <ElectronicText dataResourceId="DR101DESCIT" textData="Piccolo Gizmos"/> + <ElectronicText dataResourceId="DR101DESCEN" textData="Small Gizmos"/> + + <Content contentId="C101DESC" contentTypeId="DOCUMENT" dataResourceId="DR101DESCFR" description="DESCRIPTION FR Petits Gizmos" localeString="fr" /> + <Content contentId="C101DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR101DESCIT" description="DESCRIPTION IT Piccolo Gizmos" localeString="it" /> + <Content contentId="C101DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR101DESCEN" description="DESCRIPTION EN Small Gizmos" localeString="en"/> + + <ProductCategoryContent productCategoryId="101" contentId="C101DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C101DESC" contentIdTo="C101DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C101DESC" contentIdTo="C101DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Large Gizmos category --> + <DataResource dataResourceId="DR102DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR102DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR102DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR102DESCFR" textData="Grands Gizmos"/> + <ElectronicText dataResourceId="DR102DESCIT" textData="Grande Gizmos"/> + <ElectronicText dataResourceId="DR102DESCEN" textData="Large Gizmos"/> + + <Content contentId="C102DESC" contentTypeId="DOCUMENT" dataResourceId="DR102DESCFR" description="DESCRIPTION FR Grands Gizmos" localeString="fr" /> + <Content contentId="C102DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR102DESCIT" description="DESCRIPTION IT Grande Gizmos" localeString="it" /> + <Content contentId="C102DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR102DESCEN" description="DESCRIPTION IT Large Gizmos" localeString="en"/> + + <ProductCategoryContent productCategoryId="102" contentId="C102DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C102DESC" contentIdTo="C102DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C102DESC" contentIdTo="C102DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Widgets category --> + <DataResource dataResourceId="DR200DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR200DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR200DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR200DESCFR" textData="Widgets fr"/> + <ElectronicText dataResourceId="DR200DESCIT" textData="Widgets it"/> + <ElectronicText dataResourceId="DR200DESCEN" textData="Widgets en"/> + + <Content contentId="C200DESC" contentTypeId="DOCUMENT" dataResourceId="DR200DESCFR" description="DESCRIPTION FR Gizmos" localeString="fr" /> + <Content contentId="C200DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR200DESCIT" description="DESCRIPTION IT Gizmos" localeString="it" /> + <Content contentId="C200DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR200DESCEN" description="DESCRIPTION EN Gizmos" localeString="en"/> + + <ProductCategoryContent productCategoryId="200" contentId="C200DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C200DESC" contentIdTo="C200DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C200DESC" contentIdTo="C200DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Small Widgets category --> + <DataResource dataResourceId="DR201DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR201DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR201DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR201DESCFR" textData="Petis Widgets"/> + <ElectronicText dataResourceId="DR201DESCIT" textData="Piccolo Widgets"/> + <ElectronicText dataResourceId="DR201DESCEN" textData="Small Widgets"/> + + <Content contentId="C201DESC" contentTypeId="DOCUMENT" dataResourceId="DR201DESCFR" description="DESCRIPTION FR Petits Widgets" localeString="fr" /> + <Content contentId="C201DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR201DESCIT" description="DESCRIPTION IT Piccolo Widgets" localeString="it" /> + <Content contentId="C201DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR201DESCEN" description="DESCRIPTION EN Small Widgets" localeString="en"/> + + <ProductCategoryContent productCategoryId="201" contentId="C201DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C201DESC" contentIdTo="C201DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C201DESC" contentIdTo="C201DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Other Mini Widgets category --> + <DataResource dataResourceId="DR2012DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR2012DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR2012DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR2012DESCFR" textData="Autre Mini Widgets"/> + <ElectronicText dataResourceId="DR2012DESCIT" textData="Altro Mini Widgets"/> + <ElectronicText dataResourceId="DR2012DESCEN" textData="Other Mini Widgets"/> + + <Content contentId="C2012DESC" contentTypeId="DOCUMENT" dataResourceId="DR2012DESCFR" description="DESCRIPTION FR Autre Mini Widgets" localeString="fr" /> + <Content contentId="C2012DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR2012DESCIT" description="DESCRIPTION IT Altro Piccolo Widgets" localeString="it" /> + <Content contentId="C2012DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR2012DESCEN" description="DESCRIPTION EN Other Mini Widgets" localeString="en"/> + + <ProductCategoryContent productCategoryId="2012" contentId="C2012DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C2012DESC" contentIdTo="C2012DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C2012DESC" contentIdTo="C2012DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Mini Widgets category --> + <DataResource dataResourceId="DR2011DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR2011DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR2011DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR2011DESCFR" textData="Mini Widgets fr"/> + <ElectronicText dataResourceId="DR2011DESCIT" textData="Mini Widgets it"/> + <ElectronicText dataResourceId="DR2011DESCEN" textData="Mini Widgets en"/> + + <Content contentId="C2011DESC" contentTypeId="DOCUMENT" dataResourceId="DR2011DESCFR" description="DESCRIPTION FR Mini Widgets" localeString="fr" /> + <Content contentId="C2011DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR2011DESCIT" description="DESCRIPTION IT Mini Widgets" localeString="it" /> + <Content contentId="C2011DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR2011DESCEN" description="DESCRIPTION EN Mini Widgets" localeString="en"/> + + <ProductCategoryContent productCategoryId="2011" contentId="C2011DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C2011DESC" contentIdTo="C2011DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C2011DESC" contentIdTo="C2011DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Micro Widgets category --> + <DataResource dataResourceId="DR20111DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR20111DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR20111DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR20111DESCFR" textData="Micro Widgets fr"/> + <ElectronicText dataResourceId="DR20111DESCIT" textData="Micro Widgets it"/> + <ElectronicText dataResourceId="DR20111DESCEN" textData="Micro Widgets en"/> + + <Content contentId="C20111DESC" contentTypeId="DOCUMENT" dataResourceId="DR20111DESCFR" description="DESCRIPTION FR Micro Widgets" localeString="fr" /> + <Content contentId="C20111DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR20111DESCIT" description="DESCRIPTION IT Micro Widgets" localeString="it" /> + <Content contentId="C20111DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR20111DESCEN" description="DESCRIPTION EN Micro Widgets" localeString="en"/> + + <ProductCategoryContent productCategoryId="20111" contentId="C20111DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C20111DESC" contentIdTo="C20111DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C20111DESC" contentIdTo="C20111DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Large Widgets category --> + <DataResource dataResourceId="DR202DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DR202DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DR202DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DR202DESCFR" textData="Grands Widgets"/> + <ElectronicText dataResourceId="DR202DESCIT" textData="Grande Widgets"/> + <ElectronicText dataResourceId="DR202DESCEN" textData="Large Widgets"/> + + <Content contentId="C202DESC" contentTypeId="DOCUMENT" dataResourceId="DR202DESCFR" description="DESCRIPTION FR Grands Widgets" localeString="fr" /> + <Content contentId="C202DESCIT" contentTypeId="DOCUMENT" dataResourceId="DR202DESCIT" description="DESCRIPTION IT Grande Widgets" localeString="it" /> + <Content contentId="C202DESCEN" contentTypeId="DOCUMENT" dataResourceId="DR202DESCEN" description="DESCRIPTION IT Large Widgets" localeString="en"/> + + <ProductCategoryContent productCategoryId="202" contentId="C202DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="C202DESC" contentIdTo="C202DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="C202DESC" contentIdTo="C202DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Gift Cards category --> + <DataResource dataResourceId="DRGC-100DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DRGC-100DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DRGC-100DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DRGC-100DESCFR" textData="Cartes cadeau"/> + <ElectronicText dataResourceId="DRGC-100DESCIT" textData="Carte regalo"/> + <ElectronicText dataResourceId="DRGC-100DESCEN" textData="Gift Cards"/> + + <Content contentId="CGC-100DESC" contentTypeId="DOCUMENT" dataResourceId="DRGC-100DESCFR" description="DESCRIPTION FR Cartes cadeau" localeString="fr" /> + <Content contentId="CGC-100DESCIT" contentTypeId="DOCUMENT" dataResourceId="DRGC-100DESCIT" description="DESCRIPTION IT Carte regalo" localeString="it" /> + <Content contentId="CGC-100DESCEN" contentTypeId="DOCUMENT" dataResourceId="DRGC-100DESCEN" description="DESCRIPTION EN Gift Cards" localeString="en"/> + + <ProductCategoryContent productCategoryId="GC-100" contentId="CGC-100DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="CGC-100DESC" contentIdTo="CGC-100DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="CGC-100DESC" contentIdTo="CGC-100DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Gift Cards Reload category --> + <DataResource dataResourceId="DRGC-101DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DRGC-101DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DRGC-101DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DRGC-101DESCFR" textData="Rechargement de carte cadeau"/> + <ElectronicText dataResourceId="DRGC-101DESCIT" textData="Ricaricano di carte regalo"/> + <ElectronicText dataResourceId="DRGC-101DESCEN" textData="Gift Cards Reload"/> + + <Content contentId="CGC-101DESC" contentTypeId="DOCUMENT" dataResourceId="DRGC-101DESCFR" description="DESCRIPTION FR Rechargement de cartes cadeau" localeString="fr" /> + <Content contentId="CGC-101DESCIT" contentTypeId="DOCUMENT" dataResourceId="DRGC-101DESCIT" description="DESCRIPTION IT Ricaricano di carte regalo" localeString="it" /> + <Content contentId="CGC-101DESCEN" contentTypeId="DOCUMENT" dataResourceId="DRGC-101DESCEN" description="DESCRIPTION EN Gift Cards Reload" localeString="en"/> + + <ProductCategoryContent productCategoryId="GC-101" contentId="CGC-101DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="CGC-101DESC" contentIdTo="CGC-101DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="CGC-101DESC" contentIdTo="CGC-101DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Gift Cards Purchase category --> + <DataResource dataResourceId="DRGC-102DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DRGC-102DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DRGC-102DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DRGC-102DESCFR" textData="Achat de carte cadeau"/> + <ElectronicText dataResourceId="DRGC-102DESCIT" textData="Acquisto di carta regalo"/> + <ElectronicText dataResourceId="DRGC-102DESCEN" textData="Gift Cards Purchase"/> + + <Content contentId="CGC-102DESC" contentTypeId="DOCUMENT" dataResourceId="DRGC-102DESCFR" description="DESCRIPTION FR Achat de carte cadeau" localeString="fr" /> + <Content contentId="CGC-102DESCIT" contentTypeId="DOCUMENT" dataResourceId="DRGC-102DESCIT" description="DESCRIPTION IT Acquisto di carta regalo" localeString="it" /> + <Content contentId="CGC-102DESCEN" contentTypeId="DOCUMENT" dataResourceId="DRGC-102DESCEN" description="DESCRIPTION IT Gift Cards Purchase" localeString="en"/> + + <ProductCategoryContent productCategoryId="GC-102" contentId="CGC-102DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="CGC-102DESC" contentIdTo="CGC-102DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="CGC-102DESC" contentIdTo="CGC-102DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + + <!-- Configurables PCs category --> + <DataResource dataResourceId="DRPC-100DESCFR" dataResourceTypeId="ELECTRONIC_TEXT" localeString="fr"/> + <DataResource dataResourceId="DRPC-100DESCIT" dataResourceTypeId="ELECTRONIC_TEXT" localeString="it"/> + <DataResource dataResourceId="DRPC-100DESCEN" dataResourceTypeId="ELECTRONIC_TEXT" localeString="en"/> + + <ElectronicText dataResourceId="DRPC-100DESCFR" textData="PC configurables"/> + <ElectronicText dataResourceId="DRPC-100DESCIT" textData="Computer configurabili"/> + <ElectronicText dataResourceId="DRPC-100DESCEN" textData="Configurables PCs"/> + + <Content contentId="CPC-100DESC" contentTypeId="DOCUMENT" dataResourceId="DRPC-100DESCFR" description="DESCRIPTION FR PC configurables" localeString="fr" /> + <Content contentId="CPC-100DESCIT" contentTypeId="DOCUMENT" dataResourceId="DRPC-100DESCIT" description="DESCRIPTION IT Computer configurabili" localeString="it" /> + <Content contentId="CPC-100DESCEN" contentTypeId="DOCUMENT" dataResourceId="DRPC-100DESCEN" description="DESCRIPTION EN Configurables PCs" localeString="en"/> + + <ProductCategoryContent productCategoryId="PC-100" contentId="CPC-100DESC" prodCatContentTypeId="DESCRIPTION" fromDate="2006-09-22 00:00:00.0"/> + + <ContentAssoc contentId="CPC-100DESC" contentIdTo="CPC-100DESCIT" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + <ContentAssoc contentId="CPC-100DESC" contentIdTo="CPC-100DESCEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-09-22 00:00:00.0"/> + +</entity-engine-xml> Propchange: incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/applications/content/data/DemoCategoriesI18nData.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: incubator/ofbiz/trunk/applications/content/ofbiz-component.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/ofbiz-component.xml?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/content/ofbiz-component.xml (original) +++ incubator/ofbiz/trunk/applications/content/ofbiz-component.xml Tue Sep 26 02:13:32 2006 @@ -39,6 +39,7 @@ <entity-resource type="data" reader-name="demo" loader="main" location="data/WebSitePublishPointData.xml"/> <entity-resource type="data" reader-name="demo" loader="main" location="data/CompDocData.xml"/> <entity-resource type="data" reader-name="demo" loader="main" location="data/ForumDemoData.xml"/> + <entity-resource type="data" reader-name="demo" loader="main" location="data/DemoCategoriesI18nData.xml"/> <service-resource type="model" loader="main" location="servicedef/services.xml"/> <service-resource type="model" loader="main" location="servicedef/services_contenttypes.xml"/> <service-resource type="model" loader="main" location="servicedef/services_email.xml"/> Modified: incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl (original) +++ incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl Tue Sep 26 02:13:32 2006 @@ -31,11 +31,15 @@ <#assign category = delegator.findByPrimaryKeyCache("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", categoryId))?if_exists> <#if category?has_content> <div> - <span class="browsecategorytext">- </span> - <a href="<@ofbizUrl>category/~category_id=${categoryId}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + <span class="browsecategorytext">- </span> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + <a href="<@ofbizUrl>category/~category_id=${categoryId}</@ofbizUrl>" class="browsecategorybutton">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#else> + <a href="<@ofbizUrl>category/~category_id=${categoryId}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + </#if> </div> </#if> </#list> </div> - </div> + </div> </#if> Modified: incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl (original) +++ incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl Tue Sep 26 02:13:32 2006 @@ -23,16 +23,25 @@ <#if parentCategory.productCategoryId != category.productCategoryId> <#local pStr = "/~pcategory=" + parentCategory.productCategoryId> </#if> + <#if curCategoryId?exists && curCategoryId == category.productCategoryId> <div class="browsecategorytext"> - - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists}</a> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#else> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists}</a> + </#if> </div> <#else> <div class="browsecategorytext"> - - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#else> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + </#if> </div> </#if> - + <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)> <#local subCatList = Static["org.ofbiz.product.category.CategoryWorker"].getRelatedCategoriesRet(request, "subCatList", category.getString("productCategoryId"), true)> <#if subCatList?exists> Modified: incubator/ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml (original) +++ incubator/ofbiz/trunk/applications/ecommerce/widget/CatalogScreens.xml Tue Sep 26 02:13:32 2006 @@ -142,6 +142,7 @@ <section> <actions> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh"/> </actions> <widgets> <platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl"/></html></platform-specific> Added: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh?view=auto&rev=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh (added) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh Tue Sep 26 02:13:32 2006 @@ -0,0 +1,33 @@ +/* + * + * Copyright 2001-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/* + * This script is also referenced by the ecommerce's screens and + * should not contain order component's specific code. + */ + +import org.ofbiz.base.util.*; +import org.ofbiz.product.catalog.*; +import org.ofbiz.product.category.*; + +requestParameters = UtilHttp.getParameterMap(request); +catIterator = UtilMisc.toIterator(request.getAttribute("topLevelList")); +if(catIterator != null) { + catContentWrappers = new HashMap(); + catContentWrappers = CategoryWorker.getCategoryContentWrappers(catContentWrappers, catIterator, request); + context.put("catContentWrappers", catContentWrappers); +} Propchange: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/sidedeepcategory.bsh Tue Sep 26 02:13:32 2006 @@ -30,3 +30,10 @@ curCategoryId = UtilFormatOut.checkNull(requestParameters.get("category_id"), requestParameters.get("CATEGORY_ID")); request.setAttribute("curCategoryId", curCategoryId); CategoryWorker.setTrail(request, curCategoryId); + +catIterator = UtilMisc.toIterator(request.getAttribute("topLevelList")); +if(catIterator != null) { + catContentWrappers = new HashMap(); + catContentWrappers = CategoryWorker.getCategoryContentWrappers(catContentWrappers, catIterator, request); + context.put("catContentWrappers", catContentWrappers); +} Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Tue Sep 26 02:13:32 2006 @@ -26,9 +26,17 @@ <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)> <#if curCategoryId?exists && curCategoryId == category.productCategoryId> - -> <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="buttontextdisabled">${category.description?if_exists}</a> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + -> <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="buttontextdisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#else> + -> <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="buttontextdisabled">${category.description?if_exists}</a> + </#if> <#else> - -> <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="linktext">${category.description?if_exists}</a> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + -> <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="linktext">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#else> + -> <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="linktext">${category.description?if_exists}</a> + </#if> </#if> <#local subCatList = Static["org.ofbiz.product.category.CategoryWorker"].getRelatedCategoriesRet(request, "subCatList", category.getString("productCategoryId"), true)> <#if subCatList?exists> Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/sidedeepcategory.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/sidedeepcategory.ftl?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/sidedeepcategory.ftl (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/sidedeepcategory.ftl Tue Sep 26 02:13:32 2006 @@ -25,19 +25,35 @@ </#if> <#if curCategoryId?exists && curCategoryId == category.productCategoryId> <div class="browsecategorytext"> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + <#if sessionAttributes.shoppingCart?exists && sessionAttributes.shoppingCart.isPurchaseOrder()> + - <a href="<@ofbizUrl>keywordsearch/~SEARCH_CATEGORY_ID=${category.productCategoryId}/~SEARCH_SUPPLIER_ID=${sessionAttributes.shoppingCart.partyId?if_exists}/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + <#else> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> + </#if> + <#else> <#if sessionAttributes.shoppingCart?exists && sessionAttributes.shoppingCart.isPurchaseOrder()> - - <a href="<@ofbizUrl>keywordsearch/~SEARCH_CATEGORY_ID=${category.productCategoryId}/~SEARCH_SUPPLIER_ID=${sessionAttributes.shoppingCart.partyId?if_exists}/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists}</a> + - <a href="<@ofbizUrl>keywordsearch/~SEARCH_CATEGORY_ID=${category.productCategoryId}/~SEARCH_SUPPLIER_ID=${sessionAttributes.shoppingCart.partyId?if_exists}/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists}</a> <#else> - - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists}</a> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists}</a> </#if> + </#if> </div> <#else> <div class="browsecategorytext"> + <#if catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> <#if sessionAttributes.shoppingCart?exists && sessionAttributes.shoppingCart.isPurchaseOrder()> - - <a href="<@ofbizUrl>keywordsearch/~SEARCH_CATEGORY_ID=${category.productCategoryId}/~SEARCH_SUPPLIER_ID=${sessionAttributes.shoppingCart.partyId?if_exists}/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + - <a href="<@ofbizUrl>keywordsearch/~SEARCH_CATEGORY_ID=${category.productCategoryId}/~SEARCH_SUPPLIER_ID=${sessionAttributes.shoppingCart.partyId?if_exists}/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> <#else> - - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a> </#if> + <#else> + <#if sessionAttributes.shoppingCart?exists && sessionAttributes.shoppingCart.isPurchaseOrder()> + - <a href="<@ofbizUrl>keywordsearch/~SEARCH_CATEGORY_ID=${category.productCategoryId}/~SEARCH_SUPPLIER_ID=${sessionAttributes.shoppingCart.partyId?if_exists}/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + <#else> + - <a href="<@ofbizUrl>category/~category_id=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a> + </#if> + </#if> </div> </#if> Modified: incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml (original) +++ incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml Tue Sep 26 02:13:32 2006 @@ -65,6 +65,9 @@ <screen name="breadcrumbs"> <section> + <actions> + <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/breadcrumbs.bsh"/> + </actions> <widgets> <platform-specific><html><html-template location="component://order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl"/></html></platform-specific> </widgets> Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java (original) +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryContentWrapper.java Tue Sep 26 02:13:32 2006 @@ -68,9 +68,9 @@ this.productCategory = productCategory; this.locale = UtilHttp.getLocale(request); this.mimeTypeId = "text/html"; - System.out.println(productCategory); - System.out.println(locale); - System.out.println(mimeTypeId); + /*System.out.println(productCategory); + System.out.println(locale); + System.out.println(mimeTypeId);*/ } public String get(String prodCatContentTypeId) { Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original) +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Tue Sep 26 02:13:32 2006 @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -421,5 +422,23 @@ } } return newList; + } + + public static HashMap getCategoryContentWrappers(HashMap catContentWrappers, Iterator catIterator, HttpServletRequest request) throws GenericEntityException { + while(catIterator.hasNext()) { + GenericValue cat = (GenericValue) catIterator.next(); + CategoryContentWrapper catContentWrapper = new CategoryContentWrapper(cat, request); + String id = (String) cat.get("productCategoryId"); + catContentWrappers.put(id, catContentWrapper); + ArrayList subCat = new ArrayList(); + subCat = getRelatedCategoriesRet(request, "subCatList", id, true); + if(subCat != null) { + Iterator subCatIterator = UtilMisc.toIterator(subCat); + if(subCatIterator != null) { + getCategoryContentWrappers(catContentWrappers, subCatIterator, request ); + } + } + } + return catContentWrappers; } } Modified: incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.bsh?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.bsh (original) +++ incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.bsh Tue Sep 26 02:13:32 2006 @@ -48,3 +48,10 @@ context.put("curCategoryId", curCategoryId); context.put("currentTopCategory", currentTopCategory); + +catIterator = UtilMisc.toIterator(request.getAttribute("topLevelList")); +if(catIterator != null) { + catContentWrappers = new HashMap(); + catContentWrappers = CategoryWorker.getCategoryContentWrappers(catContentWrappers, catIterator, request); + context.put("catContentWrappers", catContentWrappers); +} Modified: incubator/ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl?view=diff&rev=449957&r1=449956&r2=449957 ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl (original) +++ incubator/ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl Tue Sep 26 02:13:32 2006 @@ -23,11 +23,19 @@ </#if> <#if curCategoryId?exists && curCategoryId == category.productCategoryId> <div class="browsecategorytext"> - - <a href="<@ofbizUrl>EditCategory?productCategoryId=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists} [${category.productCategoryId}]</a> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + - <a href="<@ofbizUrl>EditCategory?productCategoryId=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")} [${category.productCategoryId}]</a> + <#else> + - <a href="<@ofbizUrl>EditCategory?productCategoryId=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybuttondisabled">${category.description?if_exists} [${category.productCategoryId}]</a> + </#if> </div> <#else> <div class="browsecategorytext"> - - <a href="<@ofbizUrl>EditCategory?productCategoryId=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists} [${category.productCategoryId}]</a> + <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> + - <a href="<@ofbizUrl>EditCategory?productCategoryId=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")} [${category.productCategoryId}]</a> + <#else> + - <a href="<@ofbizUrl>EditCategory?productCategoryId=${category.productCategoryId}${pStr?if_exists}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists} [${category.productCategoryId}]</a> + </#if> </div> </#if> |
Free forum by Nabble | Edit this page |