Files
openfoodnetwork/app/views/spree/orders/_form.html.haml

64 lines
2.5 KiB
Plaintext

= render :partial => 'spree/shared/error_messages', :locals => { :target => @order }
.row
.columns.large-12
%table#cart-detail{"data-hook" => ""}
%col{halign: "left", valign: "middle", width: "60%"}/
%col{halign: "left", valign: "middle", width: "15%"}/
%col{halign: "center", valign: "middle", width: "10%"}/
%col{halign: "center", valign: "middle", width: "10%"}/
%col{halign: "center", valign: "middle", width: "5%"}/
%thead
%tr{"data-hook" => "cart_items_headers"}
%th.cart-item-description-header= t(:item)
%th.cart-item-price-header.text-right= t(:price)
%th.text-center.cart-item-quantity-header= t(:qty)
%th.cart-item-total-header.text-right= t(:total)
%th.cart-item-delete-header
%tbody#line_items{"data-hook" => ""}
= order_form.fields_for :line_items do |item_form|
= render :partial => 'line_item', :locals => { :variant => item_form.object.variant, :line_item => item_form.object, :item_form => item_form }
= render 'bought' if show_bought_items? && @order.cart?
%tfoot#edit-cart
= render 'spree/orders/form/cart_actions_row' if @order.cart?
%tr
%td.text-right{colspan:"3"}
= t :orders_form_subtotal
%td.text-right
%span.order-total.item-total= display_checkout_subtotal(@order)
%td
-if display_checkout_admin_and_handling_adjustments_total_for(@order) != Spree::Money.new(0 , currency: @order.currency)
%tr
%td.text-right{colspan:"3"}
= t :orders_form_admin
%td.text-right
%span.order-total.distribution-total= display_checkout_admin_and_handling_adjustments_total_for(@order)
%td
- checkout_adjustments_for(@order, exclude: [:line_item, :admin_and_handling]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment|
%tr.order-adjustment
%td.text-right{:colspan => "3"}
= adjustment.label
%td.text-right.total
%span= adjustment.display_amount.to_html
%td
%tr
%td.text-right{colspan:"3"}
%h5
= t :orders_form_total
%td.text-right
%h5.order-total.grand-total= @order.display_total
%td
- if @order.total_tax > 0
%tr
%td.text-right{colspan:"3"} (includes tax)
%td.text-right
%span.order-total.tax-total= display_checkout_tax_total(@order)
%td