You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2015/12/19 08:20:23 UTC
svn commit: r1720887 -
/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl
Author: deepak
Date: Sat Dec 19 07:20:23 2015
New Revision: 1720887
URL: http://svn.apache.org/viewvc?rev=1720887&view=rev
Log:
(OFBIZ-2985) Html cleanup of advanced search page.
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl?rev=1720887&r1=1720886&r2=1720887&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl Sat Dec 19 07:20:23 2015
@@ -19,116 +19,97 @@ under the License.
<#assign searchOptionsHistoryList = Static["org.ofbiz.product.product.ProductSearchSession"].getSearchOptionsHistoryList(session)/>
<#assign currentCatalogId = Static["org.ofbiz.product.catalog.CatalogWorker"].getCurrentCatalogId(request)/>
<h2>${uiLabelMap.ProductAdvancedSearchInCategory}</h2>
-<form name="advtokeywordsearchform" method="post" action="<@o...@ofbizUrl>">
- <input type="hidden" name="VIEW_SIZE" value="10"/>
- <input type="hidden" name="PAGING" value="Y"/>
- <table>
+<form id="advtokeywordsearchform" method="post" action="<@o...@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!}"/>
- <tr valign="middle">
- <td>${uiLabelMap.ProductCategory}</td>
- <td>${(searchCategory.description)!}</td>
- </tr>
- <tr valign="middle">
- <td>${uiLabelMap.ProductIncludeSubCategories}</td>
- <td>
- ${uiLabelMap.CommonYes} <input type="radio" name="SEARCH_SUB_CATEGORIES" value="Y" checked="checked"/>
- ${uiLabelMap.CommonNo} <input type="radio" name="SEARCH_SUB_CATEGORIES" value="N"/>
- </td>
- </tr>
+ <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>
- <tr valign="middle">
- <td>${uiLabelMap.ProductKeywords}</td>
- <td>
- <input type="text" name="SEARCH_STRING" size="32" value="${requestParameters.SEARCH_STRING!}" />
- <br />
- ${uiLabelMap.CommonAny} <input type="radio" name="SEARCH_OPERATOR" value="OR" <#if searchOperator == "OR">checked="checked"</#if> />
- ${uiLabelMap.CommonAll} <input type="radio" name="SEARCH_OPERATOR" value="AND" <#if searchOperator == "AND">checked="checked"</#if> />
- </td>
- </tr>
+ <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 searchOperator == "OR">checked="checked"</#if> />
+ <label for="SEARCH_OPERATOR_ALL">${uiLabelMap.CommonAll}</label> <input type="radio" name="SEARCH_OPERATOR" id="SEARCH_OPERATOR_ALL" value="AND" <#if searchOperator == "AND">checked="checked"</#if> />
+ </div>
<#list productFeatureTypeIdsOrdered as productFeatureTypeId>
<#assign findPftMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId", productFeatureTypeId)>
<#assign productFeatureType = delegator.findOne("ProductFeatureType", findPftMap, true)>
<#assign productFeatures = productFeaturesByTypeMap[productFeatureTypeId]>
- <tr valign="middle">
- <td>${(productFeatureType.get("description",locale))!}</td>
- <td>
- <select name="pft_${productFeatureTypeId}">
- <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
- <#list productFeatures as productFeature>
- <option value="${productFeature.productFeatureId}">${productFeature.description?default(productFeature.productFeatureId)}</option>
- </#list>
- </select>
- </td>
- </tr>
+ <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>
- <tr valign="middle">
- <td>${uiLabelMap.ProductSortedBy}</td>
- <td>
- <select name="sortOrder" class="selectBox">
- <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>
- <br />
- ${uiLabelMap.EcommerceLowToHigh} <input type="radio" name="sortAscending" value="Y" checked="checked"/>
- ${uiLabelMap.EcommerceHighToLow} <input type="radio" name="sortAscending" value="N"/>
- </td>
- </tr>
+ <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>
+ </#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>
- <tr valign="top">
- <td>${uiLabelMap.ProductLastSearch}</td>
- <td>
- <#list searchConstraintStrings as searchConstraintString>
- <div> - ${searchConstraintString}</div>
- </#list>
- <div>${uiLabelMap.ProductSortedBy}: ${searchSortOrderString}</div>
- <div>
- ${uiLabelMap.ProductNewSearch}<input type="radio" name="clearSearch" value="Y" checked="checked"/>
- ${uiLabelMap.CommonRefineSearch}<input type="radio" name="clearSearch" value="N"/>
- </div>
- </td>
- </tr>
+ <div>
+ <label>${uiLabelMap.ProductLastSearch}</label>
+ <#list searchConstraintStrings as searchConstraintString>
+ <p>${searchConstraintString}</p>
+ </#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>
- <tr>
- <td> </td>
- <td><a href="javascript:document.advtokeywordsearchform.submit()" class="buttontext">${uiLabelMap.CommonFind}</a></td>
- </tr>
- </table>
-
- <#if searchOptionsHistoryList?has_content>
-
-
- <h2>${uiLabelMap.OrderLastSearches}...</h2>
-
<div>
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.OrderClearSearchHistory}</a>
- ${uiLabelMap.OrderClearSearchHistoryNote}
+ <input type="submit" name="submit" class="button" value="${uiLabelMap.CommonFind}" />
</div>
- <#list searchOptionsHistoryList as searchOptions>
- <#-- searchOptions type is ProductSearchSession.ProductSearchOptions -->
+ <#if searchOptionsHistoryList?has_content>
+ <h2>${uiLabelMap.OrderLastSearches}...</h2>
+ <div>
+ <a href="<@o...@ofbizUrl>" class="button">${uiLabelMap.OrderClearSearchHistory}</a>
+ <h3>${uiLabelMap.OrderClearSearchHistoryNote}</h3>
+ </div>
+ <#list searchOptionsHistoryList as searchOptions>
+ <#-- searchOptions type is ProductSearchSession.ProductSearchOptions -->
<div>
- ${uiLabelMap.EcommerceSearchNumber}${searchOptions_index + 1}
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonSearch}</a>
- <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRefine}</a>
+ <p>${uiLabelMap.EcommerceSearchNumber}${searchOptions_index + 1}</p>
+ <a href="<@o...@ofbizUrl>" class="button">${uiLabelMap.CommonSearch}</a>
+ <a href="<@o...@ofbizUrl>" class="button">${uiLabelMap.CommonRefine}</a>
</div>
<#assign constraintStrings = searchOptions.searchGetConstraintStrings(false, delegator, locale)>
<#list constraintStrings as constraintString>
- <div> - ${constraintString}</div>
+ <p> - ${constraintString}</p>
</#list>
<#if searchOptions_has_next>
</#if>
- </#list>
- </#if>
+ </#list>
+ </#if>
+ </fieldset>
</form>