Author: jleroux
Date: Sun Jul 27 03:23:34 2008 New Revision: 680086 URL: http://svn.apache.org/viewvc?rev=680086&view=rev Log: An enhancing patch from Bruno Busco "Using screenlets in Catalog Manager Application" (https://issues.apache.org/jira/browse/OFBIZ-1880) - OFBIZ-1880 Added: ofbiz/trunk/applications/product/widget/catalog/Menus.xml (with props) Removed: ofbiz/trunk/applications/product/webapp/catalog/includes/appheader.ftl ofbiz/trunk/applications/product/widget/catalog/CatalogCommonScreens.xml Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/web.xml ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl ofbiz/trunk/applications/product/webapp/catalog/find/miniproductlist.ftl ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Sun Jul 27 03:23:34 2008 @@ -1730,8 +1730,6 @@ <view-map name="EditLayoutImage" page="component://content/widget/layout/LayoutScreens.xml#EditLayoutImage" type="screen"/> <view-map name="EditLayoutUrl" page="component://content/widget/layout/LayoutScreens.xml#EditLayoutUrl" type="screen"/> - <view-map name="FindContent" page="component://content/widget/content/ContentScreens.xml#FindContent" type="screen"/> - <view-map name="FindSurvey" page="component://content/widget/SurveyScreens.xml#FindSurvey" type="screen"/> <view-map name="EditSurvey" page="component://content/widget/SurveyScreens.xml#EditSurvey" type="screen"/> <view-map name="EditSurveyMultiResps" page="component://content/widget/SurveyScreens.xml#EditSurveyMultiResps" type="screen"/> Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/web.xml?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/web.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/web.xml Sun Jul 27 03:23:34 2008 @@ -41,7 +41,7 @@ </context-param> <context-param> <param-name>mainDecoratorLocation</param-name> - <param-value>component://product/widget/catalog/CatalogCommonScreens.xml</param-value> + <param-value>component://product/widget/catalog/CommonScreens.xml</param-value> <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description> </context-param> Modified: ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearchbox.ftl Sun Jul 27 03:23:34 2008 @@ -31,86 +31,64 @@ //--> </script> -<div class="screenlet"> - <div class="screenlet-header"> - <div class="simple-right-small"> - <#if isOpen> - <a href="<@ofbizUrl>main?SearchProductsState=close</@ofbizUrl>" class="lightbuttontext"> _ </a> - <#else> - <a href="<@ofbizUrl>main?SearchProductsState=open</@ofbizUrl>" class="lightbuttontext"> [] </a> - </#if> - </div> - <div class="boxhead">${uiLabelMap.ProductSearchProducts}</div> - </div> -<#if isOpen> - <div class="screenlet-body"> - <div> - <form name="keywordsearchform" method="post" action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25&PAGING=Y</@ofbizUrl>" style="margin: 0;"> - <span class="label">${uiLabelMap.ProductKeywords}:</span><input type="text"name="SEARCH_STRING" size="20" maxlength="50" value="${requestParameters.SEARCH_STRING?if_exists}"/> - <span class="label"> - ${uiLabelMap.ProductCategoryId}: - </span> - <input type="text" name="SEARCH_CATEGORY_ID" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2(document.keywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a> - <span class="label"> - ${uiLabelMap.CommonNoContains} - </span> - <input type="checkbox" name="SEARCH_CONTAINS" value="N" <#if requestParameters.SEARCH_CONTAINS?if_exists == "N">checked="checked"</#if>/> - <span class="label"> - ${uiLabelMap.CommonAny} - </span> - <input type="radio" name="SEARCH_OPERATOR" value="OR" <#if requestParameters.SEARCH_OPERATOR?if_exists != "AND">checked="checked"</#if>/> - <span class="label"> - ${uiLabelMap.CommonAll} - </span> - <input type="radio" name="SEARCH_OPERATOR" value="AND" <#if requestParameters.SEARCH_OPERATOR?if_exists == "AND">checked="checked"</#if>/> - - <a href="javascript:document.keywordsearchform.submit()" class="buttontext">${uiLabelMap.CommonFind}</a> - </form> - </div> - <div> - <form name="advancedsearchform" method="post" action="<@ofbizUrl>advancedsearch</@ofbizUrl>" style="margin: 0;"> - <span class="label"> - ${uiLabelMap.ProductCategoryId}: - </span> - <input type="text" name="SEARCH_CATEGORY_ID" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2(document.advancedsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a> - <div> - <a href="javascript:document.advancedsearchform.submit()" class="buttontext">${uiLabelMap.ProductAdvancedSearch}</a> - </div> - </form> - </div> - <div> - <form name="productjumpform" method="post" action="<@ofbizUrl>EditProduct</@ofbizUrl>" style="margin: 0;"> - <input type="text" name="productId" size="10" maxlength="20" value="${requestParameters.productId?if_exists}"/> - <a href="javascript:call_fieldlookup2(document.productjumpform.productId,'LookupProduct');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a> - <select name="DUMMYPAGE" onchange="submitProductJump()"> - <option value="<@ofbizUrl>EditProduct</@ofbizUrl>">-${uiLabelMap.ProductProductJump}-</option> - <option value="<@ofbizUrl>EditProductQuickAdmin</@ofbizUrl>">${uiLabelMap.ProductQuickAdmin}</option> - <option value="<@ofbizUrl>EditProduct</@ofbizUrl>">${uiLabelMap.ProductProduct}</option> - <option value="<@ofbizUrl>EditProductPrices</@ofbizUrl>">${uiLabelMap.ProductPrices}</option> - <option value="<@ofbizUrl>EditProductContent</@ofbizUrl>">${uiLabelMap.ProductContent}</option> - <option value="<@ofbizUrl>EditProductGoodIdentifications</@ofbizUrl>">${uiLabelMap.CommonIds}</option> - <option value="<@ofbizUrl>EditProductCategories</@ofbizUrl>">${uiLabelMap.ProductCategories}</option> - <option value="<@ofbizUrl>EditProductKeyword</@ofbizUrl>">${uiLabelMap.ProductKeywords}</option> - <option value="<@ofbizUrl>EditProductAssoc</@ofbizUrl>">${uiLabelMap.ProductAssociations}</option> - <option value="<@ofbizUrl>ViewProductManufacturing</@ofbizUrl>">${uiLabelMap.ProductManufacturing}</option> - <option value="<@ofbizUrl>EditProductCosts</@ofbizUrl>">${uiLabelMap.ProductCosts}</option> - <option value="<@ofbizUrl>EditProductAttributes</@ofbizUrl>">${uiLabelMap.ProductAttributes}</option> - <option value="<@ofbizUrl>EditProductFeatures</@ofbizUrl>">${uiLabelMap.ProductFeatures}</option> - <option value="<@ofbizUrl>EditProductFacilities</@ofbizUrl>">${uiLabelMap.ProductFacilities}</option> - <option value="<@ofbizUrl>EditProductFacilityLocations</@ofbizUrl>">${uiLabelMap.ProductLocations}</option> - <option value="<@ofbizUrl>EditProductInventoryItems</@ofbizUrl>">${uiLabelMap.ProductInventory}</option> - <option value="<@ofbizUrl>EditProductSuppliers</@ofbizUrl>">${uiLabelMap.ProductSuppliers}</option> - <option value="<@ofbizUrl>ViewProductAgreements</@ofbizUrl>">${uiLabelMap.ProductAgreements}</option> - <option value="<@ofbizUrl>EditProductGlAccounts</@ofbizUrl>">${uiLabelMap.ProductAccounts}</option> - <option value="<@ofbizUrl>EditProductPaymentMethodTypes</@ofbizUrl>">${uiLabelMap.ProductPaymentTypes}</option> - <option value="<@ofbizUrl>EditProductMaints</@ofbizUrl>">${uiLabelMap.ProductMaintenance}</option> - <option value="<@ofbizUrl>EditProductMeters</@ofbizUrl>">${uiLabelMap.ProductMeters}</option> - <option value="<@ofbizUrl>EditProductSubscriptionResources</@ofbizUrl>">${uiLabelMap.ProductSubscriptionResources}</option> - <option value="<@ofbizUrl>QuickAddVariants</@ofbizUrl>">${uiLabelMap.ProductVariants}</option> - <option value="<@ofbizUrl>EditProductConfigs</@ofbizUrl>">${uiLabelMap.ProductConfigs}</option> - </select> - </form> - </div> - </div> -</#if> -</div> +<form name="keywordsearchform" method="post" action="<@ofbizUrl>keywordsearch?VIEW_SIZE=25&PAGING=Y</@ofbizUrl>" style="margin: 0;"> + <span class="label">${uiLabelMap.ProductKeywords}:</span><input type="text"name="SEARCH_STRING" size="20" maxlength="50" value="${requestParameters.SEARCH_STRING?if_exists}"/> + <span class="label"> + ${uiLabelMap.ProductCategoryId}: + </span> + <input type="text" name="SEARCH_CATEGORY_ID" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2(document.keywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a> + <span class="label"> + ${uiLabelMap.CommonNoContains} + </span> + <input type="checkbox" name="SEARCH_CONTAINS" value="N" <#if requestParameters.SEARCH_CONTAINS?if_exists == "N">checked="checked"</#if>/> + <span class="label"> + ${uiLabelMap.CommonAny} + </span> + <input type="radio" name="SEARCH_OPERATOR" value="OR" <#if requestParameters.SEARCH_OPERATOR?if_exists != "AND">checked="checked"</#if>/> + <span class="label"> + ${uiLabelMap.CommonAll} + </span> + <input type="radio" name="SEARCH_OPERATOR" value="AND" <#if requestParameters.SEARCH_OPERATOR?if_exists == "AND">checked="checked"</#if>/> + + <a href="javascript:document.keywordsearchform.submit()" class="buttontext">${uiLabelMap.CommonFind}</a> +</form> +<form name="advancedsearchform" method="post" action="<@ofbizUrl>advancedsearch</@ofbizUrl>" style="margin: 0;"> + <span class="label"> + ${uiLabelMap.ProductCategoryId}: + </span> + <input type="text" name="SEARCH_CATEGORY_ID" size="15" maxlength="20" value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/><a href="javascript:call_fieldlookup2(document.advancedsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a> + <div> + <a href="javascript:document.advancedsearchform.submit()" class="buttontext">${uiLabelMap.ProductAdvancedSearch}</a> + </div> +</form> +<form name="productjumpform" method="post" action="<@ofbizUrl>EditProduct</@ofbizUrl>" style="margin: 0;"> + <input type="text" name="productId" size="10" maxlength="20" value="${requestParameters.productId?if_exists}"/> + <a href="javascript:call_fieldlookup2(document.productjumpform.productId,'LookupProduct');"><img src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click here For Field Lookup'/></a> + <select name="DUMMYPAGE" onchange="submitProductJump()"> + <option value="<@ofbizUrl>EditProduct</@ofbizUrl>">-${uiLabelMap.ProductProductJump}-</option> + <option value="<@ofbizUrl>EditProductQuickAdmin</@ofbizUrl>">${uiLabelMap.ProductQuickAdmin}</option> + <option value="<@ofbizUrl>EditProduct</@ofbizUrl>">${uiLabelMap.ProductProduct}</option> + <option value="<@ofbizUrl>EditProductPrices</@ofbizUrl>">${uiLabelMap.ProductPrices}</option> + <option value="<@ofbizUrl>EditProductContent</@ofbizUrl>">${uiLabelMap.ProductContent}</option> + <option value="<@ofbizUrl>EditProductGoodIdentifications</@ofbizUrl>">${uiLabelMap.CommonIds}</option> + <option value="<@ofbizUrl>EditProductCategories</@ofbizUrl>">${uiLabelMap.ProductCategories}</option> + <option value="<@ofbizUrl>EditProductKeyword</@ofbizUrl>">${uiLabelMap.ProductKeywords}</option> + <option value="<@ofbizUrl>EditProductAssoc</@ofbizUrl>">${uiLabelMap.ProductAssociations}</option> + <option value="<@ofbizUrl>ViewProductManufacturing</@ofbizUrl>">${uiLabelMap.ProductManufacturing}</option> + <option value="<@ofbizUrl>EditProductCosts</@ofbizUrl>">${uiLabelMap.ProductCosts}</option> + <option value="<@ofbizUrl>EditProductAttributes</@ofbizUrl>">${uiLabelMap.ProductAttributes}</option> + <option value="<@ofbizUrl>EditProductFeatures</@ofbizUrl>">${uiLabelMap.ProductFeatures}</option> + <option value="<@ofbizUrl>EditProductFacilities</@ofbizUrl>">${uiLabelMap.ProductFacilities}</option> + <option value="<@ofbizUrl>EditProductFacilityLocations</@ofbizUrl>">${uiLabelMap.ProductLocations}</option> + <option value="<@ofbizUrl>EditProductInventoryItems</@ofbizUrl>">${uiLabelMap.ProductInventory}</option> + <option value="<@ofbizUrl>EditProductSuppliers</@ofbizUrl>">${uiLabelMap.ProductSuppliers}</option> + <option value="<@ofbizUrl>ViewProductAgreements</@ofbizUrl>">${uiLabelMap.ProductAgreements}</option> + <option value="<@ofbizUrl>EditProductGlAccounts</@ofbizUrl>">${uiLabelMap.ProductAccounts}</option> + <option value="<@ofbizUrl>EditProductPaymentMethodTypes</@ofbizUrl>">${uiLabelMap.ProductPaymentTypes}</option> + <option value="<@ofbizUrl>EditProductMaints</@ofbizUrl>">${uiLabelMap.ProductMaintenance}</option> + <option value="<@ofbizUrl>EditProductMeters</@ofbizUrl>">${uiLabelMap.ProductMeters}</option> + <option value="<@ofbizUrl>EditProductSubscriptionResources</@ofbizUrl>">${uiLabelMap.ProductSubscriptionResources}</option> + <option value="<@ofbizUrl>QuickAddVariants</@ofbizUrl>">${uiLabelMap.ProductVariants}</option> + <option value="<@ofbizUrl>EditProductConfigs</@ofbizUrl>">${uiLabelMap.ProductConfigs}</option> + </select> +</form> Modified: ofbiz/trunk/applications/product/webapp/catalog/find/miniproductlist.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/miniproductlist.ftl?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/find/miniproductlist.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/find/miniproductlist.ftl Sun Jul 27 03:23:34 2008 @@ -17,43 +17,27 @@ under the License. --> -<div class="screenlet"> - <div class="screenlet-header"> - <div class="simple-right-small"> - <#if isOpen> - <a href="<@ofbizUrl>main?CategoryProductsState=close</@ofbizUrl>" class="lightbuttontext"> _ </a> - <#else> - <a href="<@ofbizUrl>main?CategoryProductsState=open</@ofbizUrl>" class="lightbuttontext"> [] </a> - </#if> - </div> - <div class="boxhead">${uiLabelMap.ProductCategoryProducts}</div> - </div> -<#if isOpen> - <div class="screenlet-body"> - <#if productCategory?exists> - <#if productCategoryMembers?has_content> - <#list productCategoryMembers as productCategoryMember> - <#assign product = productCategoryMember.getRelatedOneCache("Product")> - <div> - <a href='<@ofbizUrl>EditProduct?productId=${product.productId}</@ofbizUrl>' class='buttontext'> - ${product.internalName?default("${uiLabelMap.CommonNo} ${uiLabelMap.ProductInternalName}")} - </a> - <div> - <b>${product.productId}</b> - </div> - </div> - </#list> - <#if (listSize > viewSize)> - <div> - <div>NOTE: Only showing the first ${viewSize} of ${listSize} products. To view the rest, use the Products tab for this category.</div> - </div> - </#if> - <#else> - <div>${uiLabelMap.ProductNoProductsInCategory}.</div> - </#if> - <#else> - <div>${uiLabelMap.ProductNoCategorySpecified}.</div> - </#if> - </div> +<#if productCategory?exists> + <#if productCategoryMembers?has_content> + <#list productCategoryMembers as productCategoryMember> + <#assign product = productCategoryMember.getRelatedOneCache("Product")> + <div> + <a href='<@ofbizUrl>EditProduct?productId=${product.productId}</@ofbizUrl>' class='buttontext'> + ${product.internalName?default("${uiLabelMap.CommonNo} ${uiLabelMap.ProductInternalName}")} + </a> + <div> + <b>${product.productId}</b> + </div> + </div> + </#list> + <#if (listSize > viewSize)> + <div> + <div>NOTE: Only showing the first ${viewSize} of ${listSize} products. To view the rest, use the Products tab for this category.</div> + </div> + </#if> + <#else> + <div>${uiLabelMap.ProductNoProductsInCategory}.</div> + </#if> +<#else> + <div>${uiLabelMap.ProductNoCategorySpecified}.</div> </#if> -</div> Modified: ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/find/sidecatalogs.ftl Sun Jul 27 03:23:34 2008 @@ -16,37 +16,21 @@ specific language governing permissions and limitations under the License. --> -<div class="screenlet"> - <div class="screenlet-header"> - <div class="simple-right-small"> - <#if isOpen> - <a href='<@ofbizUrl>main?BrowseCatalogsState=close</@ofbizUrl>' class='lightbuttontext'> _ </a> - <#else> - <a href='<@ofbizUrl>main?BrowseCatalogsState=open</@ofbizUrl>' class='lightbuttontext'> [] </a> - </#if> - </div> - <div class="boxhead">${uiLabelMap.ProductBrowseCatalogs}</div> - </div> -<#if isOpen> - <div class="screenlet-body"> - <div><a href='<@ofbizUrl>FindProdCatalog</@ofbizUrl>' class='buttontext'>${uiLabelMap.ProductCatalogDetailList}</a></div> - <div style='margin-left: 10px;'> - <#assign sortList = Static["org.ofbiz.base.util.UtilMisc"].toList("prodCatalogCategoryTypeId", "sequenceNum", "productCategoryId")> - <#list prodCatalogs as prodCatalog> - <#if curProdCatalogId?exists && curProdCatalogId == prodCatalog.prodCatalogId> - <#assign prodCatalogCategories = prodCatalog.getRelatedOrderByCache("ProdCatalogCategory", sortList)> - <div class='browsecategorytext'>- <a href="<@ofbizUrl>EditProdCatalog?prodCatalogId=${prodCatalog.prodCatalogId}</@ofbizUrl>" class='browsecategorybutton'>${prodCatalog.catalogName?if_exists}</a></div> - <div style='margin-left: 10px;'> - <#list prodCatalogCategories as prodCatalogCategory> - <#assign productCategory = prodCatalogCategory.getRelatedOneCache("ProductCategory")> - <div class='browsecategorytext'>- <a href='<@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}&productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl>' class="browsecategorybutton">${(productCategory.categoryName)?default(productCategory.description)?default(productCategory.productCategoryId)}</a></div> - </#list> - </div> - <#else> - <div class='browsecategorytext'>- <a href="<@ofbizUrl>EditProdCatalog?prodCatalogId=${prodCatalog.prodCatalogId}</@ofbizUrl>" class='browsecategorybutton'>${prodCatalog.catalogName?if_exists}</a></div> - </#if> - </#list> - </div> - </div> -</#if> +<div><a href='<@ofbizUrl>FindProdCatalog</@ofbizUrl>' class='buttontext'>${uiLabelMap.ProductCatalogDetailList}</a></div> +<div style='margin-left: 10px;'> + <#assign sortList = Static["org.ofbiz.base.util.UtilMisc"].toList("prodCatalogCategoryTypeId", "sequenceNum", "productCategoryId")> + <#list prodCatalogs as prodCatalog> + <#if curProdCatalogId?exists && curProdCatalogId == prodCatalog.prodCatalogId> + <#assign prodCatalogCategories = prodCatalog.getRelatedOrderByCache("ProdCatalogCategory", sortList)> + <div class='browsecategorytext'>- <a href="<@ofbizUrl>EditProdCatalog?prodCatalogId=${prodCatalog.prodCatalogId}</@ofbizUrl>" class='browsecategorybutton'>${prodCatalog.catalogName?if_exists}</a></div> + <div style='margin-left: 10px;'> + <#list prodCatalogCategories as prodCatalogCategory> + <#assign productCategory = prodCatalogCategory.getRelatedOneCache("ProductCategory")> + <div class='browsecategorytext'>- <a href='<@ofbizUrl>EditCategory?CATALOG_TOP_CATEGORY=${prodCatalogCategory.productCategoryId}&productCategoryId=${prodCatalogCategory.productCategoryId}</@ofbizUrl>' class="browsecategorybutton">${(productCategory.categoryName)?default(productCategory.description)?default(productCategory.productCategoryId)}</a></div> + </#list> + </div> + <#else> + <div class='browsecategorytext'>- <a href="<@ofbizUrl>EditProdCatalog?prodCatalogId=${prodCatalog.prodCatalogId}</@ofbizUrl>" class='browsecategorybutton'>${prodCatalog.catalogName?if_exists}</a></div> + </#if> + </#list> </div> Modified: ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/find/sidedeepcategory.ftl Sun Jul 27 03:23:34 2008 @@ -56,36 +56,20 @@ </#if> </#macro> -<div class="screenlet"> - <div class="screenlet-header"> - <div class="simple-right-small"> - <#if isOpen> - <a href='<@ofbizUrl>main?BrowseCategoriesState=close</@ofbizUrl>' class='lightbuttontext'> _ </a> - <#else> - <a href='<@ofbizUrl>main?BrowseCategoriesState=open</@ofbizUrl>' class='lightbuttontext'> [] </a> - </#if> - </div> - <div class="boxhead">${uiLabelMap.ProductBrowseCategories}</div> - </div> -<#if isOpen> - <div class="screenlet-body"> - <div><a href='<@ofbizUrl>ChooseTopCategory</@ofbizUrl>' class='buttontext'>${uiLabelMap.ProductChooseTopCategory}</a></div> - <div style='margin-left: 10px;'> - <#if currentTopCategory?exists> - <#if curCategoryId?exists && curCategoryId == currentTopCategory.productCategoryId> - <div style='text-indent: -10px;'><b>- ${currentTopCategory.categoryName?default("No Name")} [${currentTopCategory.productCategoryId}]</b></div> - <#else> - <div class='browsecategorytext'>- <a href="<@ofbizUrl>EditCategory?productCategoryId=${currentTopCategory.productCategoryId}</@ofbizUrl>" class='browsecategorybutton'>${currentTopCategory.categoryName?default(currentTopCategory.description)?if_exists} [${currentTopCategory.productCategoryId}]</a></div> - </#if> - </#if> - <div style='margin-left: 10px;'> - <#if topLevelList?exists> - <#list topLevelList as category> - <@categoryList parentCategory=category category=category/> - </#list> - </#if> - </div> - </div> - </div> +<div><a href='<@ofbizUrl>ChooseTopCategory</@ofbizUrl>' class='buttontext'>${uiLabelMap.ProductChooseTopCategory}</a></div> +<div style='margin-left: 10px;'> +<#if currentTopCategory?exists> + <#if curCategoryId?exists && curCategoryId == currentTopCategory.productCategoryId> + <div style='text-indent: -10px;'><b>- ${currentTopCategory.categoryName?default("No Name")} [${currentTopCategory.productCategoryId}]</b></div> + <#else> + <div class='browsecategorytext'>- <a href="<@ofbizUrl>EditCategory?productCategoryId=${currentTopCategory.productCategoryId}</@ofbizUrl>" class='browsecategorybutton'>${currentTopCategory.categoryName?default(currentTopCategory.description)?if_exists} [${currentTopCategory.productCategoryId}]</a></div> + </#if> </#if> + <div style='margin-left: 10px;'> + <#if topLevelList?exists> + <#list topLevelList as category> + <@categoryList parentCategory=category category=category/> + </#list> + </#if> + </div> </div> Modified: ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml?rev=680086&r1=680085&r2=680086&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml Sun Jul 27 03:23:34 2008 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -20,7 +20,203 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> - + <screen name="main-decorator"> + <section> + <actions> + <!-- base/top/specific map first, then more common map added for shared labels --> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/> + + <set field="MainColumnStyle" value="nocolumns" global="true"/> + + <set field="layoutSettings.companyName" from-field="uiLabelMap.CatalogCompanyName" global="true"/> + <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ProductCompanySubtitle" global="true"/> + <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set, + then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. --> + <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.jpg" global="true"/>--> + <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> --> + <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> --> + <set field="activeApp" value="catalogmgr" global="true"/> + <set field="applicationMenuName" value="CatalogAppBar" global="true"/> + <set field="applicationMenuLocation" value="component://product/widget/catalog/Menus.xml" global="true"/> + </actions> + <widgets> + <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> + </widgets> + </section> + </screen> + + <screen name="CommonProductDecorator"> + <section> + <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> + <set field="leftbarScreenName" value="leftbar"/> + <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/> + <set field="MainColumnStyle" value="leftonly"/> + + <set field="productId" from-field="parameters.productId"/> + <entity-one entity-name="Product" value-name="product"/> + <set field="productName" from-field="product.productName"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <!-- do check for CATALOG, _VIEW permission --> + <condition> + <if-has-permission permission="CATALOG" action="_VIEW"/> + </condition> + <widgets> + <section> + <condition><not><if-empty field-name="productId"/></not></condition> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/catalog/product/ProductTabBar.ftl"/></html> + </platform-specific> + <container> + <label style="h1">${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${productId}] ${${extraFunctionName}}</label> + <image src="${product.smallImageUrl}" height="40" width="40" url-mode="content"/> + </container> + + <!-- add Create Product and View Product (in ecommerce) links --> + <container style="button-bar"> + <link target="EditProduct" text="${uiLabelMap.ProductNewProduct}" style="buttontext"/> + <link target="CreateVirtualWithVariantsForm" text="${uiLabelMap.ProductNewVirtualProduct}" style="buttontext"/> + <link target="/ecommerce/control/product?product_id=${productId}" url-mode="inter-app" text="${uiLabelMap.ProductProductPage}" style="buttontext"/> + <link target="ProductBarCode.pdf?productId=${productId}&productName=${productName}" target-window="_blank" text="${uiLabelMap.ProductBarcode}" style="buttontext"/> + </container> + </widgets> + </section> + + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProductCatalogViewPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="CommonCatalogDecorator"> + <section> + <actions> + <set field="leftbarScreenName" value="leftbar"/> + <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/> + <set field="MainColumnStyle" value="leftonly"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <!-- do check for CATALOG, _VIEW permission --> + <condition> + <if-has-permission permission="CATALOG" action="_VIEW"/> + </condition> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/catalog/catalog/CatalogTabBar.ftl"/></html> + </platform-specific> + <container> + <link target="EditProdCatalog" text="${uiLabelMap.ProductNewProdCatalog}" style="buttontext"/> + </container> + + <!-- add Create Product and View Product (in ecommerce) links --> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProductCatalogViewPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="CommonProductStoreDecorator"> + <section> + <actions> + <set field="leftbarScreenName" value="leftbar"/> + <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/> + <set field="MainColumnStyle" value="leftonly"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <!-- do check for CATALOG, _VIEW permission --> + <condition> + <if-has-permission permission="CATALOG" action="_VIEW"/> + </condition> + <widgets> + <section> + <condition><not><if-empty field-name="productStoreId"/></not></condition> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/catalog/store/ProductStoreTabBar.ftl"/></html> + </platform-specific> + + <container> + <label style="h1">${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${productStore.storeName} [${uiLabelMap.CommonId}:${productStoreId}] ${${extraFunctionName}}</label> + </container> + <container> + <link target="EditProductStore" text="${uiLabelMap.ProductNewProductStore}" style="buttontext"/> + </container> + </widgets> + </section> + + <!-- add Create Product and View Product (in ecommerce) links --> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProductCatalogViewPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="CommonShippingDecorator"> + <section> + <actions> + <set field="leftbarScreenName" value="leftbar"/> + <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/> + <set field="MainColumnStyle" value="leftonly"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <!-- do check for CATALOG, _VIEW permission --> + <condition> + <if-has-permission permission="CATALOG" action="_VIEW"/> + </condition> + <widgets> + <platform-specific> + <html><html-template location="component://product/webapp/catalog/shipping/ShippingTabBar.ftl"/></html> + </platform-specific> + <!--<include-menu name="EditSubscriptionResource" location="component://product/widget/catalog/SubscriptionMenus.xml"/>--> + <container> + <label style="h1">${uiLabelMap.${labelTitleProperty}}</label> + </container> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.ProductCatalogViewPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="leftbar"> <section> <widgets> @@ -39,7 +235,9 @@ <script location="component://product/webapp/catalog/WEB-INF/actions/find/keywordsearchbox.groovy"/> </actions> <widgets> - <platform-specific><html><html-template location="component://product/webapp/catalog/find/keywordsearchbox.ftl"/></html></platform-specific> + <screenlet id="ProductKeywordsPanel" title="${uiLabelMap.ProductSearchProducts}" collapsible="true"> + <platform-specific><html><html-template location="component://product/webapp/catalog/find/keywordsearchbox.ftl"/></html></platform-specific> + </screenlet> </widgets> </section> </screen> @@ -49,7 +247,9 @@ <script location="component://product/webapp/catalog/WEB-INF/actions/find/sidecatalogs.groovy"/> </actions> <widgets> - <platform-specific><html><html-template location="component://product/webapp/catalog/find/sidecatalogs.ftl"/></html></platform-specific> + <screenlet id="ProductBrowseCatalogsPanel" title="${uiLabelMap.ProductBrowseCatalogs}" collapsible="true"> + <platform-specific><html><html-template location="component://product/webapp/catalog/find/sidecatalogs.ftl"/></html></platform-specific> + </screenlet> </widgets> </section> </screen> @@ -59,7 +259,9 @@ <script location="component://product/webapp/catalog/WEB-INF/actions/find/sidedeepcategory.groovy"/> </actions> <widgets> - <platform-specific><html><html-template location="component://product/webapp/catalog/find/sidedeepcategory.ftl"/></html></platform-specific> + <screenlet id="ProductBrowseCategoriesPanel" title="${uiLabelMap.ProductBrowseCategories}" collapsible="true"> + <platform-specific><html><html-template location="component://product/webapp/catalog/find/sidedeepcategory.ftl"/></html></platform-specific> + </screenlet> </widgets> </section> </screen> @@ -69,7 +271,9 @@ <script location="component://product/webapp/catalog/WEB-INF/actions/find/miniproductlist.groovy"/> </actions> <widgets> - <platform-specific><html><html-template location="component://product/webapp/catalog/find/miniproductlist.ftl"/></html></platform-specific> + <screenlet id="ProductCategoryProductsPanel" title="${uiLabelMap.ProductCategoryProducts}" collapsible="true"> + <platform-specific><html><html-template location="component://product/webapp/catalog/find/miniproductlist.ftl"/></html></platform-specific> + </screenlet> </widgets> </section> </screen> Added: ofbiz/trunk/applications/product/widget/catalog/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/Menus.xml?rev=680086&view=auto ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/Menus.xml (added) +++ ofbiz/trunk/applications/product/widget/catalog/Menus.xml Sun Jul 27 03:23:34 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you 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. +--> +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> + <menu name="CatalogAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.ProductCatalogManagerApplication}" + default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem"> + <menu-item name="main" title="${uiLabelMap.ProductMain}"><link target="main"/></menu-item> + <menu-item name="featurecats" title="${uiLabelMap.ProductFeatureCats}"><link target="EditFeatureCategories"/></menu-item> + <menu-item name="promos" title="${uiLabelMap.ProductPromos}"><link target="FindProductPromo"/></menu-item> + <menu-item name="pricerules" title="${uiLabelMap.ProductPriceRules}"><link target="FindProductPriceRules"/></menu-item> + <menu-item name="store" title="${uiLabelMap.ProductStores}"><link target="FindProductStore"/></menu-item> + <menu-item name="thesaurus" title="${uiLabelMap.ProductThesaurus}"><link target="editKeywordThesaurus"/></menu-item> + <menu-item name="reviews" title="${uiLabelMap.ProductReviews}"><link target="pendingReviews"/></menu-item> + <menu-item name="configs" title="${uiLabelMap.ProductConfigItems}"><link target="FindProductConfigItems"/></menu-item> + <menu-item name="Subscription" title="${uiLabelMap.ProductSubscriptions}"><link target="FindSubscription"/></menu-item> + <menu-item name="shipping" title="${uiLabelMap.ProductShipping}"><link target="ListShipmentMethodTypes"/></menu-item> + + <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> + <condition><not><if-empty field-name="userLogin"/></not></condition> + <link target="logout"/> + </menu-item> + <menu-item name="Login" title="${uiLabelMap.PageTitleLogin}" align-style="opposed"> + <condition><if-empty field-name="userLogin"/></condition> + <link target="${checkLoginUrl}"/> + </menu-item> + </menu> +</menus> Propchange: ofbiz/trunk/applications/product/widget/catalog/Menus.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/widget/catalog/Menus.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/product/widget/catalog/Menus.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml |
Free forum by Nabble | Edit this page |