Author: mrisaliti
Date: Wed Dec 12 12:49:03 2007
New Revision: 603735
URL: http://svn.apache.org/viewvc?rev=603735&view=rev
Log:
Now is it possible to search the product by GoodIdentification Type/Value (Part
of issue OFBIZ-1372)
Modified:
ofbiz/trunk/applications/product/config/ProductUiLabels.properties
ofbiz/trunk/applications/product/config/ProductUiLabels_it.properties
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.bsh
ofbiz/trunk/applications/product/webapp/catalog/find/advancedsearch.ftl
ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl
Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties
(original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Wed Dec
12 12:49:03 2007
@@ -648,6 +648,8 @@
ProductGlobalPriceRule=Global Price Rule
ProductGlobalPriceRules=Global Price Rules
ProductGoodIdentification=Good Identification
+ProductGoodIdentificationType=Good Identification Type
+ProductGoodIdentificationValue=Good Identification Value
ProductGoToFeatureCategory=Go to Feature Category
ProductGrams=Grams
ProductGroupMemberMaintenance=Group Member Maintenance
Modified: ofbiz/trunk/applications/product/config/ProductUiLabels_it.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels_it.properties?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels_it.properties
(original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels_it.properties Wed
Dec 12 12:49:03 2007
@@ -628,7 +628,10 @@
ProductGlobal=Globale
ProductGlobalPriceRule=Regola Globale Prezzi
ProductGlobalPriceRules=Regole Globali Prezzi
-ProductGoodIdentification=Giusta Identificazione
+ProductGoodIdentification=Identificazione Prodotto
+ProductGoodIdentificationTypeValue=Tipo/Valore Identificazione Prodotto
+ProductGoodIdentificationType=Tipo Identificazione Prodotto
+ProductGoodIdentificationValue=Valore Identificazione Prodotto
ProductGoToFeatureCategory=Vai alle Categoria Caratteristiche
ProductGrams=Grammi
ProductGroupMemberMaintenance=Manutenzione Membri Gruppo
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
Wed Dec 12 12:49:03 2007
@@ -40,6 +40,7 @@
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityComparisonOperator;
import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityConditionList;
import org.ofbiz.entity.condition.EntityConditionParam;
@@ -68,6 +69,7 @@
public static final String module = ProductSearch.class.getName();
public static final String resource = "ProductUiLabels";
+ public static final String resourceCommon = "CommonUiLabels";
public static ArrayList parametricKeywordSearch(Map featureIdByType,
String keywordsString, GenericDelegator delegator, String productCategoryId,
String visitId, boolean anyPrefix, boolean anySuffix, boolean isAnd) {
Set featureIdSet = FastSet.newInstance();
@@ -1710,6 +1712,96 @@
public boolean equals(Object obj) {
ProductSearchConstraint psc = (ProductSearchConstraint) obj;
if (psc instanceof AvailabilityDateConstraint) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static class GoodIdentificationConstraint extends
ProductSearchConstraint {
+ public static final String constraintName = "GoodIdentification";
+ protected String goodIdentificationTypeId;
+ protected String goodIdentificationValue;
+ protected Boolean include;
+
+ public GoodIdentificationConstraint(String goodIdentificationTypeId,
String goodIdentificationValue, Boolean include) {
+ this.goodIdentificationTypeId = goodIdentificationTypeId;
+ this.goodIdentificationValue = goodIdentificationValue;
+ this.include = include;
+ }
+
+ public void addConstraint(ProductSearchContext productSearchContext) {
+ if (UtilValidate.isNotEmpty(goodIdentificationTypeId) ||
+ UtilValidate.isNotEmpty(goodIdentificationValue) ||
+ UtilValidate.isNotEmpty(include)) {
+
+ // make index based values and increment
+ String entityAlias = "GI" + productSearchContext.index;
+ String prefix = "gi" + productSearchContext.index;
+ productSearchContext.index++;
+
+
+ EntityComparisonOperator operator = EntityOperator.EQUALS;
+
+ if (UtilValidate.isNotEmpty(include) && include ==
Boolean.FALSE) {
+ operator = EntityOperator.NOT_EQUAL;
+ }
+
+
productSearchContext.dynamicViewEntity.addMemberEntity(entityAlias,
"GoodIdentification");
+
+ if (UtilValidate.isNotEmpty(goodIdentificationTypeId)) {
+
productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix +
"GoodIdentificationTypeId", "goodIdentificationTypeId", null, null, null, null);
+ productSearchContext.entityConditionList.add(new
EntityExpr(prefix + "GoodIdentificationTypeId", operator,
goodIdentificationTypeId));
+ }
+
+ if (UtilValidate.isNotEmpty(goodIdentificationValue)) {
+
productSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix +
"GoodIdentificationValue", "idValue", null, null, null, null);
+ productSearchContext.entityConditionList.add(new
EntityExpr(prefix + "GoodIdentificationValue", operator,
goodIdentificationValue));
+ }
+
+ productSearchContext.dynamicViewEntity.addViewLink("PROD",
entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
+
+
productSearchContext.productSearchConstraintList.add(productSearchContext.getDelegator().makeValue("ProductSearchConstraint",
+ UtilMisc.toMap("constraintName", constraintName,
"infoString", "goodIdentificationTypeId [" + this.goodIdentificationTypeId + "]
goodIdentificationValue [" + this.goodIdentificationValue + "] include [" +
this.include + "]")));
+ }
+ }
+
+ public String prettyPrintConstraint(GenericDelegator delegator,
boolean detailed, Locale locale) {
+ if (UtilValidate.isEmpty(goodIdentificationTypeId) &&
+ UtilValidate.isEmpty(goodIdentificationValue) &&
+ UtilValidate.isEmpty(include)) {
+ return null;
+ }
+
+ StringBuffer msgBuf = new StringBuffer();
+
+ if (UtilValidate.isNotEmpty(include) && include == Boolean.FALSE) {
+ msgBuf.append(UtilProperties.getMessage(resourceCommon,
"CommonExclude", locale));
+ msgBuf.append(" ");
+ } else {
+ msgBuf.append(UtilProperties.getMessage(resourceCommon,
"CommonInclude", locale));
+ msgBuf.append(" ");
+ }
+
+ if (UtilValidate.isNotEmpty(goodIdentificationTypeId)) {
+ msgBuf.append(UtilProperties.getMessage(resource,
"ProductIdType", locale));
+ msgBuf.append(": ");
+ msgBuf.append(goodIdentificationTypeId);
+ msgBuf.append(" ");
+ }
+
+ if (UtilValidate.isNotEmpty(goodIdentificationValue)) {
+ msgBuf.append(UtilProperties.getMessage(resource,
"ProductIdValue", locale));
+ msgBuf.append(" ");
+ msgBuf.append(goodIdentificationValue);
+ }
+ return msgBuf.toString();
+ }
+
+ public boolean equals(Object obj) {
+ ProductSearchConstraint psc = (ProductSearchConstraint) obj;
+ if (psc instanceof GoodIdentificationConstraint) {
return true;
} else {
return false;
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
(original)
+++
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
Wed Dec 12 12:49:03 2007
@@ -548,7 +548,7 @@
ProductSearchOptions.setTopProductCategoryId(prioritizeCategoryId,
session);
constraintsChanged = true;
}
-
+
// if there is another category, add a constraint for it
if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_CATEGORY_ID"))) {
String searchCategoryId = (String)
parameters.get("SEARCH_CATEGORY_ID");
@@ -768,6 +768,22 @@
if ("true".equalsIgnoreCase((String)
parameters.get("AVAILABILITY_FILTER"))) {
searchAddConstraint(new
ProductSearch.AvailabilityDateConstraint(), session);
+ constraintsChanged = true;
+ }
+
+ if (UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_TYPE")) ||
+ UtilValidate.isNotEmpty((String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_VALUE"))) {
+ String include = (String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_INCL");
+ if (UtilValidate.isEmpty(include)) {
+ include = "Y";
+ }
+ Boolean inc = Boolean.TRUE;
+ if ("N".equalsIgnoreCase(include)) {
+ inc = Boolean.FALSE;
+ }
+
+ searchAddConstraint(new
ProductSearch.GoodIdentificationConstraint((String)parameters.get("SEARCH_GOOD_IDENTIFICATION_TYPE"),
+ (String)
parameters.get("SEARCH_GOOD_IDENTIFICATION_VALUE"), inc), session);
constraintsChanged = true;
}
Modified:
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.bsh?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.bsh
(original)
+++
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.bsh
Wed Dec 12 12:49:03 2007
@@ -47,6 +47,9 @@
// get suppliers in system
supplerPartyRoleAndPartyDetails =
delegator.findByAnd("PartyRoleAndPartyDetail", UtilMisc.toMap("roleTypeId",
"SUPPLIER"), UtilMisc.toList("groupName", "firstName"));
+// get the GoodIdentification types
+goodIdentificationTypes = delegator.findAll("GoodIdentificationType",
UtilMisc.toList("description"));
+
context.put("searchCategoryId", searchCategoryId);
context.put("searchCategory", searchCategory);
context.put("productFeaturesByTypeMap", productFeaturesByTypeMap);
@@ -55,3 +58,4 @@
context.put("searchConstraintStrings", searchConstraintStrings);
context.put("searchSortOrderString", searchSortOrderString);
context.put("supplerPartyRoleAndPartyDetails",
supplerPartyRoleAndPartyDetails);
+context.put("goodIdentificationTypes", goodIdentificationTypes);
\ No newline at end of file
Modified:
ofbiz/trunk/applications/product/webapp/catalog/find/advancedsearch.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/advancedsearch.ftl?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/advancedsearch.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/advancedsearch.ftl Wed
Dec 12 12:49:03 2007
@@ -16,254 +16,281 @@
specific language governing permissions and limitations
under the License.
-->
-<h1>${uiLabelMap.ProductAdvancedSearchinCategory}</h1>
-<br/>
-<form name="advtokeywordsearchform" method="post"
action="<@ofbizUrl>keywordsearch</@ofbizUrl>" style="margin: 0;">
- <input type="hidden" name="VIEW_SIZE" value="25"/>
- <input type="hidden" name="PAGING" value="Y"/>
- <table border="0" wdith="100%">
- <#if searchCategory?has_content>
- <input type="hidden" name="SEARCH_CATEGORY_ID"
value="${searchCategoryId?if_exists}"/>
+<div class="screenlet">
+ <div class="screenlet-title-bar">
+ <h3>${uiLabelMap.ProductAdvancedSearchinCategory}</h3>
+ </div>
+ <div class="screenlet-body">
+ <form name="advtokeywordsearchform" method="post"
action="<@ofbizUrl>keywordsearch</@ofbizUrl>" style="margin: 0;">
+ <input type="hidden" name="VIEW_SIZE" value="25"/>
+ <input type="hidden" name="PAGING" value="Y"/>
+ <table border="0" width="100%">
+ <#if searchCategory?has_content>
+ <input type="hidden" name="SEARCH_CATEGORY_ID"
value="${searchCategoryId?if_exists}"/>
+ <tr>
+ <td class="label" align="right" valign="middle">
+ ${uiLabelMap.ProductCategory}:
+ </td>
+ <td valign="middle">
+ <div class="tabletext">
+ <b>"${(searchCategory.description)?if_exists}"
[${(searchCategory.productCategoryId)?if_exists}]</b>
${uiLabelMap.ProductIncludeSubCategories}?
+ ${uiLabelMap.CommonYes}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="Y" checked/>
+ ${uiLabelMap.CommonNo}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="N"/>
+ </div>
+ </td>
+ </tr>
+ <#else>
+ <tr>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ProductCatalog}:
+ </td>
+ <td valign="middle">
+ <div class="tabletext">
+ <select class="selectBox" name="SEARCH_CATALOG_ID">
+ <option value="">- ${uiLabelMap.ProductAnyCatalog}
-</option>
+ <#list prodCatalogs as prodCatalog>
+ <#assign displayDesc =
prodCatalog.catalogName?default("${uiLabelMap.ProductNoDescription}")>
+ <#if 18 < displayDesc?length>
+ <#assign displayDesc = displayDesc[0..15] + "...">
+ </#if>
+ <option
value="${prodCatalog.prodCatalogId}">${displayDesc}
[${prodCatalog.prodCatalogId}]</option>
+ </#list>
+ </select>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ProductCategory}:
+ </td>
+ <td valign="middle">
+ <div class="tabletext">
+ <input type="text" class="inputBox"
name="SEARCH_CATEGORY_ID" size="20" maxlength="20"
value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/>
+ <a
href="javascript:call_fieldlookup2(document.advtokeywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img
src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click
here For Field Lookup'/></a>
+ ${uiLabelMap.ProductIncludeSubCategories}?
+ ${uiLabelMap.CommonYes}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="Y" checked="checked"/>
+ ${uiLabelMap.CommonNo}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="N"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_CATEGORY_EXC" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_CATEGORY_EXC" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_CATEGORY_EXC" value="N"/>
+ </div>
+ </td>
+ </tr>
+ </#if>
<tr>
- <td align="right" valign="middle">
- <div class="tabletext">${uiLabelMap.ProductCategory}:</div>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ProductKeywords}:
</td>
<td valign="middle">
<div class="tabletext">
- <b>"${(searchCategory.description)?if_exists}"
[${(searchCategory.productCategoryId)?if_exists}]</b>
${uiLabelMap.ProductIncludeSubCategories}?
- ${uiLabelMap.CommonYes}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="Y" checked/>
- ${uiLabelMap.CommonNo}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="N"/>
+ <input type="text" class="inputBox" name="SEARCH_STRING"
size="40" value="${requestParameters.SEARCH_STRING?if_exists}"/>
+ ${uiLabelMap.CommonAny}<input type="radio"
name="SEARCH_OPERATOR" value="OR" <#if searchOperator == "OR">checked</#if>/>
+ ${uiLabelMap.CommonAll}<input type="radio"
name="SEARCH_OPERATOR" value="AND" <#if searchOperator == "AND">checked</#if>/>
</div>
</td>
</tr>
- <#else>
- <tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductCatalog}:</div>
- </td>
- <td valign="middle">
- <div class="tabletext">
- <select class="selectBox" name="SEARCH_CATALOG_ID">
- <option value="">- ${uiLabelMap.ProductAnyCatalog} -</option>
- <#list prodCatalogs as prodCatalog>
- <#assign displayDesc =
prodCatalog.catalogName?default("${uiLabelMap.ProductNoDescription}")>
- <#if 18 < displayDesc?length>
- <#assign displayDesc = displayDesc[0..15] + "...">
- </#if>
- <option
value="${prodCatalog.prodCatalogId}">${displayDesc}
[${prodCatalog.prodCatalogId}]</option>
+ <tr>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ProductFeatureCategory} ${uiLabelMap.CommonIds}:
+ </td>
+ <td valign="middle">
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_CAT1"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT1?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC1" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC1" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC1" value="N"/>
+ </div>
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_CAT2"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT2?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC2" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC2" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC2" value="N"/>
+ </div>
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_CAT3"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT3?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC3" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC3" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC3" value="N"/>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ProductFeatureGroup} ${uiLabelMap.CommonIds}:
+ </td>
+ <td valign="middle">
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_GRP1"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP1?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC1" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC1" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC1" value="N"/>
+ </div>
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_GRP2"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP2?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC2" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC2" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC2" value="N"/>
+ </div>
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_GRP3"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP3?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC3" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC3" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC3" value="N"/>
+ </div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ProductFeatures} ${uiLabelMap.CommonIds}:
+ </td>
+ <td valign="middle">
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_FEAT1"
size="15" value="${requestParameters.SEARCH_FEAT1?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_FEAT_EXC1" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_FEAT_EXC1" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_FEAT_EXC1" value="N"/>
+ </div>
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_FEAT2"
size="15" value="${requestParameters.SEARCH_FEAT2?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_FEAT_EXC2" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_FEAT_EXC2" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_FEAT_EXC2" value="N"/>
+ </div>
+ <div>
+ <input type="text" class="inputBox" name="SEARCH_FEAT3"
size="15" value="${requestParameters.SEARCH_FEAT3?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_FEAT_EXC3" value="" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_FEAT_EXC3" value="Y"/>
+ ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_FEAT_EXC3" value="N"/>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="label" align="right" valign="top">
+ ${uiLabelMap.ListPriceRange}:
+ </td>
+ <td valign="middle">
+ <div>
+ <input type="text" class="inputBox" name="LIST_PRICE_LOW"
size="8" value="${requestParameters.LIST_PRICE_LOW?if_exists}"/>
+ <input type="text" class="inputBox" name="LIST_PRICE_HIGH"
size="8" value="${requestParameters.LIST_PRICE_HIGH?if_exists}"/>
+ </div>
+ </td>
+ </tr>
+ <#list productFeatureTypeIdsOrdered as productFeatureTypeId>
+ <#assign findPftMap =
Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId",
productFeatureTypeId)>
+ <#assign productFeatureType =
delegator.findByPrimaryKeyCache("ProductFeatureType", findPftMap)>
+ <#assign productFeatures =
productFeaturesByTypeMap[productFeatureTypeId]>
+ <tr>
+ <td class="label" align="right" valign="middle">
+ ${(productFeatureType.get("description",locale))?if_exists}:
+ </td>
+ <td valign="middle">
+ <div class="tabletext">
+ <select class="selectBox" name="pft_${productFeatureTypeId}">
+ <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+ <#list productFeatures as productFeature>
+ <option
value="${productFeature.productFeatureId}">${productFeature.description?default("${uiLabelMap.ProductNoDescription}")}
[${productFeature.productFeatureId}]</option>
</#list>
</select>
- </div>
- </td>
- </tr>
+ </div>
+ </td>
+ </tr>
+ </#list>
<tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductCategory}:</div>
+ <td class="label" align="right" valign="middle">
+ ${uiLabelMap.ProductSupplier}:
</td>
<td valign="middle">
<div class="tabletext">
- <input type="text" class="inputBox" name="SEARCH_CATEGORY_ID"
size="20" maxlength="20"
value="${requestParameters.SEARCH_CATEGORY_ID?if_exists}"/>
- <a
href="javascript:call_fieldlookup2(document.advtokeywordsearchform.SEARCH_CATEGORY_ID,'LookupProductCategory');"><img
src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click
here For Field Lookup'/></a>
- ${uiLabelMap.ProductIncludeSubCategories}?
- ${uiLabelMap.CommonYes}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="Y" checked="checked"/>
- ${uiLabelMap.CommonNo}<input type="radio"
name="SEARCH_SUB_CATEGORIES" value="N"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_CATEGORY_EXC" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_CATEGORY_EXC" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_CATEGORY_EXC" value="N"/>
- </div>
- </td>
- </tr>
- </#if>
- <tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductKeywords}:</div>
- </td>
- <td valign="middle">
- <div class="tabletext">
- <input type="text" class="inputBox" name="SEARCH_STRING" size="40"
value="${requestParameters.SEARCH_STRING?if_exists}"/>
- ${uiLabelMap.CommonAny}<input type="radio" name="SEARCH_OPERATOR"
value="OR" <#if searchOperator == "OR">checked</#if>/>
- ${uiLabelMap.CommonAll}<input type="radio" name="SEARCH_OPERATOR"
value="AND" <#if searchOperator == "AND">checked</#if>/>
- </div>
- </td>
- </tr>
- <tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductFeatureCategory}
${uiLabelMap.CommonIds}:</div>
- </td>
- <td valign="middle">
- <div>
- <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_CAT1"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT1?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC1" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC1" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC1" value="N"/>
- </div>
- <div>
- <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_CAT2"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT2?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC2" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC2" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC2" value="N"/>
- </div>
- <div>
- <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_CAT3"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_CAT3?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC3" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC3" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_CAT_EXC3" value="N"/>
- </div>
- </td>
- </tr>
- <tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductFeatureGroup}
${uiLabelMap.CommonIds}:</div>
- </td>
- <td valign="middle">
- <div>
- <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_GRP1"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP1?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC1" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC1" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC1" value="N"/>
- </div>
- <div>
- <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_GRP2"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP2?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC2" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC2" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC2" value="N"/>
- </div>
- <div>
- <input type="text" class="inputBox" name="SEARCH_PROD_FEAT_GRP3"
size="15" value="${requestParameters.SEARCH_PROD_FEAT_GRP3?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC3" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC3" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_PROD_FEAT_GRP_EXC3" value="N"/>
- </div>
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductFeatures}
${uiLabelMap.CommonIds}:</div>
- </td>
- <td valign="middle">
- <div>
- <input type="text" class="inputBox" name="SEARCH_FEAT1" size="15"
value="${requestParameters.SEARCH_FEAT1?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_FEAT_EXC1" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_FEAT_EXC1" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_FEAT_EXC1" value="N"/>
- </div>
- <div>
- <input type="text" class="inputBox" name="SEARCH_FEAT2" size="15"
value="${requestParameters.SEARCH_FEAT2?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_FEAT_EXC2" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_FEAT_EXC2" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_FEAT_EXC2" value="N"/>
- </div>
- <div>
- <input type="text" class="inputBox" name="SEARCH_FEAT3" size="15"
value="${requestParameters.SEARCH_FEAT3?if_exists}"/>
- ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_FEAT_EXC3" value="" checked="checked"/>
- ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_FEAT_EXC3" value="Y"/>
- ${uiLabelMap.CommonAlwaysInclude}<input type="radio"
name="SEARCH_FEAT_EXC3" value="N"/>
- </div>
- </td>
- </tr>
- <tr>
- <td align="right" valign="top">
- <div>${uiLabelMap.ListPriceRange}:</div>
- </td>
- <td valign="middle">
- <div>
- <input type="text" class="inputBox" name="LIST_PRICE_LOW" size="8"
value="${requestParameters.LIST_PRICE_LOW?if_exists}"/>
- <input type="text" class="inputBox" name="LIST_PRICE_HIGH" size="8"
value="${requestParameters.LIST_PRICE_HIGH?if_exists}"/>
- </div>
- </td>
- </tr>
- <#list productFeatureTypeIdsOrdered as productFeatureTypeId>
- <#assign findPftMap =
Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId",
productFeatureTypeId)>
- <#assign productFeatureType =
delegator.findByPrimaryKeyCache("ProductFeatureType", findPftMap)>
- <#assign productFeatures =
productFeaturesByTypeMap[productFeatureTypeId]>
- <tr>
- <td align="right" valign="middle">
- <div
class="tabletext">${(productFeatureType.get("description",locale))?if_exists}:</div>
- </td>
- <td valign="middle">
- <div class="tabletext">
- <select class="selectBox" name="pft_${productFeatureTypeId}">
+ <select name="SEARCH_SUPPLIER_ID" class="selectBox">
+ <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
+ <#list supplerPartyRoleAndPartyDetails as
supplerPartyRoleAndPartyDetail>
+ <option
value="${supplerPartyRoleAndPartyDetail.partyId}">${supplerPartyRoleAndPartyDetail.groupName?if_exists}
${supplerPartyRoleAndPartyDetail.firstName?if_exists}
${supplerPartyRoleAndPartyDetail.lastName?if_exists}
[${supplerPartyRoleAndPartyDetail.partyId}]</option>
+ </#list>
+ </select>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="label" align="right" valign="middle">
+ ${uiLabelMap.CommonSortedBy}:
+ </td>
+ <td valign="middle">
+ <div class="tabletext">
+ <select name="sortOrder" class="selectBox">
+ <option
value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
+ <option
value="SortProductField:productName">${uiLabelMap.ProductProductName}</option>
+ <option
value="SortProductField:internalName">${uiLabelMap.ProductInternalName}</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>
+ <option
value="SortProductPrice:AVERAGE_COST">${uiLabelMap.ProductAverageCost}</option>
+ <option
value="SortProductPrice:MINIMUM_PRICE">${uiLabelMap.ProductMinimumPrice}</option>
+ <option
value="SortProductPrice:MAXIMUM_PRICE">${uiLabelMap.ProductMaximumPrice}</option>
+ </select>
+ ${uiLabelMap.ProductLowToHigh}<input type="radio"
name="sortAscending" value="Y" checked/>
+ ${uiLabelMap.ProductHighToLow}<input type="radio"
name="sortAscending" value="N"/>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="label" align="right" valign="middle">
+ ${uiLabelMap.ProductPrioritizeProductsinCategory}:
+ </td>
+ <td valign="middle">
+ <input type="text" class="inputBox" name="PRIORITIZE_CATEGORY_ID"
size="20" maxlength="20"
value="${requestParameters.PRIORITIZE_CATEGORY_ID?if_exists}"/>
+ <a
href="javascript:call_fieldlookup2(document.advtokeywordsearchform.PRIORITIZE_CATEGORY_ID,'LookupProductCategory');"><img
src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click
here For Field Lookup'/></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ ${uiLabelMap.ProductGoodIdentificationType}
+ </td>
+ <td>
+ <select name="SEARCH_GOOD_IDENTIFICATION_TYPE" class="selectBox">
<option value="">- ${uiLabelMap.CommonSelectAny} -</option>
- <#list productFeatures as productFeature>
- <option
value="${productFeature.productFeatureId}">${productFeature.description?default("${uiLabelMap.ProductNoDescription}")}
[${productFeature.productFeatureId}]</option>
+ <#list goodIdentificationTypes as goodIdentificationType>
+ <option
value="${goodIdentificationType.goodIdentificationTypeId}">${goodIdentificationType.get("description")?if_exists}</option>
</#list>
</select>
- </div>
- </td>
- </tr>
- </#list>
- <tr>
- <td align="right" valign="middle">
- <div class="tabletext">${uiLabelMap.ProductSupplier}:</div>
- </td>
- <td valign="middle">
- <div class="tabletext">
- <select name="SEARCH_SUPPLIER_ID" class="selectBox">
- <option value="">- ${uiLabelMap.CommonSelectAny} -</option>
- <#list supplerPartyRoleAndPartyDetails as
supplerPartyRoleAndPartyDetail>
- <option
value="${supplerPartyRoleAndPartyDetail.partyId}">${supplerPartyRoleAndPartyDetail.groupName?if_exists}
${supplerPartyRoleAndPartyDetail.firstName?if_exists}
${supplerPartyRoleAndPartyDetail.lastName?if_exists}
[${supplerPartyRoleAndPartyDetail.partyId}]</option>
- </#list>
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle">
- <div class="tabletext">${uiLabelMap.CommonSortedBy}:</div>
- </td>
- <td valign="middle">
- <div class="tabletext">
- <select name="sortOrder" class="selectBox">
- <option
value="SortKeywordRelevancy">${uiLabelMap.ProductKeywordRelevancy}</option>
- <option
value="SortProductField:productName">${uiLabelMap.ProductProductName}</option>
- <option
value="SortProductField:internalName">${uiLabelMap.ProductInternalName}</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>
- <option
value="SortProductPrice:AVERAGE_COST">${uiLabelMap.ProductAverageCost}</option>
- <option
value="SortProductPrice:MINIMUM_PRICE">${uiLabelMap.ProductMinimumPrice}</option>
- <option
value="SortProductPrice:MAXIMUM_PRICE">${uiLabelMap.ProductMaximumPrice}</option>
- </select>
- ${uiLabelMap.ProductLowToHigh}<input type="radio"
name="sortAscending" value="Y" checked/>
- ${uiLabelMap.ProductHighToLow}<input type="radio"
name="sortAscending" value="N"/>
- </div>
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle">
- ${uiLabelMap.ProductPrioritizeProductsinCategory}:
- </td>
- <td valign="middle">
- <input type="text" class="inputBox" name="PRIORITIZE_CATEGORY_ID"
size="20" maxlength="20"
value="${requestParameters.PRIORITIZE_CATEGORY_ID?if_exists}"/>
- <a
href="javascript:call_fieldlookup2(document.advtokeywordsearchform.PRIORITIZE_CATEGORY_ID,'LookupProductCategory');"><img
src='/images/fieldlookup.gif' width='15' height='14' border='0' alt='Click
here For Field Lookup'/></a>
- </td>
- </tr>
- <#if searchConstraintStrings?has_content>
- <tr>
- <td align="right" valign="top">
- <div class="tabletext">${uiLabelMap.ProductLastSearch}</div>
- </td>
- <td valign="top">
- <#list searchConstraintStrings as searchConstraintString>
- <div
class="tabletext"> - ${searchConstraintString}</div>
- </#list>
- <div class="tabletext">${uiLabelMap.CommonSortedBy}:
${searchSortOrderString}</div>
- <div class="tabletext">
- ${uiLabelMap.ProductNewSearch}<input type="radio"
name="clearSearch" value="Y" checked="checked"/>
- ${uiLabelMap.ProductRefineSearch}<input type="radio"
name="clearSearch" value="N"/>
- </div>
- </td>
- </tr>
- </#if>
- <tr>
- <td>
- <div class="tabletext">
- <a href="javascript:document.advtokeywordsearchform.submit()"
class="buttontext">${uiLabelMap.CommonFind}</a>
- </div>
- </td>
- </tr>
- </table>
-</form>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ ${uiLabelMap.ProductGoodIdentificationValue}
+ </td>
+ <td>
+ <input type="text" class="inputBox"
name="SEARCH_GOOD_IDENTIFICATION_VALUE" size="60" maxlength="60"
value="${requestParameters.SEARCH_GOOD_IDENTIFICATION_VALUE?if_exists}"/>
+ ${uiLabelMap.CommonInclude}<input type="radio"
name="SEARCH_GOOD_IDENTIFICATION_INCL" value="Y" checked="checked"/>
+ ${uiLabelMap.CommonExclude}<input type="radio"
name="SEARCH_GOOD_IDENTIFICATION_INCL" value="N"/>
+ </td>
+ </tr>
+ <#if searchConstraintStrings?has_content>
+ <tr>
+ <td align="right" valign="top">
+ <div class="tabletext">${uiLabelMap.ProductLastSearch}</div>
+ </td>
+ <td valign="top">
+ <#list searchConstraintStrings as searchConstraintString>
+ <div
class="tabletext"> - ${searchConstraintString}</div>
+ </#list>
+ <div class="tabletext">${uiLabelMap.CommonSortedBy}:
${searchSortOrderString}</div>
+ <div class="tabletext">
+ ${uiLabelMap.ProductNewSearch}<input type="radio"
name="clearSearch" value="Y" checked="checked"/>
+ ${uiLabelMap.ProductRefineSearch}<input type="radio"
name="clearSearch" value="N"/>
+ </div>
+ </td>
+ </tr>
+ </#if>
+ <tr>
+ <td align="center" colspan="2">
+ <hr/>
+ <a href="javascript:document.advtokeywordsearchform.submit()"
class="buttontext">${uiLabelMap.CommonFind}</a>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+</div>
\ No newline at end of file
Modified: ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl?rev=603735&r1=603734&r2=603735&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl
(original)
+++ ofbiz/trunk/applications/product/webapp/catalog/find/keywordsearch.ftl Wed
Dec 12 12:49:03 2007
@@ -16,114 +16,119 @@
specific language governing permissions and limitations
under the License.
-->
-
-<h1>${uiLabelMap.ProductSearchProducts}, <span
class="head2">${uiLabelMap.ProductSearchFor}:</span></h1>
-<#list searchConstraintStrings as searchConstraintString>
- <div class="tabletext"> <a
href="<@ofbizUrl>keywordsearch?removeConstraint=${searchConstraintString_index}&clearSearch=N</@ofbizUrl>"
class="buttontext">X</a> ${searchConstraintString}</div>
-</#list>
-<div class="tabletext">${uiLabelMap.CommonSortedBy}:
${searchSortOrderString}</div>
-<div class="tabletext"><a
href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${(requestParameters.SEARCH_CATEGORY_ID)?if_exists}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonRefine}
${uiLabelMap.CommonSearch}</a></div>
-
-<#if !productIds?has_content>
- <br/><h2> ${uiLabelMap.ProductNoResultsFound}.</h2>
-</#if>
-
-<#if productIds?has_content>
-<script language="JavaScript" type="text/javascript">
- function checkProductToBagTextArea(field, idValue) {
- fullValue = idValue + "\n";
- tempStr =
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value;
- if (field.checked) {
- if (tempStr.length > 0 && tempStr.substring(tempStr.length-1,
tempStr.length) != "\n") {
- tempStr = tempStr + "\n";
- }
-
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value
= tempStr + fullValue;
- } else {
- start =
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value.indexOf(fullValue);
- if (start >= 0) {
- end = start + fullValue.length;
-
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value
= tempStr.substring(0, start) + tempStr.substring(end, tempStr.length);
-
//document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value
+= start + ", " + end + "\n";
+<div class="screenlet">
+ <div class="screenlet-title-bar">
+ <h3>${uiLabelMap.ProductSearchProducts},
${uiLabelMap.ProductSearchFor}:</h3>
+ </div>
+ <div class="screenlet-body">
+ <#list searchConstraintStrings as searchConstraintString>
+ <div class="tabletext"> <a
href="<@ofbizUrl>keywordsearch?removeConstraint=${searchConstraintString_index}&clearSearch=N</@ofbizUrl>"
class="buttontext">X</a> ${searchConstraintString}</div>
+ </#list>
+ <div class="tabletext">${uiLabelMap.CommonSortedBy}:
${searchSortOrderString}</div>
+ <div class="tabletext"><a
href="<@ofbizUrl>advancedsearch?SEARCH_CATEGORY_ID=${(requestParameters.SEARCH_CATEGORY_ID)?if_exists}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonRefine}
${uiLabelMap.CommonSearch}</a></div>
+
+ <#if !productIds?has_content>
+ <br/><h2> ${uiLabelMap.ProductNoResultsFound}.</h2>
+ </#if>
+
+ <#if productIds?has_content>
+ <script language="JavaScript" type="text/javascript">
+ function checkProductToBagTextArea(field, idValue) {
+ fullValue = idValue + "\n";
+ tempStr =
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value;
+ if (field.checked) {
+ if (tempStr.length > 0 && tempStr.substring(tempStr.length-1,
tempStr.length) != "\n") {
+ tempStr = tempStr + "\n";
+ }
+
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value
= tempStr + fullValue;
+ } else {
+ start =
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value.indexOf(fullValue);
+ if (start >= 0) {
+ end = start + fullValue.length;
+
document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value
= tempStr.substring(0, start) + tempStr.substring(end, tempStr.length);
+
//document.forms["quickCreateVirtualWithVariants"].elements["variantProductIdsBag"].value
+= start + ", " + end + "\n";
+ }
}
}
- }
-
- function toggleAll(e) {
- var cform = document.products;
- var len = cform.elements.length;
- for (var i = 0; i < len; i++) {
- var element = cform.elements[i];
- if (element.name == "selectResult" && element.checked !=
e.checked) {
- toggle(element);
+
+ function toggleAll(e) {
+ var cform = document.products;
+ var len = cform.elements.length;
+ for (var i = 0; i < len; i++) {
+ var element = cform.elements[i];
+ if (element.name == "selectResult" && element.checked !=
e.checked) {
+ toggle(element);
+ }
}
}
- }
+
+ function toggle(e) {
+ e.checked = !e.checked;
+ }
+ </script>
- function toggle(e) {
- e.checked = !e.checked;
- }
-</script>
-
-<table border="0" width="100%" cellpadding="2">
- <tr>
- <td align="left"><input type="checkbox" name="selectAll" value="0"
onclick="javascript:toggleAll(this);"> <b>${uiLabelMap.ProductProduct}</b></td>
- <td align="right">
- <b>
- <#if 0 < viewIndex?int>
- <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex-1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPrevious}</a> |
- </#if>
- <#if 0 < listSize?int>
- <span class="tabletext">${lowIndex+1} - ${highIndex}
${uiLabelMap.CommonOf} ${listSize}</span>
- </#if>
- <#if highIndex?int < listSize?int>
- | <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex+1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonNext}</a>
- </#if>
- <#if paging == "Y">
- <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=99999/~clearSearch=N/~PAGING=N</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOff}</a>
- <#else>
- <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=${previousViewSize}/~clearSearch=N/~PAGING=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOn}</a>
- </#if>
- </b>
- </td>
- </tr>
- <tr><td colspan="2"><hr class="sepbar"/></td></tr>
-</table>
-
-<form method="post" name="products">
- <table width="100%" cellpadding="0" cellspacing="0">
- <#assign listIndex = lowIndex>
- <#list productIds as productId><#-- note that there is no boundary range
because that is being done before the list is put in the content -->
- <#assign product = delegator.findByPrimaryKey("Product",
Static["org.ofbiz.base.util.UtilMisc"].toMap("productId", productId))>
- <tr>
- <td>
- <input type="checkbox" name="selectResult" value="${productId}"
onchange="checkProductToBagTextArea(this, '${productId}');"/>
- <a href="<@ofbizUrl>EditProduct?productId=${productId}</@ofbizUrl>"
class="buttontext">[${productId}] ${(product.internalName)?if_exists}</a>
- </td>
- </tr>
- </#list>
- </table>
-<form>
-
-<table border="0" width="100%" cellpadding="2">
- <tr>
- <td align="right">
- <b>
- <#if 0 < viewIndex?int>
- <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex-1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPrevious}</a> |
- </#if>
- <#if 0 < listSize?int>
- <span class="tabletext">${lowIndex+1} - ${highIndex}
${uiLabelMap.CommonOf} ${listSize}</span>
- </#if>
- <#if highIndex?int < listSize?int>
- | <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex+1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonNext}</a>
- </#if>
- <#if paging == "Y">
- <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=99999/~clearSearch=N/~PAGING=N</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOff}</a>
- <#else>
- <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=${previousViewSize}/~clearSearch=N/~PAGING=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOn}</a>
- </#if>
- </b>
- </td>
- </tr>
-</table>
-</#if>
+ <table border="0" width="100%" cellpadding="2">
+ <tr>
+ <td align="left"><input type="checkbox" name="selectAll" value="0"
onclick="javascript:toggleAll(this);"> <b>${uiLabelMap.ProductProduct}</b></td>
+ <td align="right">
+ <b>
+ <#if 0 < viewIndex?int>
+ <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex-1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPrevious}</a> |
+ </#if>
+ <#if 0 < listSize?int>
+ <span class="tabletext">${lowIndex+1} - ${highIndex}
${uiLabelMap.CommonOf} ${listSize}</span>
+ </#if>
+ <#if highIndex?int < listSize?int>
+ | <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex+1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonNext}</a>
+ </#if>
+ <#if paging == "Y">
+ <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=99999/~clearSearch=N/~PAGING=N</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOff}</a>
+ <#else>
+ <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=${previousViewSize}/~clearSearch=N/~PAGING=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOn}</a>
+ </#if>
+ </b>
+ </td>
+ </tr>
+ <tr><td colspan="2"><hr class="sepbar"/></td></tr>
+ </table>
+
+ <form method="post" name="products">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <#assign listIndex = lowIndex>
+ <#list productIds as productId><#-- note that there is no boundary
range because that is being done before the list is put in the content -->
+ <#assign product = delegator.findByPrimaryKey("Product",
Static["org.ofbiz.base.util.UtilMisc"].toMap("productId", productId))>
+ <tr>
+ <td>
+ <input type="checkbox" name="selectResult" value="${productId}"
onchange="checkProductToBagTextArea(this, '${productId}');"/>
+ <a
href="<@ofbizUrl>EditProduct?productId=${productId}</@ofbizUrl>"
class="buttontext">[${productId}] ${(product.internalName)?if_exists}</a>
+ </td>
+ </tr>
+ </#list>
+ </table>
+ <form>
+
+ <table border="0" width="100%" cellpadding="2">
+ <tr>
+ <td align="right">
+ <b>
+ <#if 0 < viewIndex?int>
+ <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex-1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPrevious}</a> |
+ </#if>
+ <#if 0 < listSize?int>
+ <span class="tabletext">${lowIndex+1} - ${highIndex}
${uiLabelMap.CommonOf} ${listSize}</span>
+ </#if>
+ <#if highIndex?int < listSize?int>
+ | <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=${viewIndex+1}/~VIEW_SIZE=${viewSize}/~clearSearch=N/~PAGING=${paging}</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonNext}</a>
+ </#if>
+ <#if paging == "Y">
+ <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=99999/~clearSearch=N/~PAGING=N</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOff}</a>
+ <#else>
+ <a
href="<@ofbizUrl>keywordsearch/~VIEW_INDEX=0/~VIEW_SIZE=${previousViewSize}/~clearSearch=N/~PAGING=Y</@ofbizUrl>"
class="buttontext">${uiLabelMap.CommonPagingOn}</a>
+ </#if>
+ </b>
+ </td>
+ </tr>
+ </table>
+ </#if>
+ </div>
+</div>
\ No newline at end of file