Author: mrisaliti
Date: Fri Dec 28 15:46:21 2007 New Revision: 607357 URL: http://svn.apache.org/viewvc?rev=607357&view=rev Log: Product Price Rules forms (ftl/widgets screen) has now the same look and feel (Part of issue OFBIZ-1544) Modified: ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl ofbiz/trunk/applications/product/webapp/catalog/price/FindProductPriceRule.ftl Modified: ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl?rev=607357&r1=607356&r2=607357&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl Fri Dec 28 15:46:21 2007 @@ -16,178 +16,196 @@ specific language governing permissions and limitations under the License. --> -<h1>${uiLabelMap.ProductGlobalPriceRule}</h1> -<a href="<@ofbizUrl>FindProductPriceRules</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductFindRule}]</a> - -<br/> - -<table border="1" width="100%" cellpadding="2" cellspacing="0"> - <tr> - <td width="10%"><div class="tabletext"><b>${uiLabelMap.ProductRuleId}</b></div></td> - <td width="80%"><div class="tabletext"><b>${uiLabelMap.ProductRuleNameFromDateThruDate}</b></div></td> - <td width="10%"><div class="tabletext"><b> </b></div></td> - </tr> - -<#if productPriceRule?exists> - <#assign productPriceConds = productPriceRule.getRelated("ProductPriceCond")> - <#assign productPriceActions = productPriceRule.getRelated("ProductPriceAction")> - <tr valign="middle"> - <td><div class="tabletext"><b>${productPriceRule.productPriceRuleId}</b></div></td> - <td align="left"> - <FORM method="post" action="<@ofbizUrl>updateProductPriceRule</@ofbizUrl>" name="updateProductPriceRule"> - <input type="hidden" name="productPriceRuleId" value="${productPriceRule.productPriceRuleId}"> - <input type="text" size="15" name="ruleName" value="${productPriceRule.ruleName}" class="inputBox"> - <input type="text" size="15" name="description" value="${productPriceRule.description?if_exists}" class="inputBox"> - <input type="text" size="22" name="fromDate" value="${productPriceRule.fromDate?if_exists}" class="inputBox"><a href="javascript:call_cal(document.updateProductPriceRule.fromDate, null);"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a> - <input type="text" size="22" name="thruDate" value="${productPriceRule.thruDate?if_exists}" class="inputBox"><a href="javascript:call_cal(document.updateProductPriceRule.thruDate, null);"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a> - - <#assign saleRule = productPriceRule.isSale?exists && productPriceRule.isSale == "Y"> - <span class="tabletext"><b>${uiLabelMap.ProductNotifySale}:</b> - <input type="radio" class="radioButton" name="isSale" value="Y" <#if saleRule>CHECKED</#if>>${uiLabelMap.CommonYes} - <input type="radio" name="isSale" value="N" <#if !saleRule>CHECKED</#if>>${uiLabelMap.CommonNo}</span> - - <INPUT type="submit" value="${uiLabelMap.CommonUpdate}" style="font-size: x-small;"> - </FORM> - </td> - <td align="center"> - <#if !productPriceConds?has_content && !productPriceActions?has_content> - <a href="<@ofbizUrl>deleteProductPriceRule?productPriceRuleId=${productPriceRule.productPriceRuleId}</@ofbizUrl>" class="buttontext"> - [${uiLabelMap.CommonDelete}]</a> - </#if> - </td> - </tr> - <tr valign="top"> - <td align="right"><div class="tabletext">${uiLabelMap.ProductConditions}:</div></td> - <td align="left" colspan="2"> - <table border="1" width="100%" cellpadding="2" cellspacing="0"> - <tr> - <td width="5%"><div class="tabletext"><b>${uiLabelMap.ProductSeqId}</b></div></td> - <td width="85%"><div class="tabletext"><b>${uiLabelMap.ProductInputOperatorValue}</b></div></td> - <td width="10%"><div class="tabletext"><b> </b></div></td> +<div class="screenlet"> + <div class="screenlet-title-bar"> + <h3>${uiLabelMap.ProductGlobalPriceRule}</h3> + </div> + <div class="screenlet-body"> + <a href="<@ofbizUrl>FindProductPriceRules</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductFindRule}</a> + <table cellspacing="0" class="basic-table"> + <tr class="header-row"> + <td width="10%"><b>${uiLabelMap.ProductRuleId}</b></td> + <td width="80%"><b>${uiLabelMap.ProductRuleNameFromDateThruDate}</b></td> + <td width="10%"><b> </b></td> </tr> - <#assign maxCondSeqId = 1> - <#list productPriceConds as productPriceCond> - <tr> - <#-- if cur seq id is a number and is greater than max, set new max for input box prefill below --> - <#assign curCondSeqId = productPriceCond.productPriceCondSeqId?number> - <#if (curCondSeqId >= maxCondSeqId)><#assign maxCondSeqId = curCondSeqId + 1></#if> - <td><div class="tabletext"><b>${productPriceCond.productPriceCondSeqId}</b></div></td> - <td align="left"> - <FORM method="post" action="<@ofbizUrl>updateProductPriceCond</@ofbizUrl>"> - <input type="hidden" name="productPriceRuleId" value="${productPriceCond.productPriceRuleId}"/> - <input type="hidden" name="productPriceCondSeqId" value="${productPriceCond.productPriceCondSeqId}"/> - <select name="inputParamEnumId" size="1" class="selectBox"> - <#if productPriceCond.inputParamEnumId?has_content> - <#assign inputParamEnum = productPriceCond.getRelatedOneCache("InputParamEnumeration")?if_exists> - <option value="${productPriceCond.inputParamEnumId}"><#if inputParamEnum?exists>${inputParamEnum.get("description",locale)}<#else>[${productPriceCond.inputParamEnumId}]</#if></option> - <option value="${productPriceCond.inputParamEnumId}"> </option> - <#else> - <option value=""> </option> - </#if> - <#list inputParamEnums as inputParamEnum> - <option value="${inputParamEnum.enumId}">${inputParamEnum.get("description",locale)}<#--[${inputParamEnum.enumId}]--></option> - </#list> - </select> - <select name="operatorEnumId" size="1" class="selectBox"> - <#if productPriceCond.operatorEnumId?has_content> - <#assign operatorEnum = productPriceCond.getRelatedOneCache("OperatorEnumeration")?if_exists> - <option value="${productPriceCond.operatorEnumId}"><#if operatorEnum?exists>${operatorEnum.get("description",locale)}<#else>[${productPriceCond.operatorEnumId}]</#if></option> - <option value="${productPriceCond.operatorEnumId}"> </option> - <#else> - <option value=""> </option> - </#if> - <#list condOperEnums as condOperEnum> - <option value="${condOperEnum.enumId}">${condOperEnum.get("description",locale)}<#--[${condOperEnum.enumId}]--></option> - </#list> - </select> - <input type="text" size="20" name="condValue" value="${productPriceCond.condValue?if_exists}" class="inputBox"> - <INPUT type="submit" value="${uiLabelMap.CommonUpdate}" style="font-size: x-small;"> - </FORM> - </td> - <td align="center"> - <a href="<@ofbizUrl>deleteProductPriceCond?productPriceRuleId=${productPriceCond.productPriceRuleId}&productPriceCondSeqId=${productPriceCond.productPriceCondSeqId}</@ofbizUrl>" class="buttontext"> - [${uiLabelMap.CommonDelete}]</a> - </td> - </tr> - </#list> - <tr> - <td align="left" colspan="3"> - <FORM method="post" action="<@ofbizUrl>createProductPriceCond</@ofbizUrl>"> + <#if productPriceRule?exists> + <#assign productPriceConds = productPriceRule.getRelated("ProductPriceCond")> + <#assign productPriceActions = productPriceRule.getRelated("ProductPriceAction")> + <tr valign="middle"> + <td class="label"><b>${productPriceRule.productPriceRuleId}</b></td> + <td align="left"> + <form method="post" action="<@ofbizUrl>updateProductPriceRule</@ofbizUrl>" name="updateProductPriceRule"> <input type="hidden" name="productPriceRuleId" value="${productPriceRule.productPriceRuleId}"> - <span class="tabletext"><b>${uiLabelMap.CommonNew}:</b> </span> - <select name="inputParamEnumId" size="1" class="selectBox"> - <#list inputParamEnums as inputParamEnum> - <option value="${inputParamEnum.enumId}">${inputParamEnum.get("description",locale)}<#--[${inputParamEnum.enumId}]--></option> - </#list> - </select> - <select name="operatorEnumId" size="1" class="selectBox"> - <#list condOperEnums as condOperEnum> - <option value="${condOperEnum.enumId}">${condOperEnum.get("description",locale)}<#--[${condOperEnum.enumId}]--></option> - </#list> - </select> - <input type="text" size="20" name="condValue" class="inputBox"> - <INPUT type="submit" value="${uiLabelMap.CommonCreate}" style="font-size: x-small;"> - </FORM> + <input type="text" size="15" name="ruleName" value="${productPriceRule.ruleName}"> + <input type="text" size="15" name="description" value="${productPriceRule.description?if_exists}"> + <input type="text" size="22" name="fromDate" value="${productPriceRule.fromDate?if_exists}"><a href="javascript:call_cal(document.updateProductPriceRule.fromDate, null);"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a> + <input type="text" size="22" name="thruDate" value="${productPriceRule.thruDate?if_exists}"><a href="javascript:call_cal(document.updateProductPriceRule.thruDate, null);"><img src='/images/cal.gif' width='16' height='16' border='0' alt='Calendar'></a> + + <#assign saleRule = productPriceRule.isSale?exists && productPriceRule.isSale == "Y"> + <div> + <span class="label"><b>${uiLabelMap.ProductNotifySale}</b></span> + <input type="radio" class="radioButton" name="isSale" value="Y" <#if saleRule>CHECKED</#if>>${uiLabelMap.CommonYes} + <input type="radio" name="isSale" value="N" <#if !saleRule>CHECKED</#if>>${uiLabelMap.CommonNo} + + <input type="submit" value="${uiLabelMap.CommonUpdate}"> + </div> + </form> + </td> + <td align="center"> + <#if !productPriceConds?has_content && !productPriceActions?has_content> + <a href="<@ofbizUrl>deleteProductPriceRule?productPriceRuleId=${productPriceRule.productPriceRuleId}</@ofbizUrl>" class="buttontext"> + ${uiLabelMap.CommonDelete}</a> + </#if> </td> </tr> - </table> - </td> - </tr> - <tr valign="top"> - <td align="right"><div class="tabletext">${uiLabelMap.ProductActions}:</div></td> - <td align="left" colspan="2"> - <table border="1" width="100%" cellpadding="2" cellspacing="0"> - <tr> - <td width="5%"><div class="tabletext"><b>${uiLabelMap.ProductSeqId}</b></div></td> - <td width="85%"><div class="tabletext"><b>${uiLabelMap.ProductActionTypeAmount}</b></div></td> - <td width="10%"><div class="tabletext"><b> </b></div></td> + <tr valign="top"> + <td align="right" class="label">${uiLabelMap.ProductConditions}</td> + <td align="left" colspan="2"> + <table cellspacing="0" class="basic-table"> + <tr class="header-row"> + <td width="5%"><b>${uiLabelMap.ProductSeqId}</b></td> + <td width="85%"><b>${uiLabelMap.ProductInputOperatorValue}</b></td> + <td width="10%"><b> </b></td> + </tr> + <#assign maxCondSeqId = 1> + <#assign rowClass = "2"> + <#list productPriceConds as productPriceCond> + <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> + <#-- if cur seq id is a number and is greater than max, set new max for input box prefill below --> + <#assign curCondSeqId = productPriceCond.productPriceCondSeqId?number> + <#if (curCondSeqId >= maxCondSeqId)><#assign maxCondSeqId = curCondSeqId + 1></#if> + <td><div class="tabletext"><b>${productPriceCond.productPriceCondSeqId}</b></div></td> + <td align="left"> + <form method="post" action="<@ofbizUrl>updateProductPriceCond</@ofbizUrl>"> + <input type="hidden" name="productPriceRuleId" value="${productPriceCond.productPriceRuleId}"/> + <input type="hidden" name="productPriceCondSeqId" value="${productPriceCond.productPriceCondSeqId}"/> + <select name="inputParamEnumId" size="1"> + <#if productPriceCond.inputParamEnumId?has_content> + <#assign inputParamEnum = productPriceCond.getRelatedOneCache("InputParamEnumeration")?if_exists> + <option value="${productPriceCond.inputParamEnumId}"><#if inputParamEnum?exists>${inputParamEnum.get("description",locale)}<#else>[${productPriceCond.inputParamEnumId}]</#if></option> + <option value="${productPriceCond.inputParamEnumId}"> </option> + <#else> + <option value=""> </option> + </#if> + <#list inputParamEnums as inputParamEnum> + <option value="${inputParamEnum.enumId}">${inputParamEnum.get("description",locale)}<#--[${inputParamEnum.enumId}]--></option> + </#list> + </select> + <select name="operatorEnumId" size="1"> + <#if productPriceCond.operatorEnumId?has_content> + <#assign operatorEnum = productPriceCond.getRelatedOneCache("OperatorEnumeration")?if_exists> + <option value="${productPriceCond.operatorEnumId}"><#if operatorEnum?exists>${operatorEnum.get("description",locale)}<#else>[${productPriceCond.operatorEnumId}]</#if></option> + <option value="${productPriceCond.operatorEnumId}"> </option> + <#else> + <option value=""> </option> + </#if> + <#list condOperEnums as condOperEnum> + <option value="${condOperEnum.enumId}">${condOperEnum.get("description",locale)}<#--[${condOperEnum.enumId}]--></option> + </#list> + </select> + <input type="text" size="20" name="condValue" value="${productPriceCond.condValue?if_exists}"> + <input type="submit" value="${uiLabelMap.CommonUpdate}"> + </form> + </td> + <td align="center"> + <a href="<@ofbizUrl>deleteProductPriceCond?productPriceRuleId=${productPriceCond.productPriceRuleId}&productPriceCondSeqId=${productPriceCond.productPriceCondSeqId}</@ofbizUrl>" class="buttontext"> + ${uiLabelMap.CommonDelete}</a> + </td> + </tr> + <#-- toggle the row color --> + <#if rowClass == "2"> + <#assign rowClass = "1"> + <#else> + <#assign rowClass = "2"> + </#if> + </#list> + <tr> + <td align="left" colspan="3"> + <form method="post" action="<@ofbizUrl>createProductPriceCond</@ofbizUrl>"> + <input type="hidden" name="productPriceRuleId" value="${productPriceRule.productPriceRuleId}"> + <span class="label"><b>${uiLabelMap.CommonNew}</b> </span> + <select name="inputParamEnumId" size="1"> + <#list inputParamEnums as inputParamEnum> + <option value="${inputParamEnum.enumId}">${inputParamEnum.get("description",locale)}<#--[${inputParamEnum.enumId}]--></option> + </#list> + </select> + <select name="operatorEnumId" size="1"> + <#list condOperEnums as condOperEnum> + <option value="${condOperEnum.enumId}">${condOperEnum.get("description",locale)}<#--[${condOperEnum.enumId}]--></option> + </#list> + </select> + <input type="text" size="20" name="condValue"> + <input type="submit" value="${uiLabelMap.CommonCreate}"> + </form> + </td> + </tr> + </table> + </td> </tr> - <#list productPriceActions as productPriceAction> - <tr> - <td><div class="tabletext"><b>${productPriceAction.productPriceActionSeqId}</b></div></td> - <td align="left"> - <FORM method="post" action="<@ofbizUrl>updateProductPriceAction</@ofbizUrl>"> - <input type="hidden" name="productPriceRuleId" value="${productPriceAction.productPriceRuleId}"> - <input type="hidden" name="productPriceActionSeqId" value="${productPriceAction.productPriceActionSeqId}"> - <select name="productPriceActionTypeId" size="1" class="selectBox"> - <#if productPriceAction.productPriceActionTypeId?has_content> - <#assign productPriceActionType = productPriceAction.getRelatedOneCache("ProductPriceActionType")> - <option value="${productPriceAction.productPriceActionTypeId}"><#if productPriceActionType?exists>${productPriceActionType.get("description",locale)}<#else>[${productPriceAction.productPriceActionTypeId}]</#if></option> - <option value="${productPriceAction.productPriceActionTypeId}"> </option> - <#else> - <option value=""> </option> - </#if> - <#list productPriceActionTypes as productPriceActionType> - <option value="${productPriceActionType.productPriceActionTypeId}">${productPriceActionType.get("description",locale)}<#--[${productPriceActionType.productPriceActionTypeId}]--></option> - </#list> - </select> - <input type="text" size="8" name="amount" value="${productPriceAction.amount?if_exists}" class="inputBox"> - <INPUT type="submit" value="${uiLabelMap.CommonUpdate}" style="font-size: x-small;"> - </FORM> - </td> - <td align="center"> - <a href="<@ofbizUrl>deleteProductPriceAction?productPriceRuleId=${productPriceAction.productPriceRuleId}&productPriceActionSeqId=${productPriceAction.productPriceActionSeqId}</@ofbizUrl>" class="buttontext"> - [${uiLabelMap.CommonDelete}]</a> - </td> - </tr> - </#list> - <tr> - <td align="left" colspan="3"> - <FORM method="post" action="<@ofbizUrl>createProductPriceAction</@ofbizUrl>"> - <input type="hidden" name="productPriceRuleId" value="${productPriceRule.productPriceRuleId}"> - <span class="tabletext"><b>${uiLabelMap.CommonNew}:</b> </span> - <select name="productPriceActionTypeId" size="1" class="selectBox"> - <#list productPriceActionTypes as productPriceActionType> - <option value="${productPriceActionType.productPriceActionTypeId}">${productPriceActionType.get("description",locale)}<#--[${productPriceActionType.productPriceActionTypeId}]--></option> - </#list> - </select> - <input type="text" size="8" name="amount" class="inputBox"> - <INPUT type="submit" value="${uiLabelMap.CommonCreate}" style="font-size: x-small;"> - </FORM> + <tr valign="top"> + <td align="right" class="label">${uiLabelMap.ProductActions}</td> + <td align="left" colspan="2"> + <table cellspacing="0" class="basic-table"> + <tr class="header-row"> + <td width="5%"><b>${uiLabelMap.ProductSeqId}</b></td> + <td width="85%"><b>${uiLabelMap.ProductActionTypeAmount}</b></td> + <td width="10%"><b> </b></td> + </tr> + <#assign rowClass = "2"> + <#list productPriceActions as productPriceAction> + <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> + <td class="label"><b>${productPriceAction.productPriceActionSeqId}</b></td> + <td align="left"> + <form method="post" action="<@ofbizUrl>updateProductPriceAction</@ofbizUrl>"> + <input type="hidden" name="productPriceRuleId" value="${productPriceAction.productPriceRuleId}"> + <input type="hidden" name="productPriceActionSeqId" value="${productPriceAction.productPriceActionSeqId}"> + <select name="productPriceActionTypeId" size="1"> + <#if productPriceAction.productPriceActionTypeId?has_content> + <#assign productPriceActionType = productPriceAction.getRelatedOneCache("ProductPriceActionType")> + <option value="${productPriceAction.productPriceActionTypeId}"><#if productPriceActionType?exists>${productPriceActionType.get("description",locale)}<#else>[${productPriceAction.productPriceActionTypeId}]</#if></option> + <option value="${productPriceAction.productPriceActionTypeId}"> </option> + <#else> + <option value=""> </option> + </#if> + <#list productPriceActionTypes as productPriceActionType> + <option value="${productPriceActionType.productPriceActionTypeId}">${productPriceActionType.get("description",locale)}<#--[${productPriceActionType.productPriceActionTypeId}]--></option> + </#list> + </select> + <input type="text" size="8" name="amount" value="${productPriceAction.amount?if_exists}"> + <input type="submit" value="${uiLabelMap.CommonUpdate}"> + </form> + </td> + <td align="center"> + <a href="<@ofbizUrl>deleteProductPriceAction?productPriceRuleId=${productPriceAction.productPriceRuleId}&productPriceActionSeqId=${productPriceAction.productPriceActionSeqId}</@ofbizUrl>" class="buttontext"> + ${uiLabelMap.CommonDelete}</a> + </td> + </tr> + <#-- toggle the row color --> + <#if rowClass == "2"> + <#assign rowClass = "1"> + <#else> + <#assign rowClass = "2"> + </#if> + </#list> + <tr> + <td align="left" colspan="3"> + <form method="post" action="<@ofbizUrl>createProductPriceAction</@ofbizUrl>"> + <input type="hidden" name="productPriceRuleId" value="${productPriceRule.productPriceRuleId}"> + <span class="label"><b>${uiLabelMap.CommonNew}</b> </span> + <select name="productPriceActionTypeId" size="1"> + <#list productPriceActionTypes as productPriceActionType> + <option value="${productPriceActionType.productPriceActionTypeId}">${productPriceActionType.get("description",locale)}<#--[${productPriceActionType.productPriceActionTypeId}]--></option> + </#list> + </select> + <input type="text" size="8" name="amount"> + <input type="submit" value="${uiLabelMap.CommonCreate}"> + </form> + </td> + </tr> + </table> </td> </tr> + </#if> </table> - </td> - </tr> -</#if> -</table> + </div> +</div> \ No newline at end of file Modified: ofbiz/trunk/applications/product/webapp/catalog/price/FindProductPriceRule.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/price/FindProductPriceRule.ftl?rev=607357&r1=607356&r2=607357&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/price/FindProductPriceRule.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/price/FindProductPriceRule.ftl Fri Dec 28 15:46:21 2007 @@ -16,56 +16,63 @@ specific language governing permissions and limitations under the License. --> - -<h1>${uiLabelMap.ProductGlobalPriceRules}</h1> -<#if activeOnly> - <a href="<@ofbizUrl>FindProductPriceRules?activeOnly=false</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductActiveAndInactive}]</a> -<#else> - <a href="<@ofbizUrl>FindProductPriceRules</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductActiveOnly}]</a> -</#if> -<br/> -<br/> -<#if productPriceRules?has_content> - <table border="1" cellpadding="2" cellspacing="0"> - <tr> - <td><div class="tabletext"><b>${uiLabelMap.ProductPriceRuleNameId}</b></div></td> - <td><div class="tabletext"><b>${uiLabelMap.ProductSaleRule}?</b></div></td> - <td><div class="tabletext"><b>${uiLabelMap.CommonFromDate}</b></div></td> - <td><div class="tabletext"><b>${uiLabelMap.CommonThruDate}</b></div></td> - <td><div class="tabletext"> </div></td> - </tr> - <#list productPriceRules as rule> - <tr> - <td><div class="tabletext"> <a href="<@ofbizUrl>EditProductPriceRules?productPriceRuleId=${rule.productPriceRuleId}</@ofbizUrl>" class="buttontext">${rule.ruleName?if_exists} [${rule.productPriceRuleId}]</a></div></td> - <td><div class="tabletext"> ${rule.isSale?if_exists}</div></td> - <td> - <#assign hasntStarted = false> - <#if rule.fromDate?exists && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().before(rule.getTimestamp("fromDate"))><#assign hasntStarted = true></#if> - <div class="tabletext"<#if hasntStarted> style="color: red;"</#if>> - ${rule.fromDate?if_exists} - </div> - </td> - <td> - <#assign hasExpired = false> - <#if rule.thruDate?exists && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(rule.getTimestamp("thruDate"))><#assign hasExpired = true></#if> - <div class="tabletext"<#if hasExpired> style="color: red;"</#if>> - ${rule.thruDate?if_exists} - </div> - </td> - <td align="center"> - <a href="<@ofbizUrl>EditProductPriceRules?productPriceRuleId=${rule.productPriceRuleId}</@ofbizUrl>" class="buttontext">[${uiLabelMap.CommonEdit}]</a> - </td> - </tr> - </#list> - </table> -<#else> - <h3>${uiLabelMap.ProductNoPriceRulesFound}.</h3> -</#if> - -<br/> -<form method="post" action="<@ofbizUrl>createProductPriceRule</@ofbizUrl>" style="margin: 0;"> - <h2>${uiLabelMap.ProductAddPriceRule}:</h2> - <br/> - ${uiLabelMap.ProductName}: <input type="text" size="30" class="inputBox" name="ruleName"/> - <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonAdd}"/> -</form> +<div class="screenlet"> + <div class="screenlet-title-bar"> + <h3>${uiLabelMap.ProductGlobalPriceRules}</h3> + </div> + <div class="screenlet-body"> + <#if activeOnly> + <a href="<@ofbizUrl>FindProductPriceRules?activeOnly=false</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductActiveAndInactive}</a> + <#else> + <a href="<@ofbizUrl>FindProductPriceRules</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductActiveOnly}</a> + </#if> + <br/> + <#if productPriceRules?has_content> + <table cellspacing="0" class="basic-table"> + <tr class="header-row"> + <td><b>${uiLabelMap.ProductPriceRuleNameId}</b></td> + <td><b>${uiLabelMap.ProductSaleRule}?</b></td> + <td><b>${uiLabelMap.CommonFromDate}</b></td> + <td><b>${uiLabelMap.CommonThruDate}</b></td> + <td> </td> + </tr> + <#list productPriceRules as rule> + <tr> + <td> <a href="<@ofbizUrl>EditProductPriceRules?productPriceRuleId=${rule.productPriceRuleId}</@ofbizUrl>" class="buttontext">${rule.ruleName?if_exists} [${rule.productPriceRuleId}]</a></td> + <td> ${rule.isSale?if_exists}</td> + <td> + <#assign hasntStarted = false> + <#if rule.fromDate?exists && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().before(rule.getTimestamp("fromDate"))><#assign hasntStarted = true></#if> + <div <#if hasntStarted> style="color: red;"</#if>> + ${rule.fromDate?if_exists} + </div> + </td> + <td> + <#assign hasExpired = false> + <#if rule.thruDate?exists && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(rule.getTimestamp("thruDate"))><#assign hasExpired = true></#if> + <div <#if hasExpired> style="color: red;"</#if>> + ${rule.thruDate?if_exists} + </div> + </td> + <td align="center"> + <a href="<@ofbizUrl>EditProductPriceRules?productPriceRuleId=${rule.productPriceRuleId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a> + </td> + </tr> + </#list> + </table> + <#else> + <h3>${uiLabelMap.ProductNoPriceRulesFound}.</h3> + </#if> + </div> +</div> +<div class="screenlet"> + <div class="screenlet-title-bar"> + <h3>${uiLabelMap.ProductAddPriceRule}</h3> + </div> + <div class="screenlet-body"> + <form method="post" action="<@ofbizUrl>createProductPriceRule</@ofbizUrl>"> + <span class="label">${uiLabelMap.ProductName}</span><input type="text" size="30" name="ruleName"/> + <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonAdd}"/> + </form> + </div> +</div> \ No newline at end of file |
Free forum by Nabble | Edit this page |