Rearrange buttons on cart checkout form

This commit is contained in:
Rohan Mitchell
2012-06-26 10:47:43 +10:00
parent 3ad575cb5f
commit cb6ac2064d
3 changed files with 36 additions and 0 deletions

View File

@@ -135,3 +135,20 @@ ul.product-listing {
.distributor-fixed {
}
}
/* View cart form */
#subtotal {
width: 100%;
}
.links {
float: right;
text-align: right;
}
#empty-cart {
float: left;
p {
padding: 0;
}
}

View File

@@ -0,0 +1,5 @@
# Remove column layout from cart form items so we can style it with CSS
Deface::Override.new(:virtual_path => "spree/orders/edit",
:replace => "[data-hook='inside_cart_form']",
:partial => "spree/orders/inside_cart_form",
:name => "inside_cart_form")

View File

@@ -0,0 +1,14 @@
%div{'data-hook' => "inside_cart_form"}
%div{'data-hook' => "cart_items"}
= render :partial => 'form', :locals => { :order_form => order_form }
#subtotal{'data-hook' => ""}
%h5
= t(:subtotal)
\:
%span.order-total= order_subtotal(@order)
.links{'data-hook' => "cart_buttons"}
= button_tag :class => 'primary', :id => 'update-button' do
= t(:update)
= link_to t(:checkout), checkout_path, :class => 'button checkout primary', :id => 'checkout-link'