Files
openfoodnetwork/app/views/spree/orders/_form.html.haml
2015-04-17 13:41:14 +10:00

66 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 }
%tfoot#edit-cart
%tr
%td{colspan:"2"}
%td
= button_tag :class => 'secondary radius expand small', :id => 'update-button' do
%i.ofn-i_023-refresh
= t(:update)
%td
%td#empty-cart.text-center
%span#clear_cart_link{"data-hook" => ""}
= link_to "Empty cart", empty_cart_path, method: :put, :class => 'not-bold small'
-#= form_tag empty_cart_path, :method => :put do
-#= submit_tag t(:empty_cart), :class => 'button alert expand small'
/ This is the fees row which we want to replace with the pop-over
-# - unless @order.adjustments.eligible.blank?
-# = render "spree/orders/adjustments"
%tr
%td.text-right{colspan:"3"} Produce subtotal
%td.text-right
%span.order-total.item-total= display_checkout_subtotal(@order)
%td
%tr
%td.text-right{colspan:"3"} Admin & handling
%td.text-right
%span.order-total.distribution-total= display_checkout_admin_and_handling_adjustments_total_for(@order)
%td
%tr
%td.text-right{colspan:"3"}
%h5 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