Author: deepak
Date: Wed Jan 24 17:58:00 2018
New Revision: 1822144
URL: http://svn.apache.org/viewvc?rev=1822144&view=rev
Log:
Applied fix from trunk for revision: 1822143
===
Improved: Update markup of advanced seach page page according to standard
markup given by Bootstrap v4.0.0 (OFBIZ-10162)
Thanks Nitish Mishra for your contribution
Modified:
ofbiz/ofbiz-plugins/branches/release17.12/ (props changed)
ofbiz/ofbiz-plugins/branches/release17.12/ecommerce/template/catalog/AdvancedSearch.ftl
Propchange: ofbiz/ofbiz-plugins/branches/release17.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 17:58:00 2018
@@ -10,4 +10,4 @@
/ofbiz/branches/json-integration-refactoring/plugins:1634077-1635900
/ofbiz/branches/multitenant20100310/plugins:921280-927264
/ofbiz/branches/release13.07/plugins:1547657
-/ofbiz/ofbiz-plugins/trunk:1819576,1819580,1819582,1819589,1820962,1820973,1821045,1821049,1821051,1822129,1822133,1822139
+/ofbiz/ofbiz-plugins/trunk:1819576,1819580,1819582,1819589,1820962,1820973,1821045,1821049,1821051,1822129,1822133,1822139,1822143
Modified:
ofbiz/ofbiz-plugins/branches/release17.12/ecommerce/template/catalog/AdvancedSearch.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release17.12/ecommerce/template/catalog/AdvancedSearch.ftl?rev=1822144&r1=1822143&r2=1822144&view=diff
==============================================================================
---
ofbiz/ofbiz-plugins/branches/release17.12/ecommerce/template/catalog/AdvancedSearch.ftl
(original)
+++
ofbiz/ofbiz-plugins/branches/release17.12/ecommerce/template/catalog/AdvancedSearch.ftl
Wed Jan 24 17:58:00 2018
@@ -16,122 +16,168 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-<#assign searchOptionsHistoryList =
-
Static["org.apache.ofbiz.product.product.ProductSearchSession"].getSearchOptionsHistoryList(session)/>
-<#assign currentCatalogId =
-
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCurrentCatalogId(request)/>
-<h2>${uiLabelMap.ProductAdvancedSearchInCategory}</h2>
-<form id="advtokeywordsearchform" method="post"
action="<@ofbizUrl>keywordsearch</@ofbizUrl>">
- <fieldset class="inline">
- <input type="hidden" name="VIEW_SIZE" value="10"/>
- <input type="hidden" name="PAGING" value="Y"/>
- <input type="hidden" name="SEARCH_CATALOG_ID" value="${currentCatalogId}"/>
- <#if searchCategory?has_content>
- <input type="hidden" name="SEARCH_CATEGORY_ID"
value="${searchCategoryId?if_exists}"/>
- <label>${uiLabelMap.ProductCategory}</label>
- <p>${(searchCategory.description)?if_exists}</p>
- <div>
- <label>${uiLabelMap.ProductIncludeSubCategories}</label>
- <label for="SEARCH_SUB_CATEGORIES_YES">${uiLabelMap.CommonYes}</label>
- <input type="radio" name="SEARCH_SUB_CATEGORIES"
id="SEARCH_SUB_CATEGORIES_YES" value="Y"
- checked="checked"/>
- <label for="SEARCH_SUB_CATEGORIES_NO">${uiLabelMap.CommonNo}</label>
- <input type="radio" name="SEARCH_SUB_CATEGORIES"
id="SEARCH_SUB_CATEGORIES_NO" value="N"/>
- </div>
- </#if>
- <div>
- <label for="SEARCH_STRING">${uiLabelMap.ProductKeywords}</label>
- <input type="text" name="SEARCH_STRING" id="SEARCH_STRING" size="20"
- value="${requestParameters.SEARCH_STRING?if_exists}"/>
- <label for="SEARCH_OPERATOR_ANY">${uiLabelMap.CommonAny}</label>
- <input type="radio" name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_ANY"
- value="OR" <#if "OR" == searchOperator>checked="checked"</#if>/>
- <label for="SEARCH_OPERATOR_ALL">${uiLabelMap.CommonAll}</label>
- <input type="radio" name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_ALL"
- value="AND" <#if "AND" == searchOperator>checked="checked"</#if>/>
- </div>
- <#list productFeatureTypeIdsOrdered as productFeatureTypeId>
- <#assign findPftMap =
-
Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId",
productFeatureTypeId)>
- <#assign productFeatureType = delegator.findOne("ProductFeatureType",
findPftMap, true)>
- <#assign productFeatures = productFeaturesByTypeMap[productFeatureTypeId]>
- <div>
- <label
for="pft_${productFeatureTypeId}">${(productFeatureType.get("description",locale))?if_exists}</label>
- <select name="pft_${productFeatureTypeId}"
id="pft_${productFeatureTypeId}">
- <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
- <#list productFeatures as productFeature>
- <option value="${productFeature.productFeatureId}">
-
${productFeature.description?default(productFeature.productFeatureId)}
- </option>
- </#list>
- </select>
- </div>
- </#list>
- <div>
- <label for="sortOrder">${uiLabelMap.ProductSortedBy}</label>
- <select name="sortOrder" id="sortOrder">
- <option
value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
- <option
value="SortProductField:productName">${uiLabelMap.ProductProductName}</option>
- <option
value="SortProductField:totalQuantityOrdered">${uiLabelMap.ProductPopularityByOrders}</option>
- <option
value="SortProductField:totalTimesViewed">${uiLabelMap.ProductPopularityByViews}</option>
- <option
value="SortProductField:averageCustomerRating">${uiLabelMap.ProductCustomerRating}</option>
- <option
value="SortProductPrice:LIST_PRICE">${uiLabelMap.ProductListPrice}</option>
- <option
value="SortProductPrice:DEFAULT_PRICE">${uiLabelMap.ProductDefaultPrice}</option>
- <#if productFeatureTypes?? && productFeatureTypes?has_content>
- <#list productFeatureTypes as productFeatureType>
- <option
value="SortProductFeature:${productFeatureType.productFeatureTypeId}">
-
${productFeatureType.description?default(productFeatureType.productFeatureTypeId)}
- </option>
- </#list>
+<div class="card">
+<#assign searchOptionsHistoryList =
Static["org.apache.ofbiz.product.product.ProductSearchSession"].getSearchOptionsHistoryList(session)/>
+<#assign currentCatalogId =
Static["org.apache.ofbiz.product.catalog.CatalogWorker"].getCurrentCatalogId(request)/>
+ <div class="card-header">
+ <strong>${uiLabelMap.ProductAdvancedSearchInCategory}</strong>
+ </div>
+ <div class="card-body">
+ <form id="advtokeywordsearchform" method="post"
action="<@ofbizUrl>keywordsearch</@ofbizUrl>">
+ <fieldset>
+ <input type="hidden" name="VIEW_SIZE" value="10"/>
+ <input type="hidden" name="PAGING" value="Y"/>
+ <input type="hidden" name="SEARCH_CATALOG_ID"
value="${currentCatalogId}"/>
+ <#if searchCategory?has_content>
+ <input type="hidden" name="SEARCH_CATEGORY_ID"
value="${searchCategoryId?if_exists}"/>
+ <label>${uiLabelMap.ProductCategory}</label>
+ <p>${(searchCategory.description)?if_exists}</p>
+ <fieldset class="form-group">
+ <div class="row">
+ <label class="col-form-label col-sm-3
pt-0">${uiLabelMap.ProductIncludeSubCategories}</label>
+ <div class="col-sm-9">
+ <div class="form-check">
+ <input type="radio" name="SEARCH_SUB_CATEGORIES"
class="form-check-input" id="SEARCH_SUB_CATEGORIES_YES" value="Y"
+ checked="checked"/>
+ <label class="form-check-label"
for="SEARCH_SUB_CATEGORIES_YES">${uiLabelMap.CommonYes}</label>
+ </div>
+ <div class="form-check">
+ <input type="radio" name="SEARCH_SUB_CATEGORIES"
class="form-check-input" id="SEARCH_SUB_CATEGORIES_NO" value="N"/>
+ <label class="form-check-label"
for="SEARCH_SUB_CATEGORIES_NO">${uiLabelMap.CommonNo}</label>
+ </div>
+ </div>
+ </fieldset>
</#if>
- </select>
- <label for="sortAscendingHigh">${uiLabelMap.EcommerceLowToHigh}</label>
- <input type="radio" name="sortAscending" id="sortAscendingHigh"
value="Y" checked="checked"/>
- <label for="sortAscendingLow">${uiLabelMap.EcommerceHighToLow}</label>
- <input type="radio" name="sortAscending" id="sortAscendingLow"
value="N"/>
- </div>
- <#if searchConstraintStrings?has_content>
- <div>
- <label>${uiLabelMap.ProductLastSearch}</label>
- <#list searchConstraintStrings as searchConstraintString>
- <p>${searchConstraintString}</p>
+ <fieldset class="form-group">
+ <div class="row">
+ <label class="col-form-label col-sm-3
pt-0">${uiLabelMap.ProductKeywords}</label>
+ <div class="col-sm-6">
+ <input type="text" class="form-control form-control-sm"
name="SEARCH_STRING" id="SEARCH_STRING" size="20"
+ value="${requestParameters.SEARCH_STRING?if_exists}"/>
+ <div class="form-check">
+ <input type="radio" class="form-check-input"
name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_ANY"
+ value="OR" <#if "OR" ==
searchOperator>checked="checked"</#if>/>
+ <label class="form-check-label"
for="SEARCH_OPERATOR_ANY">${uiLabelMap.CommonAny}</label>
+ <div>
+ <div class="form-check">
+ <input type="radio" class="form-check-input"
name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_ALL"
+ value="AND" <#if "AND" ==
searchOperator>checked="checked"</#if>/>
+ <label class="form-check-label"
for="SEARCH_OPERATOR_ALL">${uiLabelMap.CommonAll}</label>
+ </div>
+ </div>
+ </fieldset>
+ <#list productFeatureTypeIdsOrdered as productFeatureTypeId>
+ <#assign findPftMap =
+
Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId",
productFeatureTypeId)>
+ <#assign productFeatureType = delegator.findOne("ProductFeatureType",
findPftMap, true)>
+ <#assign productFeatures =
productFeaturesByTypeMap[productFeatureTypeId]>
+ <div class="form-group row">
+ <label for="${productFeatureTypeId}" class="col-sm-3
col-form-label">${(productFeatureType.get("description",locale))?if_exists}</label>
+ <div class="col-sm-6">
+ <select name="pft_${productFeatureTypeId}"
id="pft_${productFeatureTypeId}" class="form-control form-control-sm">
+ <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+ <#list productFeatures as productFeature>
+ <option value="${productFeature.productFeatureId}">
+
${productFeature.description?default(productFeature.productFeatureId)}
+ </option>
+ </#list>
+ </select>
+ </div>
+ </div>
</#list>
- <p>${uiLabelMap.ProductSortedBy}: ${searchSortOrderString}</p>
- <div>
- <label for="clearSearchNew">${uiLabelMap.ProductNewSearch}</label>
- <input type="radio" name="clearSearch" id="clearSearchNew" value="Y"
checked="checked"/>
- <label
for="clearSearchRefine">${uiLabelMap.ProductRefineSearch}</label>
- <input type="radio" name="clearSearch" id="clearSearchRefine"
value="N"/>
- </div>
- </div>
- </#if>
- <div>
- <input type="submit" name="submit" class="button"
value="${uiLabelMap.CommonFind}"/>
- </div>
- <#if searchOptionsHistoryList?has_content>
- <h2>${uiLabelMap.OrderLastSearches}...</h2>
- <div>
- <a href="<@ofbizUrl>clearSearchOptionsHistoryList</@ofbizUrl>"
class="button">
- ${uiLabelMap.OrderClearSearchHistory}
- </a>
- <h3>${uiLabelMap.OrderClearSearchHistoryNote}</h3>
- </div>
- <#list searchOptionsHistoryList as searchOptions>
- <#-- searchOptions type is ProductSearchSession.ProductSearchOptions -->
- <div>
- <p>${uiLabelMap.EcommerceSearchNumber}${searchOptions_index + 1}</p>
- <a
href="<@ofbizUrl>setCurrentSearchFromHistoryAndSearch?searchHistoryIndex=${searchOptions_index}&clearSearch=N</@ofbizUrl>"
- class="button">${uiLabelMap.CommonSearch}</a>
- <a
href="<@ofbizUrl>setCurrentSearchFromHistory?searchHistoryIndex=${searchOptions_index}</@ofbizUrl>"
- class="button">${uiLabelMap.CommonRefine}</a>
- </div>
- <#assign constraintStrings =
searchOptions.searchGetConstraintStrings(false, delegator, locale)>
- <#list constraintStrings as constraintString>
- <p> - ${constraintString}</p>
- </#list>
- <#if searchOptions_has_next>
+ <fieldset class="form-group">
+ <div class="row">
+ <label for="sortOrder" class="col-sm-3 col-form-label
pt-0">${uiLabelMap.ProductSortedBy}</label>
+ <div class="col-sm-6">
+ <select name="sortOrder" id="sortOrder" class="form-control
form-control-sm">
+ <option
value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
+ <option
value="SortProductField:productName">${uiLabelMap.ProductProductName}</option>
+ <option
value="SortProductField:totalQuantityOrdered">${uiLabelMap.ProductPopularityByOrders}</option>
+ <option
value="SortProductField:totalTimesViewed">${uiLabelMap.ProductPopularityByViews}</option>
+ <option
value="SortProductField:averageCustomerRating">${uiLabelMap.ProductCustomerRating}</option>
+ <option
value="SortProductPrice:LIST_PRICE">${uiLabelMap.ProductListPrice}</option>
+ <option
value="SortProductPrice:DEFAULT_PRICE">${uiLabelMap.ProductDefaultPrice}</option>
+ <#if productFeatureTypes?? && productFeatureTypes?has_content>
+ <#list productFeatureTypes as productFeatureType>
+ <option
value="SortProductFeature:${productFeatureType.productFeatureTypeId}">
+
${productFeatureType.description?default(productFeatureType.productFeatureTypeId)}
+ </option>
+ </#list>
+ </#if>
+ </select>
+ <div class="form-check">
+ <input type="radio" class="form-check-input"
name="sortAscending" id="sortAscendingHigh" value="Y" checked="checked"/>
+ <label class="form-check-label"
for="sortAscendingHigh">${uiLabelMap.EcommerceLowToHigh}</label>
+ </div>
+ <div class="form-check">
+ <input class="form-check-input" type="radio"
name="sortAscending" id="sortAscendingLow" value="N"/>
+ <label class="form-check-label"
for="sortAscendingLow">${uiLabelMap.EcommerceHighToLow}</label>
+ </div>
+ </div>
+ </div>
+ </fieldset>
+ <#if searchConstraintStrings?has_content>
+ <div>
+ <div class="row">
+ <label class="col-sm-3">${uiLabelMap.ProductLastSearch}</label>
+ <div class="col-sm-7">
+ <#list searchConstraintStrings as searchConstraintString>
+ <p>${searchConstraintString}</p>
+ </#list>
+ <p>${uiLabelMap.ProductSortedBy}: ${searchSortOrderString}</p>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="col-sm-3"></div>
+ <div class="col-sm-7">
+ <div class="form-check">
+ <input class="form-check-input" type="radio"
name="clearSearch" id="clearSearchNew" value="Y" checked="checked"/>
+ <label class="form-check-label"
for="clearSearchNew">${uiLabelMap.ProductNewSearch}</label>
+ </div>
+ <div class="form-check">
+ <input class="form-check-input" type="radio"
name="clearSearch" id="clearSearchRefine" value="N"/>
+ <label class="form-check-label"
for="clearSearchRefine">${uiLabelMap.ProductRefineSearch}</label>
+ </div>
+ </div>
+ </div>
+ </div>
+ </#if>
+ <div>
+ <input type="submit" name="submit" class="btn btn-outline-secondary"
value="${uiLabelMap.CommonFind}"/>
+ </div>
+
+ <#if searchOptionsHistoryList?has_content>
+ <div class="card m-3">
+ <div class="card-header">
+ <strong>${uiLabelMap.OrderLastSearches}...</strong>
+ </div>
+ <div class="card-body">
+ <div>
+ <a href="<@ofbizUrl>clearSearchOptionsHistoryList</@ofbizUrl>"
class="button">
+ ${uiLabelMap.OrderClearSearchHistory}
+ </a>
+ <h4>${uiLabelMap.OrderClearSearchHistoryNote}</h5>
+ </div>
+ <#list searchOptionsHistoryList as searchOptions>
+ <#-- searchOptions type is ProductSearchSession.ProductSearchOptions
-->
+ <div>
+ <p>${uiLabelMap.EcommerceSearchNumber}${searchOptions_index +
1}</p>
+ <a
href="<@ofbizUrl>setCurrentSearchFromHistoryAndSearch?searchHistoryIndex=${searchOptions_index}&clearSearch=N</@ofbizUrl>"
+ class="button">${uiLabelMap.CommonSearch}</a>
+ <a
href="<@ofbizUrl>setCurrentSearchFromHistory?searchHistoryIndex=${searchOptions_index}</@ofbizUrl>"
+ class="button">${uiLabelMap.CommonRefine}</a>
+ </div>
+ <#assign constraintStrings =
searchOptions.searchGetConstraintStrings(false, delegator, locale)>
+ <#list constraintStrings as constraintString>
+ <p> - ${constraintString}</p>
+ </#list>
+ <#if searchOptions_has_next>
+ </#if>
+ </#list>
+ </div>
+ </div>
</#if>
- </#list>
- </#if>
- </fieldset>
-</form>
+ </fieldset>
+ </form>
+ </div>
+</div>