This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new 01a3277d78 Fixed: ${parameters.SEARCH_STRING} Failed in TagSearch.ftl[at line 20] (OFBIZ-13075) 01a3277d78 is described below commit 01a3277d7882e5c4c033ef5048d1bfe0405745b5 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Tue Apr 30 18:24:57 2024 +0200 Fixed: ${parameters.SEARCH_STRING} Failed in TagSearch.ftl[at line 20] (OFBIZ-13075) The error appears when no products have been tagged (did not check how the products are tagged ) --- .../order/template/entry/catalog/TagSearch.ftl | 80 ++++++++++++---------- applications/product/config/ProductUiLabels.xml | 4 ++ 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/applications/order/template/entry/catalog/TagSearch.ftl b/applications/order/template/entry/catalog/TagSearch.ftl index 7d01eaf2c6..cc001e4f40 100644 --- a/applications/order/template/entry/catalog/TagSearch.ftl +++ b/applications/order/template/entry/catalog/TagSearch.ftl @@ -17,45 +17,49 @@ specific language governing permissions and limitations under the License. --> -<h1>${uiLabelMap.ProductProductTaggedWith} "${parameters.SEARCH_STRING}"</h1> +<#if (parameters.SEARCH_STRING??)> + <h1>${uiLabelMap.ProductProductTaggedWith} "${parameters.SEARCH_STRING!}"</h1> -<#if !productIds?has_content> - <h2> ${uiLabelMap.ProductNoResultsFound}.</h2> -</#if> + <#if !productIds?has_content> + <h2> ${uiLabelMap.ProductNoResultsFound}.</h2> + </#if> -<#if productIds?has_content> - <#macro paginationControls> - <div class="product-prevnext"> - <#-- Start Page Select Drop-Down --> - <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)> - <select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;"> - <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax}</option> - <#list 1..viewIndexMax as curViewNum> - <option value="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${curViewNum?int - 1}/~clearSearch=N</@ofbizUrl>">${uiLabelMap.CommonGotoPage} ${curViewNum}</option> - </#list> - </select> - <#-- End Page Select Drop-Down --> - <b> - <#if (viewIndex?int > 0)> - <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex - 1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | - </#if> - <#if (listSize?int > 0)> - <span>${lowIndex+1} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}</span> - </#if> - <#if highIndex?int < listSize?int> - | <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex+1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> - </#if> - </b> - </div> - </#macro> + <#if productIds?has_content> + <#macro paginationControls> + <div class="product-prevnext"> + <#-- Start Page Select Drop-Down --> + <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)> + <select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;"> + <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax}</option> + <#list 1..viewIndexMax as curViewNum> + <option value="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${curViewNum?int - 1}/~clearSearch=N</@ofbizUrl>">${uiLabelMap.CommonGotoPage} ${curViewNum}</option> + </#list> + </select> + <#-- End Page Select Drop-Down --> + <b> + <#if (viewIndex?int > 0)> + <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex - 1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a> | + </#if> + <#if (listSize?int > 0)> + <span>${lowIndex+1} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}</span> + </#if> + <#if highIndex?int < listSize?int> + | <a href="<@ofbizUrl>keywordsearch/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex+1}/~clearSearch=N</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a> + </#if> + </b> + </div> + </#macro> - <@paginationControls/> - <div class="productsummary-container"> - <#list productIds as productId> <#-- note that there is no boundary range because that is being done before the list is put in the content --> - ${setRequestAttribute("optProductId", productId)} - ${setRequestAttribute("listIndex", productId_index)} - ${screens.render(productsummaryScreen)} - </#list> - </div> - <@paginationControls/> + <@paginationControls/> + <div class="productsummary-container"> + <#list productIds as productId> <#-- note that there is no boundary range because that is being done before the list is put in the content --> + ${setRequestAttribute("optProductId", productId)} + ${setRequestAttribute("listIndex", productId_index)} + ${screens.render(productsummaryScreen)} + </#list> + </div> + <@paginationControls/> + </#if> +<#else> + <h1>${uiLabelMap.NoProductProductTagged}</h1> </#if> diff --git a/applications/product/config/ProductUiLabels.xml b/applications/product/config/ProductUiLabels.xml index 9126607541..ae41fb2dce 100644 --- a/applications/product/config/ProductUiLabels.xml +++ b/applications/product/config/ProductUiLabels.xml @@ -26578,6 +26578,10 @@ <value xml:lang="zh">产品店铺网站</value> <value xml:lang="zh-TW">產品商店網站</value> </property> + <property key="NoProductProductTagged"> + <value xml:lang="en">No products tagged</value> + <value xml:lang="fr">Aucun produit étiqueté</value> + </property> <property key="ProductProductTaggedWith"> <value xml:lang="de">Produkt gekennzeichnet mit</value> <value xml:lang="en">Product tagged with</value>