You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2018/01/13 08:41:31 UTC
svn commit: r1821049 - in
/ofbiz/ofbiz-plugins/trunk/ecommerce/template/order: OrderHeader.ftl
OrderHistory.ftl OrderItems.ftl
Author: deepak
Date: Sat Jan 13 08:41:31 2018
New Revision: 1821049
URL: http://svn.apache.org/viewvc?rev=1821049&view=rev
Log:
Improved: Update markup of OrderHistory page according to standard markup given by Bootstrap v4.0.0 (OFBIZ-10135)
Thanks Nitish Mishra for your contribution
Modified:
ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHeader.ftl
ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHistory.ftl
ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderItems.ftl
Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHeader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHeader.ftl?rev=1821049&r1=1821048&r2=1821049&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHeader.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHeader.ftl Sat Jan 13 08:41:31 2018
@@ -24,221 +24,231 @@ under the License.
<#assign externalOrder = "(" + orderHeader.externalId + ")"/>
</#if>
- <div class="screenlet">
- <h3>
- <#if "Y" == maySelectItems?default("N") && "Y" == returnLink?default("N") && "ORDER_COMPLETED" == (orderHeader.statusId)! && "PLACING_CUSTOMER" == roleTypeId!>
- <a href="<@ofbizUrl fullPath="true">makeReturn?orderId=${orderHeader.orderId}</...@ofbizUrl>"
- class="submenutextright">${uiLabelMap.OrderRequestReturn}</a>
- </#if>
- ${uiLabelMap.OrderOrder}
- <#if orderHeader?has_content>
- ${uiLabelMap.CommonNbr}
- <a href="<@ofbizUrl fullPath="true">orderstatus?orderId=${orderHeader.orderId}</...@ofbizUrl>"
- class="lightbuttontext">${orderHeader.orderId}</a>
- </#if>
- ${uiLabelMap.CommonInformation}
- <#if (orderHeader.orderId)??>
- ${externalOrder!} [ <a href="<@ofbizUrl fullPath="true">order.pdf?orderId=${(orderHeader.orderId)!}</...@ofbizUrl>"
- target="_BLANK" class="lightbuttontext">PDF</a> ]
- </#if>
- </h3>
- <#-- placing customer information -->
- <ul>
- <#if localOrderReadHelper?? && orderHeader?has_content>
- <#assign displayParty = localOrderReadHelper.getPlacingParty()!/>
- <#if displayParty?has_content>
- <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/>
- </#if>
- <li>
- ${uiLabelMap.PartyName}
- ${(displayPartyNameResult.fullName)?default("[Name Not Found]")}
- </li>
+ <div class="card">
+ <div class="card-header">
+ <strong>
+ <#if "Y" == maySelectItems?default("N") && "Y" == returnLink?default("N") && "ORDER_COMPLETED" == (orderHeader.statusId)! && "PLACING_CUSTOMER" == roleTypeId!>
+ <a href="<@ofbizUrl fullPath="true">makeReturn?orderId=${orderHeader.orderId}</...@ofbizUrl>"
+ class="submenutextright">${uiLabelMap.OrderRequestReturn}</a>
</#if>
- <#-- order status information -->
- <li>
- ${uiLabelMap.CommonStatus}
- <#if orderHeader?has_content>
- ${localOrderReadHelper.getStatusString(locale)}
- <#else>
- ${uiLabelMap.OrderNotYetOrdered}
- </#if>
- </li>
- <#-- ordered date -->
+ ${uiLabelMap.OrderOrder}
<#if orderHeader?has_content>
- <li>
- ${uiLabelMap.CommonDate}
- ${orderHeader.orderDate.toString()}
- </li>
+ ${uiLabelMap.CommonNbr}
+ <a href="<@ofbizUrl fullPath="true">orderstatus?orderId=${orderHeader.orderId}</...@ofbizUrl>"
+ class="btn btn-sm">${orderHeader.orderId}</a>
+ </#if>
+ ${uiLabelMap.CommonInformation}
+ <#if (orderHeader.orderId)??>
+ ${externalOrder!} [ <a href="<@ofbizUrl fullPath="true">order.pdf?orderId=${(orderHeader.orderId)!}</...@ofbizUrl>"
+ target="_BLANK" class="btn btn-sm">PDF</a> ]
</#if>
- <#if distributorId??>
+ </strong>
+ </div>
+ <div class="card-body">
+ <#-- placing customer information -->
+ <ul class="list-unstyled">
+ <#if localOrderReadHelper?? && orderHeader?has_content>
+ <#assign displayParty = localOrderReadHelper.getPlacingParty()!/>
+ <#if displayParty?has_content>
+ <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/>
+ </#if>
+ <li>
+ ${uiLabelMap.PartyName} :
+ ${(displayPartyNameResult.fullName)?default("[Name Not Found]")}
+ </li>
+ </#if>
+ <#-- order status information -->
<li>
- ${uiLabelMap.OrderDistributor}
- ${distributorId}
+ ${uiLabelMap.CommonStatus} :
+ <#if orderHeader?has_content>
+ ${localOrderReadHelper.getStatusString(locale)}
+ <#else>
+ ${uiLabelMap.OrderNotYetOrdered}
+ </#if>
</li>
- </#if>
- </ul>
+ <#-- ordered date -->
+ <#if orderHeader?has_content>
+ <li>
+ ${uiLabelMap.CommonDate} :
+ ${orderHeader.orderDate.toString()}
+ </li>
+ </#if>
+ <#if distributorId??>
+ <li>
+ ${uiLabelMap.OrderDistributor} :
+ ${distributorId}
+ </li>
+ </#if>
+ </ul>
+ </div>
</div>
- <div class="screenlet">
+ <div class="card">
<#if paymentMethods?has_content || paymentMethodType?has_content || billingAccount?has_content>
<#-- order payment info -->
- <h3>${uiLabelMap.AccountingPaymentInformation}</h3>
+ <div class="card-header">
+ <strong>${uiLabelMap.AccountingPaymentInformation}</strong>
+ </div>
<#-- offline payment address infomation :: change this to use Company's address -->
- <ul>
- <#if !paymentMethod?has_content && paymentMethodType?has_content>
- <li>
- <#if "EXT_OFFLINE" == paymentMethodType.paymentMethodTypeId>
- ${uiLabelMap.AccountingOfflinePayment}
- <#if orderHeader?has_content && paymentAddress?has_content>
- ${uiLabelMap.OrderSendPaymentTo}:
- <#if paymentAddress.toName?has_content>${paymentAddress.toName}</#if>
- <#if paymentAddress.attnName?has_content>
- ${uiLabelMap.PartyAddrAttnName} : ${paymentAddress.attnName}
+ <div class="card-body">
+ <ul class="list-unstyled">
+ <#if !paymentMethod?has_content && paymentMethodType?has_content>
+ <li>
+ <#if "EXT_OFFLINE" == paymentMethodType.paymentMethodTypeId>
+ ${uiLabelMap.AccountingOfflinePayment}
+ <#if orderHeader?has_content && paymentAddress?has_content>
+ ${uiLabelMap.OrderSendPaymentTo}:
+ <#if paymentAddress.toName?has_content>${paymentAddress.toName}</#if>
+ <#if paymentAddress.attnName?has_content>
+ ${uiLabelMap.PartyAddrAttnName} : ${paymentAddress.attnName}
+ </#if>
+ ${paymentAddress.address1}
+ <#if paymentAddress.address2?has_content>${paymentAddress.address2}</#if>
+ <#assign paymentStateGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.stateProvinceGeoId!}, false))! />
+ ${paymentAddress.city}
+ <#if paymentStateGeo?has_content>, ${paymentStateGeo.geoName!}</#if>
+ ${paymentAddress.postalCode!}
+ <#assign paymentCountryGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.countryGeoId!}, false))! />
+ <#if paymentCountryGeo?has_content>${paymentCountryGeo.geoName!}</#if>
+ ${uiLabelMap.EcommerceBeSureToIncludeYourOrderNb}
</#if>
- ${paymentAddress.address1}
- <#if paymentAddress.address2?has_content>${paymentAddress.address2}</#if>
- <#assign paymentStateGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.stateProvinceGeoId!}, false))! />
- ${paymentAddress.city}
- <#if paymentStateGeo?has_content>, ${paymentStateGeo.geoName!}</#if>
- ${paymentAddress.postalCode!}
- <#assign paymentCountryGeo = (delegator.findOne("Geo", {"geoId", paymentAddress.countryGeoId!}, false))! />
- <#if paymentCountryGeo?has_content>${paymentCountryGeo.geoName!}</#if>
- ${uiLabelMap.EcommerceBeSureToIncludeYourOrderNb}
+ <#else>
+ <#assign outputted = true>
+ ${uiLabelMap.AccountingPaymentVia} ${paymentMethodType.get("description",locale)}
</#if>
- <#else>
- <#assign outputted = true>
- ${uiLabelMap.AccountingPaymentVia} ${paymentMethodType.get("description",locale)}
- </#if>
- </li>
- </#if>
- <#if paymentMethods?has_content>
- <#list paymentMethods as paymentMethod>
- <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId>
- <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)>
- <#assign formattedCardNumber = Static["org.apache.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)>
- <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId>
- <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false)>
- <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId>
- <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)>
- </#if>
- <#-- credit card info -->
- <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId && creditCard?has_content>
- <#if outputted?default(false)></#if>
- <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)!>
- <li>
- <ul>
- <li> ${uiLabelMap.AccountingCreditCard}
- <#if creditCard.companyNameOnCard?has_content>${creditCard.companyNameOnCard}</#if>
- <#if creditCard.titleOnCard?has_content>${creditCard.titleOnCard}</#if>
- ${creditCard.firstNameOnCard}
- <#if creditCard.middleNameOnCard?has_content>${creditCard.middleNameOnCard}</#if>
- ${creditCard.lastNameOnCard}
- <#if creditCard.suffixOnCard?has_content>${creditCard.suffixOnCard}</#if>
- </li>
- <li>${formattedCardNumber}</li>
- </ul>
- </li>
- <#-- Gift Card info -->
- <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId && giftCard?has_content>
- <#if outputted?default(false)></#if>
- <#if giftCard?has_content && giftCard.cardNumber?has_content>
- <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress", false)!>
- <#assign giftCardNumber = "">
- <#assign pcardNumber = giftCard.cardNumber>
- <#if pcardNumber?has_content>
- <#assign psize = pcardNumber?length - 4>
- <#if 0 < psize>
- <#list 0 .. psize-1 as foo>
- <#assign giftCardNumber = giftCardNumber + "*">
- </#list>
- <#assign giftCardNumber = giftCardNumber + pcardNumber[psize .. psize + 3]>
- <#else>
- <#assign giftCardNumber = pcardNumber>
+ </li>
+ </#if>
+ <#if paymentMethods?has_content>
+ <#list paymentMethods as paymentMethod>
+ <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId>
+ <#assign creditCard = paymentMethod.getRelatedOne("CreditCard", false)>
+ <#assign formattedCardNumber = Static["org.apache.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)>
+ <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId>
+ <#assign giftCard = paymentMethod.getRelatedOne("GiftCard", false)>
+ <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId>
+ <#assign eftAccount = paymentMethod.getRelatedOne("EftAccount", false)>
+ </#if>
+ <#-- credit card info -->
+ <#if "CREDIT_CARD" == paymentMethod.paymentMethodTypeId && creditCard?has_content>
+ <#if outputted?default(false)></#if>
+ <#assign pmBillingAddress = creditCard.getRelatedOne("PostalAddress", false)!>
+ <li>
+ <ul class="list-unstyled">
+ <li> ${uiLabelMap.AccountingCreditCard}
+ <#if creditCard.companyNameOnCard?has_content>${creditCard.companyNameOnCard}</#if>
+ <#if creditCard.titleOnCard?has_content>${creditCard.titleOnCard}</#if>
+ ${creditCard.firstNameOnCard}
+ <#if creditCard.middleNameOnCard?has_content>${creditCard.middleNameOnCard}</#if>
+ ${creditCard.lastNameOnCard}
+ <#if creditCard.suffixOnCard?has_content>${creditCard.suffixOnCard}</#if>
+ </li>
+ <li>${formattedCardNumber}</li>
+ </ul>
+ </li>
+ <#-- Gift Card info -->
+ <#elseif "GIFT_CARD" == paymentMethod.paymentMethodTypeId && giftCard?has_content>
+ <#if outputted?default(false)></#if>
+ <#if giftCard?has_content && giftCard.cardNumber?has_content>
+ <#assign pmBillingAddress = giftCard.getRelatedOne("PostalAddress", false)!>
+ <#assign giftCardNumber = "">
+ <#assign pcardNumber = giftCard.cardNumber>
+ <#if pcardNumber?has_content>
+ <#assign psize = pcardNumber?length - 4>
+ <#if 0 < psize>
+ <#list 0 .. psize-1 as foo>
+ <#assign giftCardNumber = giftCardNumber + "*">
+ </#list>
+ <#assign giftCardNumber = giftCardNumber + pcardNumber[psize .. psize + 3]>
+ <#else>
+ <#assign giftCardNumber = pcardNumber>
+ </#if>
</#if>
</#if>
+ <li>
+ ${uiLabelMap.AccountingGiftCard}
+ ${giftCardNumber}
+ </li>
+ <#-- EFT account info -->
+ <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId && eftAccount?has_content>
+ <#if outputted?default(false)></#if>
+ <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress", false)!>
+ <li>
+ <ul class="list-unstyled">
+ <li>
+ ${uiLabelMap.AccountingEFTAccount}
+ ${eftAccount.nameOnAccount!}
+ </li>
+ <li>
+ <#if eftAccount.companyNameOnAccount?has_content>${eftAccount.companyNameOnAccount}</#if>
+ </li>
+ <li>
+ ${uiLabelMap.AccountingBank}: ${eftAccount.bankName}, ${eftAccount.routingNumber}
+ </li>
+ <li>
+ ${uiLabelMap.AccountingAccount} #: ${eftAccount.accountNumber}
+ </li>
+ </ul>
+ </li>
</#if>
- <li>
- ${uiLabelMap.AccountingGiftCard}
- ${giftCardNumber}
- </li>
- <#-- EFT account info -->
- <#elseif "EFT_ACCOUNT" == paymentMethod.paymentMethodTypeId && eftAccount?has_content>
- <#if outputted?default(false)></#if>
- <#assign pmBillingAddress = eftAccount.getRelatedOne("PostalAddress", false)!>
- <li>
- <ul>
- <li>
- ${uiLabelMap.AccountingEFTAccount}
- ${eftAccount.nameOnAccount!}
- </li>
- <li>
- <#if eftAccount.companyNameOnAccount?has_content>${eftAccount.companyNameOnAccount}</#if>
- </li>
- <li>
- ${uiLabelMap.AccountingBank}: ${eftAccount.bankName}, ${eftAccount.routingNumber}
- </li>
- <li>
- ${uiLabelMap.AccountingAccount} #: ${eftAccount.accountNumber}
- </li>
- </ul>
- </li>
- </#if>
- <#if pmBillingAddress?has_content>
- <li>
- <ul>
- <li>
- <#if pmBillingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${pmBillingAddress.toName}</#if>
- </li>
- <li>
- <#if pmBillingAddress.attnName?has_content>
- ${uiLabelMap.CommonAttn} : ${pmBillingAddress.attnName}
- </#if>
- </li>
- <li>
- ${pmBillingAddress.address1}
- </li>
- <li>
- <#if pmBillingAddress.address2?has_content>${pmBillingAddress.address2}</#if>
- </li>
- <li>
- <#assign pmBillingStateGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.stateProvinceGeoId!}, false))! />
- ${pmBillingAddress.city}
- <#if pmBillingStateGeo?has_content> , ${ pmBillingStateGeo.geoName!}</#if>
- ${pmBillingAddress.postalCode!}
- <#assign pmBillingCountryGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.countryGeoId!}, false))! />
- <#if pmBillingCountryGeo?has_content>${pmBillingCountryGeo.geoName!}</#if>
- </li>
- </ul>
- </li>
- </#if>
- <#assign outputted = true>
- </#list>
- </#if>
- <#-- billing account info -->
- <#if billingAccount?has_content>
- <#if outputted?default(false)></#if>
- <#assign outputted = true>
- <li>
- ${uiLabelMap.AccountingBillingAccount}
- #${billingAccount.billingAccountId!} - ${billingAccount.description!}
- </li>
- </#if>
- <#if (customerPoNumberSet?has_content)>
- <li>
- ${uiLabelMap.OrderPurchaseOrderNumber}
- <#list customerPoNumberSet as customerPoNumber>
- ${customerPoNumber!}
+ <#if pmBillingAddress?has_content>
+ <li>
+ <ul class="list-unstyled">
+ <li>
+ <#if pmBillingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${pmBillingAddress.toName}</#if>
+ </li>
+ <li>
+ <#if pmBillingAddress.attnName?has_content>
+ ${uiLabelMap.CommonAttn} : ${pmBillingAddress.attnName}
+ </#if>
+ </li>
+ <li>
+ ${pmBillingAddress.address1}
+ </li>
+ <li>
+ <#if pmBillingAddress.address2?has_content>${pmBillingAddress.address2}</#if>
+ </li>
+ <li>
+ <#assign pmBillingStateGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.stateProvinceGeoId!}, false))! />
+ ${pmBillingAddress.city}
+ <#if pmBillingStateGeo?has_content> , ${ pmBillingStateGeo.geoName!}</#if>
+ ${pmBillingAddress.postalCode!}
+ <#assign pmBillingCountryGeo = (delegator.findOne("Geo", {"geoId", pmBillingAddress.countryGeoId!}, false))! />
+ <#if pmBillingCountryGeo?has_content>${pmBillingCountryGeo.geoName!}</#if>
+ </li>
+ </ul>
+ </li>
+ </#if>
+ <#assign outputted = true>
</#list>
- </li>
- </#if>
- </ul>
+ </#if>
+ <#-- billing account info -->
+ <#if billingAccount?has_content>
+ <#if outputted?default(false)></#if>
+ <#assign outputted = true>
+ <li>
+ ${uiLabelMap.AccountingBillingAccount}
+ #${billingAccount.billingAccountId!} - ${billingAccount.description!}
+ </li>
+ </#if>
+ <#if (customerPoNumberSet?has_content)>
+ <li>
+ ${uiLabelMap.OrderPurchaseOrderNumber}
+ <#list customerPoNumberSet as customerPoNumber>
+ ${customerPoNumber!}
+ </#list>
+ </li>
+ </#if>
+ </ul>
+ </div>
</#if>
</div>
- <#-- right side -->
- <div class="screenlet">
+ <div class="card">
<#if orderItemShipGroups?has_content>
- <h3>${uiLabelMap.OrderShippingInformation}</h3>
+ <div class="card-header">
+ <strong>${uiLabelMap.OrderShippingInformation}</strong>
+ </div>
+ <div class="card-body">
<#-- shipping address -->
<#assign groupIdx = 0>
<#list orderItemShipGroups as shipGroup>
@@ -249,10 +259,10 @@ under the License.
<#assign shippingAddress = cart.getShippingAddress(groupIdx)!>
<#assign groupNumber = groupIdx + 1>
</#if>
- <ul>
+ <ul class="list-unstyled">
<#if shippingAddress?has_content>
<li>
- <ul>
+ <ul class="list-unstyled">
<li>
${uiLabelMap.OrderDestination} [${groupNumber}]
<#if shippingAddress.toName?has_content>${uiLabelMap.CommonTo}: ${shippingAddress.toName}</#if>
@@ -282,7 +292,7 @@ under the License.
</li>
</#if>
<li>
- <ul>
+ <ul class="list-unstyled">
<li>
${uiLabelMap.OrderMethod}:
<#if orderHeader?has_content>
@@ -368,6 +378,7 @@ under the License.
</ul>
<#assign groupIdx = groupIdx + 1>
</#list><#-- end list of orderItemShipGroups -->
+ </div>
</#if>
</div>
Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHistory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHistory.ftl?rev=1821049&r1=1821048&r2=1821049&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHistory.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderHistory.ftl Sat Jan 13 08:41:31 2018
@@ -18,119 +18,131 @@ under the License.
-->
<div>
- <div class="screenlet">
- <h3>${uiLabelMap.OrderSalesHistory}</h3>
- <table id="orderSalesHistory" summary="This table display order sales history.">
- <thead>
- <tr>
- <th>${uiLabelMap.CommonDate}</th>
- <th>${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</th>
- <th>${uiLabelMap.CommonAmount}</th>
- <th>${uiLabelMap.CommonStatus}</th>
- <th>${uiLabelMap.OrderInvoices}</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <#if orderHeaderList?has_content>
- <#list orderHeaderList as orderHeader>
- <#assign status = orderHeader.getRelatedOne("StatusItem", true) />
- <tr>
- <td>${orderHeader.orderDate.toString()}</td>
- <td>${orderHeader.orderId}</td>
- <td><@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom /></td>
- <td>${status.get("description",locale)}</td>
- <#-- invoices -->
- <#assign invoices = EntityQuery.use(delegator).from("OrderItemBilling").where("orderId", orderHeader.orderId).orderBy("invoiceId").queryList()!/>
- <#assign distinctInvoiceIds = Static["org.apache.ofbiz.entity.util.EntityUtil"].getFieldListFromEntityList(invoices, "invoiceId", true)>
- <#if distinctInvoiceIds?has_content>
+ <div class="card">
+ <div class="card-header">
+ <strong>${uiLabelMap.OrderSalesHistory}</strong>
+ </div>
+ <div class="card-body">
+ <table class="table table-responsive-sm" id="orderSalesHistory" summary="This table display order sales history.">
+ <thead class="thead-light">
+ <tr>
+ <th>${uiLabelMap.CommonDate}</th>
+ <th>${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</th>
+ <th>${uiLabelMap.CommonAmount}</th>
+ <th>${uiLabelMap.CommonStatus}</th>
+ <th>${uiLabelMap.OrderInvoices}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <#if orderHeaderList?has_content>
+ <#list orderHeaderList as orderHeader>
+ <#assign status = orderHeader.getRelatedOne("StatusItem", true) />
+ <tr>
+ <td>${orderHeader.orderDate.toString()}</td>
+ <td>${orderHeader.orderId}</td>
+ <td><@ofbizCurrency amount=orderHeader.grandTotal isoCode=orderHeader.currencyUom /></td>
+ <td>${status.get("description",locale)}</td>
+ <#-- invoices -->
+ <#assign invoices = EntityQuery.use(delegator).from("OrderItemBilling").where("orderId", orderHeader.orderId).orderBy("invoiceId").queryList()!/>
+ <#assign distinctInvoiceIds = Static["org.apache.ofbiz.entity.util.EntityUtil"].getFieldListFromEntityList(invoices, "invoiceId", true)>
+ <#if distinctInvoiceIds?has_content>
+ <td>
+ <#list distinctInvoiceIds as invoiceId>
+ <a href="<@o...@ofbizUrl>" class="buttontext">
+ (${invoiceId} PDF)
+ </a>
+ </#list>
+ </td>
+ <#else>
+ <td></td>
+ </#if>
<td>
- <#list distinctInvoiceIds as invoiceId>
- <a href="<@o...@ofbizUrl>" class="buttontext">
- (${invoiceId} PDF)
- </a>
- </#list>
+ <a href="<@o...@ofbizUrl>" class="button">
+ ${uiLabelMap.CommonView}
+ </a>
</td>
- <#else>
- <td></td>
- </#if>
- <td>
- <a href="<@o...@ofbizUrl>" class="button">
- ${uiLabelMap.CommonView}
- </a>
- </td>
- </tr>
- </#list>
- <#else>
- <tr><td colspan="6">${uiLabelMap.OrderNoOrderFound}</td></tr>
- </#if>
- </tbody>
- </table>
+ </tr>
+ </#list>
+ <#else>
+ <tr><td colspan="6">${uiLabelMap.OrderNoOrderFound}</td></tr>
+ </#if>
+ </tbody>
+ </table>
+ </div>
</div>
- <div class="screenlet">
- <h3>${uiLabelMap.OrderPurchaseHistory}</h3>
- <table id="orderPurchaseHistory" summary="This table display order purchase history.">
- <thead>
- <tr>
- <th>${uiLabelMap.CommonDate}</th>
- <th>${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</th>
- <th>${uiLabelMap.CommonAmount}</th>
- <th>${uiLabelMap.CommonStatus}</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <#if porderHeaderList?has_content>
- <#list porderHeaderList as porderHeader>
- <#assign pstatus = porderHeader.getRelatedOne("StatusItem", true) />
- <tr>
- <td>${porderHeader.orderDate.toString()}</td>
- <td>${porderHeader.orderId}</td>
- <td><@ofbizCurrency amount=porderHeader.grandTotal isoCode=porderHeader.currencyUom /></td>
- <td>${pstatus.get("description",locale)}</td>
- <td>
- <a href="<@o...@ofbizUrl>"
- class="button">
- ${uiLabelMap.CommonView}
- </a>
- </td>
- </tr>
- </#list>
- <#else>
- <tr><td colspan="5">${uiLabelMap.OrderNoOrderFound}</td></tr>
- </#if>
- </tbody>
- </table>
+ <div class="card">
+ <div class="card-header">
+ <strong>${uiLabelMap.OrderPurchaseHistory}</strong>
+ </div>
+ <div class="card-body">
+ <table class="table table-responsive-sm" id="orderPurchaseHistory" summary="This table display order purchase history.">
+ <thead class="thead-light">
+ <tr>
+ <th>${uiLabelMap.CommonDate}</th>
+ <th>${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</th>
+ <th>${uiLabelMap.CommonAmount}</th>
+ <th>${uiLabelMap.CommonStatus}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <#if porderHeaderList?has_content>
+ <#list porderHeaderList as porderHeader>
+ <#assign pstatus = porderHeader.getRelatedOne("StatusItem", true) />
+ <tr>
+ <td>${porderHeader.orderDate.toString()}</td>
+ <td>${porderHeader.orderId}</td>
+ <td><@ofbizCurrency amount=porderHeader.grandTotal isoCode=porderHeader.currencyUom /></td>
+ <td>${pstatus.get("description",locale)}</td>
+ <td>
+ <a href="<@o...@ofbizUrl>"
+ class="button">
+ ${uiLabelMap.CommonView}
+ </a>
+ </td>
+ </tr>
+ </#list>
+ <#else>
+ <tr><td colspan="5">${uiLabelMap.OrderNoOrderFound}</td></tr>
+ </#if>
+ </tbody>
+ </table>
+ </div>
</div>
- <div class="screenlet">
- <h3>${uiLabelMap.EcommerceDownloadsAvailableTitle}</h3>
- <table id="availableTitleDownload" summary="This table display available title for download.">
- <thead>
- <tr>
- <th>${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</th>
- <th>${uiLabelMap.ProductProductName}</th>
- <th>${uiLabelMap.CommonName}</th>
- <th>${uiLabelMap.CommonDescription}</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <#if downloadOrderRoleAndProductContentInfoList?has_content>
- <#list downloadOrderRoleAndProductContentInfoList as downloadOrderRoleAndProductContentInfo>
- <tr>
- <td>${downloadOrderRoleAndProductContentInfo.orderId}</td>
- <td>${downloadOrderRoleAndProductContentInfo.productName}</td>
- <td>${downloadOrderRoleAndProductContentInfo.contentName!}</td>
- <td>${downloadOrderRoleAndProductContentInfo.description!}</td>
- <td>
- <a href="<@o...@ofbizUrl>" class="button">Download</a>
- </td>
- </tr>
- </#list>
- <#else>
- <tr><td colspan="5">${uiLabelMap.EcommerceDownloadNotFound}</td></tr>
- </#if>
- </tbody>
- </table>
+ <div class="card">
+ <div class="card-header">
+ <strong>${uiLabelMap.EcommerceDownloadsAvailableTitle}</strong>
+ </div>
+ <div class="card-body">
+ <table class="table table-responsive-sm" id="availableTitleDownload" summary="This table display available title for download.">
+ <thead class="thead-light">
+ <tr>
+ <th>${uiLabelMap.OrderOrder} ${uiLabelMap.CommonNbr}</th>
+ <th>${uiLabelMap.ProductProductName}</th>
+ <th>${uiLabelMap.CommonName}</th>
+ <th>${uiLabelMap.CommonDescription}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <#if downloadOrderRoleAndProductContentInfoList?has_content>
+ <#list downloadOrderRoleAndProductContentInfoList as downloadOrderRoleAndProductContentInfo>
+ <tr>
+ <td>${downloadOrderRoleAndProductContentInfo.orderId}</td>
+ <td>${downloadOrderRoleAndProductContentInfo.productName}</td>
+ <td>${downloadOrderRoleAndProductContentInfo.contentName!}</td>
+ <td>${downloadOrderRoleAndProductContentInfo.description!}</td>
+ <td>
+ <a href="<@o...@ofbizUrl>" class="button">Download</a>
+ </td>
+ </tr>
+ </#list>
+ <#else>
+ <tr><td colspan="5">${uiLabelMap.EcommerceDownloadNotFound}</td></tr>
+ </#if>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderItems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderItems.ftl?rev=1821049&r1=1821048&r2=1821049&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderItems.ftl (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/template/order/OrderItems.ftl Sat Jan 13 08:41:31 2018
@@ -20,27 +20,30 @@ under the License.
<#-- NOTE: this template is used for the orderstatus screen in ecommerce AND for order notification emails through the OrderNoticeEmail.ftl file -->
<#-- the "urlPrefix" value will be prepended to URLs by the ofbizUrl transform if/when there is no "request" object in the context -->
<#if baseEcommerceSecureUrl??><#assign urlPrefix = baseEcommerceSecureUrl/></#if>
-<div class="screenlet">
+<div class="card">
<#if "Y" == maySelectItems?default("N")>
- <form name="addCommonToCartForm" action="<@o...@ofbizUrl>" method="post">
+ <form name="addCommonToCartForm" action="<@o...@ofbizUrl>" method="post">
<input type="hidden" name="add_all" value="false" />
<input type="hidden" name="orderId" value="${orderHeader.orderId}" />
</#if>
- <h3>
+ <div class="card-header">
+ <strong>
<#assign numColumns = 8>
${uiLabelMap.OrderOrderItems}
<#if "Y" == maySelectItems?default("N") && "PLACING_CUSTOMER" == roleTypeId!>
<#assign numColumns = 11>
<a href="javascript:document.addCommonToCartForm.add_all.value='true';document.addCommonToCartForm.submit()"
- class="submenutext">${uiLabelMap.OrderAddAllToCart}</a>
+ class="btn btn-sm float-right">${uiLabelMap.OrderAddAllToCart}</a>
<a href="javascript:document.addCommonToCartForm.add_all.value='false';document.addCommonToCartForm.submit()"
- class="submenutext">${uiLabelMap.OrderAddCheckedToCart}</a>
+ class="btn btn-sm float-right">${uiLabelMap.OrderAddCheckedToCart}</a>
<a href="<@ofbizUrl fullPath="true">createShoppingListFromOrder?orderId=${orderHeader.orderId}&frequency=6&intervalNumber=1&shoppingListTypeId=SLT_AUTO_REODR</...@ofbizUrl>"
- class="submenutextright">${uiLabelMap.OrderSendMeThisEveryMonth}</a>
+ class="btn btn-sm float-right">${uiLabelMap.OrderSendMeThisEveryMonth}</a>
</#if>
- </h3>
- <table>
- <thead>
+ </strong>
+ </div>
+ <div class="card-body">
+ <table class="table table-responsive-sm">
+ <thead class="thead-light">
<tr>
<th>${uiLabelMap.OrderProduct}</th>
<#if "Y" == maySelectItems?default("N")>
@@ -146,7 +149,7 @@ under the License.
class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")}</a>
<#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/>
<#if orderItemAttributes?has_content>
- <ul>
+ <ul class="list-unstyled">
<#list orderItemAttributes as orderItemAttribute>
<li>${orderItemAttribute.attrName} : ${orderItemAttribute.attrValue}</li>
</#list>
@@ -345,4 +348,5 @@ under the License.
<#if "Y" == maySelectItems?default("N") >
</form>
</#if>
+ </div>
</div>
\ No newline at end of file