From ef89152bec462ea06d10f8a643b03bb3000f2de7 Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Sun, 25 Jul 2010 01:39:15 +0000 Subject: [PATCH] Reformat to separate ftl and html indenting , no functional changes. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@978955 13f79535-47bb-0310-9956-ffa450edef68 --- .../catalog/promo/EditProductPromoRules.ftl | 996 +++++++++--------- 1 file changed, 498 insertions(+), 498 deletions(-) diff --git a/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl b/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl index 3a40475759..09c8d30b97 100644 --- a/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl +++ b/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl @@ -17,518 +17,518 @@ specific language governing permissions and limitations under the License. --> <#if productPromoId?exists && productPromo?exists> -
-
-

${uiLabelMap.PageTitleEditProductPromoRules}

-
- <#-- ======================= Rules ======================== --> -
- - - - - - - <#assign ruleClass = "2"> - <#list productPromoRules as productPromoRule> - <#assign productPromoConds = productPromoRule.getRelated("ProductPromoCond")> - <#assign productPromoActions = productPromoRule.getRelated("ProductPromoAction")> - alternate-row"> - - - - - alternate-row"> - - - - alternate-row"> - - - - <#-- toggle the row color --> - <#if ruleClass == "2"> - <#assign ruleClass = "1"> - <#else> - <#assign ruleClass = "2"> - - -
${uiLabelMap.ProductRuleId}${uiLabelMap.ProductRuleName} 
${(productPromoRule.productPromoRuleId)?if_exists} -
- - - - -
-
  - <#if (productPromoConds.size() == 0 && productPromoActions.size() == 0)> -
- - - ${uiLabelMap.CommonDelete} -
- -
${uiLabelMap.ProductConditions} - - <#assign maxCondSeqId = 1> - <#assign condClass = "2"> - <#list productPromoConds as productPromoCond> - alternate-row"> - - <#if (productPromoCond.productPromoCondSeqId)?exists> - <#assign curCondSeqId = Static["java.lang.Integer"].valueOf(productPromoCond.getString("productPromoCondSeqId"))> - <#if (curCondSeqId >= maxCondSeqId)> - <#assign maxCondSeqId = curCondSeqId + 1> - - - - - - - <#-- toggle the row color --> - <#if condClass == "2"> - <#assign condClass = "1"> - <#else> - <#assign condClass = "2"> - - - - - -
${(productPromoCond.productPromoCondSeqId)?if_exists} -
- - - - - - - <#assign otherValue = productPromoCond.otherValue?if_exists> - value="${(productPromoCond.otherValue)?if_exists}" /> - <#if otherValue?has_content && otherValue.contains("@")> - <#assign carrierShippingMethod = productPromoCond.otherValue?if_exists> - - <#if carrierShippingMethod?has_content> - <#assign carrierParty = carrierShippingMethod.substring(0, carrierShippingMethod.indexOf("@"))> - <#assign shippingMethodTypeId = carrierShippingMethod.substring(carrierShippingMethod.indexOf("@")+1)> - <#assign description = (delegator.findOne("ShipmentMethodType", {"shipmentMethodTypeId":shippingMethodTypeId}, false)).description> - <#else> - <#assign description = ""> - - - - -
- <#-- ======================= Categories ======================== --> -
${uiLabelMap.ProductConditions} ${uiLabelMap.ProductCategories}:
- <#assign condProductPromoCategories = productPromoCond.getRelated("ProductPromoCategory")> - <#list condProductPromoCategories as condProductPromoCategory> - <#assign condProductCategory = condProductPromoCategory.getRelatedOneCache("ProductCategory")> - <#assign condApplEnumeration = condProductPromoCategory.getRelatedOneCache("ApplEnumeration")> -
- ${(condProductCategory.get("description",locale))?if_exists} [${condProductPromoCategory.productCategoryId}] - - ${(condApplEnumeration.get("description",locale))?default(condProductPromoCategory.productPromoApplEnumId)} - - ${uiLabelMap.ProductSubCats}? ${condProductPromoCategory.includeSubCategories?default("N")} - - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: ${condProductPromoCategory.andGroupId} -
- - - - - - - ${uiLabelMap.CommonDelete} -
-
- -
-
- - - - - <@htmlTemplate.lookupField formName="createProductPromoCategoryConditions" name="productCategoryId" id="productCategoryId_cond" fieldFormName="LookupProductCategory"/> - - - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: * - -
-
- <#-- ======================= Products ======================== --> -
${uiLabelMap.ProductConditions} ${uiLabelMap.ProductProducts}:
- <#assign condProductPromoProducts = productPromoCond.getRelated("ProductPromoProduct")> - <#list condProductPromoProducts as condProductPromoProduct> - <#assign condProduct = condProductPromoProduct.getRelatedOneCache("Product")?if_exists> - <#assign condApplEnumeration = condProductPromoProduct.getRelatedOneCache("ApplEnumeration")> -
- ${(condProduct.internalName)?if_exists} [${condProductPromoProduct.productId}] - - ${(condApplEnumeration.get("description",locale))?default(condProductPromoProduct.productPromoApplEnumId)} -
- - - - - - ${uiLabelMap.CommonDelete} -
-
- -
-
- - - - - ${uiLabelMap.ProductProductId}: - - -
-
-
-
- - - - ${uiLabelMap.CommonDelete} -
-
-
- - - ${uiLabelMap.CommonNew}  - - - - ${uiLabelMap.CommonOther}: - - - -
-
-
${uiLabelMap.ProductActions} : - - <#assign actionClass = "2"> - <#list productPromoActions as productPromoAction> - alternate-row"> - - - - - <#-- toggle the row color --> - <#if actionClass == "2"> - <#assign actionClass = "1"> - <#else> - <#assign actionClass = "2"> - - - - - -
${(productPromoAction.productPromoActionSeqId)?if_exists} -
-
- - - - - - ${uiLabelMap.ProductQuantity}:  - ${uiLabelMap.ProductAmount}:  - ${uiLabelMap.ProductItemId}:  - ${uiLabelMap.PartyParty}:  - ${uiLabelMap.ServiceName}:  - ${uiLabelMap.UseCartQuantity}:  - - -
-
- <#-- ======================= Categories ======================== --> -
${uiLabelMap.ProductActions} ${uiLabelMap.ProductCategories}:
- <#assign actionProductPromoCategories = productPromoAction.getRelated("ProductPromoCategory")> - <#list actionProductPromoCategories as actionProductPromoCategory> - <#assign actionProductCategory = actionProductPromoCategory.getRelatedOneCache("ProductCategory")> - <#assign actionApplEnumeration = actionProductPromoCategory.getRelatedOneCache("ApplEnumeration")> -
- ${(actionProductCategory.description)?if_exists} [${actionProductPromoCategory.productCategoryId}] - - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoCategory.productPromoApplEnumId)} - - ${uiLabelMap.ProductSubCats}? ${actionProductPromoCategory.includeSubCategories?default("N")} - - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: ${actionProductPromoCategory.andGroupId} -
- - - - - - - ${uiLabelMap.CommonDelete} -
-
- -
-
- - - - - <@htmlTemplate.lookupField formName="createProductPromoCategoryActions" name="productCategoryId" id="productCategoryId_act" fieldFormName="LookupProductCategory"/> - - - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: * - -
-
- <#-- ======================= Products ======================== --> -
${uiLabelMap.ProductActions} ${uiLabelMap.ProductProducts}:
- <#assign actionProductPromoProducts = productPromoAction.getRelated("ProductPromoProduct")> - <#list actionProductPromoProducts as actionProductPromoProduct> - <#assign actionProduct = actionProductPromoProduct.getRelatedOneCache("Product")?if_exists> - <#assign actionApplEnumeration = actionProductPromoProduct.getRelatedOneCache("ApplEnumeration")> -
- ${(actionProduct.internalName)?if_exists} [${actionProductPromoProduct.productId}] - - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoProduct.productPromoApplEnumId)} -
- - - - - - ${uiLabelMap.CommonDelete} -
-
- -
-
- - - - - ${uiLabelMap.ProductProductId}: - - -
-
-
-
- - - - ${uiLabelMap.CommonDelete} -
-
-
-
- - - ${uiLabelMap.CommonNew}:  - - - ${uiLabelMap.ProductQuantity}:  - ${uiLabelMap.ProductAmount}:  - ${uiLabelMap.ProductItemId}:  - ${uiLabelMap.PartyParty}:  - ${uiLabelMap.ServiceName}:  - ${uiLabelMap.UseCartQuantity}:  - - -
-
-
-
-
- <#-- This was removed in r697962, should have been only commented out as maybe in future will be used again (free shipping promo) -
${uiLabelMap.ProductNoteOnItemId} : ${uiLabelMap.ProductItemIdGiftPurchaseFreeShipping}
-
${uiLabelMap.ProductNoteOnPartyId} : ${uiLabelMap.ProductPartyFreeShipping}
- --> -
-
-
-

${uiLabelMap.ProductAddPromoRule}

-
-
-
- - ${uiLabelMap.ProductName} - -
-
-
-
-
-

${uiLabelMap.ProductPromotion} ${uiLabelMap.ProductCategories}

-
- <#-- ======================= Categories ======================== --> -
- <#list promoProductPromoCategories as promoProductPromoCategory> - <#assign promoProductCategory = promoProductPromoCategory.getRelatedOneCache("ProductCategory")> - <#assign promoApplEnumeration = promoProductPromoCategory.getRelatedOneCache("ApplEnumeration")> -
- ${(promoProductCategory.description)?if_exists} [${promoProductPromoCategory.productCategoryId}] - - ${(promoApplEnumeration.get("description",locale))?default(promoProductPromoCategory.productPromoApplEnumId)} - - ${uiLabelMap.ProductSubCats}? ${promoProductPromoCategory.includeSubCategories?default("N")} - - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: ${promoProductPromoCategory.andGroupId} -
- - - - - - - ${uiLabelMap.CommonDelete} -
-
- -
-
+
+
+

${uiLabelMap.PageTitleEditProductPromoRules}

+
+ <#-- ======================= Rules ======================== --> +
+ + + + + + + <#assign ruleClass = "2"> + <#list productPromoRules as productPromoRule> + <#assign productPromoConds = productPromoRule.getRelated("ProductPromoCond")> + <#assign productPromoActions = productPromoRule.getRelated("ProductPromoAction")> + alternate-row"> + + + + + alternate-row"> + + + + alternate-row"> + + + + <#-- toggle the row color --> + <#if ruleClass == "2"> + <#assign ruleClass = "1"> + <#else> + <#assign ruleClass = "2"> + + +
${uiLabelMap.ProductRuleId}${uiLabelMap.ProductRuleName} 
${(productPromoRule.productPromoRuleId)?if_exists} + + + + + + +   + <#if (productPromoConds.size() == 0 && productPromoActions.size() == 0)> +
+ + + ${uiLabelMap.CommonDelete} +
+ +
${uiLabelMap.ProductConditions} + + <#assign maxCondSeqId = 1> + <#assign condClass = "2"> + <#list productPromoConds as productPromoCond> + alternate-row"> + + <#if (productPromoCond.productPromoCondSeqId)?exists> + <#assign curCondSeqId = Static["java.lang.Integer"].valueOf(productPromoCond.getString("productPromoCondSeqId"))> + <#if (curCondSeqId >= maxCondSeqId)> + <#assign maxCondSeqId = curCondSeqId + 1> + + + + + + + <#-- toggle the row color --> + <#if condClass == "2"> + <#assign condClass = "1"> + <#else> + <#assign condClass = "2"> + + + + + +
${(productPromoCond.productPromoCondSeqId)?if_exists} +
+ + + + + + + <#assign otherValue = productPromoCond.otherValue?if_exists> + value="${(productPromoCond.otherValue)?if_exists}" /> + <#if otherValue?has_content && otherValue.contains("@")> + <#assign carrierShippingMethod = productPromoCond.otherValue?if_exists> + + <#if carrierShippingMethod?has_content> + <#assign carrierParty = carrierShippingMethod.substring(0, carrierShippingMethod.indexOf("@"))> + <#assign shippingMethodTypeId = carrierShippingMethod.substring(carrierShippingMethod.indexOf("@")+1)> + <#assign description = (delegator.findOne("ShipmentMethodType", {"shipmentMethodTypeId":shippingMethodTypeId}, false)).description> + <#else> + <#assign description = ""> + + + + +
+ <#-- ======================= Categories ======================== --> +
${uiLabelMap.ProductConditions} ${uiLabelMap.ProductCategories}:
+ <#assign condProductPromoCategories = productPromoCond.getRelated("ProductPromoCategory")> + <#list condProductPromoCategories as condProductPromoCategory> + <#assign condProductCategory = condProductPromoCategory.getRelatedOneCache("ProductCategory")> + <#assign condApplEnumeration = condProductPromoCategory.getRelatedOneCache("ApplEnumeration")> +
+ ${(condProductCategory.get("description",locale))?if_exists} [${condProductPromoCategory.productCategoryId}] + - ${(condApplEnumeration.get("description",locale))?default(condProductPromoCategory.productPromoApplEnumId)} + - ${uiLabelMap.ProductSubCats}? ${condProductPromoCategory.includeSubCategories?default("N")} + - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: ${condProductPromoCategory.andGroupId} +
+ + + + + + + ${uiLabelMap.CommonDelete} +
+
+ +
+
- + - - <@htmlTemplate.lookupField formName="createProductPromoCategoryPromotions" name="productCategoryId" id="productCategoryId_03" fieldFormName="LookupProductCategory"/> + + <@htmlTemplate.lookupField formName="createProductPromoCategoryConditions" name="productCategoryId" id="productCategoryId_cond" fieldFormName="LookupProductCategory"/> ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: * -
-
- - -
-
-

${uiLabelMap.ProductPromotionProducts}

-
- <#-- ======================= Products ======================== --> -
- <#list promoProductPromoProducts as promoProductPromoProduct> - <#assign promoProduct = promoProductPromoProduct.getRelatedOneCache("Product")?if_exists> - <#assign promoApplEnumeration = promoProductPromoProduct.getRelatedOneCache("ApplEnumeration")> -
- ${(promoProduct.internalName)?if_exists} [${promoProductPromoProduct.productId}] - - ${(promoApplEnumeration.get("description",locale))?default(promoProductPromoProduct.productPromoApplEnumId)} -
- - - - - - ${uiLabelMap.CommonDelete} -
+
- -
-
+ <#-- ======================= Products ======================== --> +
${uiLabelMap.ProductConditions} ${uiLabelMap.ProductProducts}:
+ <#assign condProductPromoProducts = productPromoCond.getRelated("ProductPromoProduct")> + <#list condProductPromoProducts as condProductPromoProduct> + <#assign condProduct = condProductPromoProduct.getRelatedOneCache("Product")?if_exists> + <#assign condApplEnumeration = condProductPromoProduct.getRelatedOneCache("ApplEnumeration")> +
+ ${(condProduct.internalName)?if_exists} [${condProductPromoProduct.productId}] + - ${(condApplEnumeration.get("description",locale))?default(condProductPromoProduct.productPromoApplEnumId)} + + + + + + + ${uiLabelMap.CommonDelete} + +
+ +
+
- + - - ${uiLabelMap.ProductProductId}*<@htmlTemplate.lookupField formName="createpromoproductform" name="productId" id="productId" fieldFormName="LookupProduct"/> + + ${uiLabelMap.ProductProductId}: +
+
+
+
+ + + + ${uiLabelMap.CommonDelete}
- - +
+
+ + + ${uiLabelMap.CommonNew}  + + + + ${uiLabelMap.CommonOther}: + + + +
+
+
${uiLabelMap.ProductActions} : + + <#assign actionClass = "2"> + <#list productPromoActions as productPromoAction> + alternate-row"> + + + + + <#-- toggle the row color --> + <#if actionClass == "2"> + <#assign actionClass = "1"> + <#else> + <#assign actionClass = "2"> + + + + + +
${(productPromoAction.productPromoActionSeqId)?if_exists} +
+
+ + + + + + ${uiLabelMap.ProductQuantity}:  + ${uiLabelMap.ProductAmount}:  + ${uiLabelMap.ProductItemId}:  + ${uiLabelMap.PartyParty}:  + ${uiLabelMap.ServiceName}:  + ${uiLabelMap.UseCartQuantity}:  + + +
+
+ <#-- ======================= Categories ======================== --> +
${uiLabelMap.ProductActions} ${uiLabelMap.ProductCategories}:
+ <#assign actionProductPromoCategories = productPromoAction.getRelated("ProductPromoCategory")> + <#list actionProductPromoCategories as actionProductPromoCategory> + <#assign actionProductCategory = actionProductPromoCategory.getRelatedOneCache("ProductCategory")> + <#assign actionApplEnumeration = actionProductPromoCategory.getRelatedOneCache("ApplEnumeration")> +
+ ${(actionProductCategory.description)?if_exists} [${actionProductPromoCategory.productCategoryId}] + - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoCategory.productPromoApplEnumId)} + - ${uiLabelMap.ProductSubCats}? ${actionProductPromoCategory.includeSubCategories?default("N")} + - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: ${actionProductPromoCategory.andGroupId} +
+ + + + + + + ${uiLabelMap.CommonDelete} +
+
+ +
+
+ + + + + <@htmlTemplate.lookupField formName="createProductPromoCategoryActions" name="productCategoryId" id="productCategoryId_act" fieldFormName="LookupProductCategory"/> + + + ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: * + +
+
+ <#-- ======================= Products ======================== --> +
${uiLabelMap.ProductActions} ${uiLabelMap.ProductProducts}:
+ <#assign actionProductPromoProducts = productPromoAction.getRelated("ProductPromoProduct")> + <#list actionProductPromoProducts as actionProductPromoProduct> + <#assign actionProduct = actionProductPromoProduct.getRelatedOneCache("Product")?if_exists> + <#assign actionApplEnumeration = actionProductPromoProduct.getRelatedOneCache("ApplEnumeration")> +
+ ${(actionProduct.internalName)?if_exists} [${actionProductPromoProduct.productId}] + - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoProduct.productPromoApplEnumId)} +
+ + + + + + ${uiLabelMap.CommonDelete} +
+
+ +
+
+ + + + + ${uiLabelMap.ProductProductId}: + + +
+
+
+
+ + + + ${uiLabelMap.CommonDelete} +
+
+
+
+ + + ${uiLabelMap.CommonNew}:  + + + ${uiLabelMap.ProductQuantity}:  + ${uiLabelMap.ProductAmount}:  + ${uiLabelMap.ProductItemId}:  + ${uiLabelMap.PartyParty}:  + ${uiLabelMap.ServiceName}:  + ${uiLabelMap.UseCartQuantity}:  + + +
+
+
+
+
+ <#-- This was removed in r697962, should have been only commented out as maybe in future will be used again (free shipping promo) +
${uiLabelMap.ProductNoteOnItemId} : ${uiLabelMap.ProductItemIdGiftPurchaseFreeShipping}
+
${uiLabelMap.ProductNoteOnPartyId} : ${uiLabelMap.ProductPartyFreeShipping}
+ --> +
+
+
+

${uiLabelMap.ProductAddPromoRule}

+
+
+
+ + ${uiLabelMap.ProductName} + +
+
+
+
+
+

${uiLabelMap.ProductPromotion} ${uiLabelMap.ProductCategories}

+
+ <#-- ======================= Categories ======================== --> +
+ <#list promoProductPromoCategories as promoProductPromoCategory> + <#assign promoProductCategory = promoProductPromoCategory.getRelatedOneCache("ProductCategory")> + <#assign promoApplEnumeration = promoProductPromoCategory.getRelatedOneCache("ApplEnumeration")> +
+ ${(promoProductCategory.description)?if_exists} [${promoProductPromoCategory.productCategoryId}] + - ${(promoApplEnumeration.get("description",locale))?default(promoProductPromoCategory.productPromoApplEnumId)} + - ${uiLabelMap.ProductSubCats}? ${promoProductPromoCategory.includeSubCategories?default("N")} + - ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: ${promoProductPromoCategory.andGroupId} +
+ + + + + + + ${uiLabelMap.CommonDelete} +
+ +
+
+ + + + + <@htmlTemplate.lookupField formName="createProductPromoCategoryPromotions" name="productCategoryId" id="productCategoryId_03" fieldFormName="LookupProductCategory"/> + + + ${uiLabelMap.CommonAnd} ${uiLabelMap.CommonGroup}: * + +
+
+
+
+
+
+

${uiLabelMap.ProductPromotionProducts}

+
+ <#-- ======================= Products ======================== --> +
+ <#list promoProductPromoProducts as promoProductPromoProduct> + <#assign promoProduct = promoProductPromoProduct.getRelatedOneCache("Product")?if_exists> + <#assign promoApplEnumeration = promoProductPromoProduct.getRelatedOneCache("ApplEnumeration")> +
+ ${(promoProduct.internalName)?if_exists} [${promoProductPromoProduct.productId}] + - ${(promoApplEnumeration.get("description",locale))?default(promoProductPromoProduct.productPromoApplEnumId)} +
+ + + + + + ${uiLabelMap.CommonDelete} +
+
+ +
+
+ + + + + ${uiLabelMap.ProductProductId}*<@htmlTemplate.lookupField formName="createpromoproductform" name="productId" id="productId" fieldFormName="LookupProduct"/> + + +
+
+
+