|
Author: ashish
Date: Sat Jan 23 08:35:38 2010 New Revision: 902365 URL: http://svn.apache.org/viewvc?rev=902365&view=rev Log: Applied patch from jira issue - OFBIZ-3416. Email templates Layout improvement. In this patch CSS added in email template(FTL). These changes are done according to following article. http://articles.sitepoint.com/article/designers-guide-html-email Thanks Bharat & Rishi for the contribution. Modified: ofbiz/trunk/specialpurpose/ecommerce/templates/email/OrderNoticeEmail.ftl ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl Modified: ofbiz/trunk/specialpurpose/ecommerce/templates/email/OrderNoticeEmail.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/templates/email/OrderNoticeEmail.ftl?rev=902365&r1=902364&r2=902365&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/templates/email/OrderNoticeEmail.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/templates/email/OrderNoticeEmail.ftl Sat Jan 23 08:35:38 2010 @@ -23,7 +23,107 @@ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>${title!}</title> <#-- this needs to be fully qualified to appear in email; the server must also be available --> - <link rel="stylesheet" href="${baseUrl}/images/maincss.css" type="text/css"/> + <style type="text/css"> + html, body, div, h1, h3, a, ul, + li, table, tbody, tfoot, thead, + tr, th, td { + border:0; + margin:0; + outline:0; + padding:0; + font-size: 100%; + background:transparent; + vertical-align: baseline; + } + + a, body, th { + font-style: normal; + font-weight: normal; + text-decoration: none; + } + + body, th { + text-align: left; + } + + ul { + list-style: none; + } + + div.screenlet { + background-color: #FFFFFF; + border: 0.1em solid #999999; + height: auto !important; + height: 1%; + margin-bottom: 1em; + } + + body { + background: #D4D0C8; + font-size: 62.5%; + position: relative; + line-height: 1; + color: black; + font-family: Verdana, Arial, Helvetica, sans-serif; + } + + h1 { + font-size: 1.6em; + font-weight: bold; + } + + h3 { + font-size: 1.1em; + font-weight: bold; + } + + /* IE7 fix */ + table { + font-size: 1em; + } + + div.screenlet ul { + margin: 10px; + } + + div.screenlet li { + line-height: 15px; + } + + div.screenlet h3 { + background:#1C334D none repeat scroll 0 0; + color:#FFFFFF; + height:auto !important; + padding:3px 4px 4px; + } + + .columnLeft { + width: 45%; + float: left; + margin-right: 10px; + } + + .columnRight { + width: 45%; + float: left; + margin-left: 10px; + clear: none; + } + + div.screenlet table { + width: 100%; + margin: 10px; + } + + div.screenlet table tfoot th { + text-align: right; + font-weight: bold; + } + + .clearBoth { + clear: both; + } + </style> </head> <body> Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl?rev=902365&r1=902364&r2=902365&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderheader.ftl Sat Jan 23 08:35:38 2010 @@ -24,7 +24,9 @@ <#assign externalOrder = "(" + orderHeader.externalId + ")"/> </#if> +<div id="orderHeader"> <#-- left side --> +<div class="columnLeft"> <div class="screenlet"> <h3> <#if maySelectItems?default("N") == "Y" && returnLink?default("N") == "Y" && (orderHeader.statusId)?if_exists == "ORDER_COMPLETED" && roleTypeId?if_exists == "PLACING_CUSTOMER"> @@ -227,8 +229,9 @@ </ul> </#if> </div> +</div> <#-- right side --> -<div class="screenlet"> +<div class="screenlet columnRight"> <#if orderItemShipGroups?has_content> <h3>${uiLabelMap.OrderShippingInformation}</h3> <#-- shipping address --> @@ -357,3 +360,6 @@ </#list><#-- end list of orderItemShipGroups --> </#if> </div> + +<div class="clearBoth"></div> +</div> Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl?rev=902365&r1=902364&r2=902365&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl Sat Jan 23 08:35:38 2010 @@ -30,26 +30,69 @@ ${uiLabelMap.OrderOrderItems} </h3> <table> + <thead> <tr> - <td>${uiLabelMap.OrderProduct}</td> + <th>${uiLabelMap.OrderProduct}</th> <#if maySelectItems?default("N") == "Y"> - <td>${uiLabelMap.OrderQtyOrdered}</td> - <td>${uiLabelMap.OrderQtyPicked}</td> - <td>${uiLabelMap.OrderQtyShipped}</td> - <td>${uiLabelMap.OrderQtyCanceled}</td> + <th>${uiLabelMap.OrderQtyOrdered}</th> + <th>${uiLabelMap.OrderQtyPicked}</th> + <th>${uiLabelMap.OrderQtyShipped}</th> + <th>${uiLabelMap.OrderQtyCanceled}</th> <#else> - <td></td> - <td></td> - <td></td> - <td>${uiLabelMap.OrderQtyOrdered}</td> + <th></th> + <th></th> + <th></th> + <th>${uiLabelMap.OrderQtyOrdered}</th> </#if> - <td >${uiLabelMap.EcommerceUnitPrice}</td> - <td >${uiLabelMap.OrderAdjustments}</td> - <td >${uiLabelMap.CommonSubtotal}</td> + <th >${uiLabelMap.EcommerceUnitPrice}</th> + <th >${uiLabelMap.OrderAdjustments}</th> + <th >${uiLabelMap.CommonSubtotal}</th> <#if maySelectItems?default("N") == "Y" && roleTypeId?if_exists == "PLACING_CUSTOMER"> + <th colspan="3"></th> + </#if> + </tr> + </thead> + <tfoot> + <tr> + <th colspan="7">${uiLabelMap.CommonSubtotal}</th> + <td><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> + </tr> + <#list headerAdjustmentsToShow as orderHeaderAdjustment> + <tr> + <th colspan="7">${localOrderReadHelper.getAdjustmentType(orderHeaderAdjustment)}</th> + <td><@ofbizCurrency amount=localOrderReadHelper.getOrderAdjustmentTotal(orderHeaderAdjustment) isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> + </tr> + </#list> + <tr> + <th colspan="7">${uiLabelMap.OrderShippingAndHandling}</th> + <td><@ofbizCurrency amount=orderShippingTotal isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> + </tr> + <tr> + <th colspan="7">${uiLabelMap.OrderSalesTax}</th> + <td><@ofbizCurrency amount=orderTaxTotal isoCode=currencyUomId/></td> + <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> + </tr> + <tr> + <td colspan="3"></td> + <#if maySelectItems?default("N") == "Y"> + <td colspan="${numColumns - 6}"></td> <td colspan="3"></td> + <#else> + <td colspan="${numColumns - 3}"></td> </#if> </tr> + <tr> + <th colspan="7">${uiLabelMap.OrderGrandTotal}</th> + <td> + <@ofbizCurrency amount=orderGrandTotal isoCode=currencyUomId/> + </td> + <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> + </tr> + </tfoot> + <tbody> <#list orderItems as orderItem> <#-- get info from workeffort and calculate rental quantity, if it was a rental item --> <#assign rentalQuantity = 1> <#-- no change if no rental item --> @@ -243,43 +286,6 @@ <tr><td colspan="${numColumns}">${uiLabelMap.OrderSalesOrderLookupFailed}</td></tr> </#if> <tr><td colspan="${numColumns}"></td></tr> - <tr> - <td colspan="7">${uiLabelMap.CommonSubtotal}</td> - <td><@ofbizCurrency amount=orderSubTotal isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - <#list headerAdjustmentsToShow as orderHeaderAdjustment> - <tr> - <td colspan="7">${localOrderReadHelper.getAdjustmentType(orderHeaderAdjustment)}</td> - <td><@ofbizCurrency amount=localOrderReadHelper.getOrderAdjustmentTotal(orderHeaderAdjustment) isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - </#list> - <tr> - <td colspan="7">${uiLabelMap.OrderShippingAndHandling}</td> - <td><@ofbizCurrency amount=orderShippingTotal isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - <tr> - <td colspan="7">${uiLabelMap.OrderSalesTax}</td> - <td><@ofbizCurrency amount=orderTaxTotal isoCode=currencyUomId/></td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> - <tr> - <td colspan="3"></td> - <#if maySelectItems?default("N") == "Y"> - <td colspan="${numColumns - 6}"></td> - <td colspan="3"></td> - <#else> - <td colspan="${numColumns - 3}"></td> - </#if> - </tr> - <tr> - <td colspan="7">${uiLabelMap.OrderGrandTotal}</td> - <td> - <@ofbizCurrency amount=orderGrandTotal isoCode=currencyUomId/> - </td> - <#if maySelectItems?default("N") == "Y"><td colspan="3"></td></#if> - </tr> + </tbody> </table> </div> |
| Free forum by Nabble | Edit this page |
