Styling for shopping cart page

This commit is contained in:
summerscope
2014-05-20 15:50:03 +10:00
parent 52345d9bb3
commit 0957edee5d
7 changed files with 48 additions and 30 deletions

View File

@@ -11,5 +11,4 @@
ofn-modal {
display: block;
}
}

View File

@@ -0,0 +1,5 @@
@import mixins
@import branding
fieldset
border: 0

View File

@@ -0,0 +1,6 @@
@import mixins
@import branding
#edit-cart
button, .button
margin: 0

View File

@@ -15,3 +15,5 @@
.row
= render partial: "shop/products/form"
= render partial: "shared/footer"

View File

@@ -19,4 +19,27 @@
= 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
Product
\:
%span.order-total.item-total= number_to_currency @order.item_total
%td
Distribution
\:
%span.order-total.distribution-total= order_distribution_subtotal(@order)
%td
%td
= button_tag :class => 'neutral-btn dark expand small', :id => 'update-button' do
%i.fi-refresh
= t(:update)
%td
%h5.order-total.grand-total= @order.display_total
%td#empty-cart
/ This needs help from Will - would like a link not button
%span#clear_cart_link{"data-hook" => ""}
= form_tag empty_cart_path, :method => :put do
= submit_tag t(:empty_cart), :class => 'button alert expand small'
= render "spree/orders/adjustments" unless @order.adjustments.eligible.blank?

View File

@@ -21,7 +21,7 @@
%td.cart-item-total{"data-hook" => "cart_item_total"}
= line_item.display_amount.to_html unless line_item.quantity.nil?
%td.cart-item-delete{"data-hook" => "cart_item_delete"}
%td.cart-item-delete.text-center{"data-hook" => "cart_item_delete"}
{{ quantity }}
= link_to image_tag('icons/delete.png'), '#', :class => 'delete',
:id => "delete_#{dom_id(line_item)}"

View File

@@ -24,35 +24,18 @@
.row
= render :partial => 'form', :locals => { :order_form => order_form }
#subtotal.row{'data-hook' => ""}
.columns.large-5
%h5
Product
\:
%span.order-total.item-total= number_to_currency @order.item_total
.columns.large-4
%h5
Distribution
\:
%span.order-total.distribution-total= order_distribution_subtotal(@order)
.columns.large-3
%h4
Cart Total
\:
%span.order-total.grand-total= @order.display_total
.links{'data-hook' => "cart_buttons"}
.row
#empty-cart.columns.large-8{"data-hook" => ""}
= form_tag empty_cart_path, :method => :put do
#clear_cart_link{"data-hook" => ""}
= link_to "Continue Shopping", main_app.shop_path, class: "button secondary"
= t(:or)
= submit_tag t(:empty_cart), :class => 'button secondary'
.columns.large-8{"data-hook" => ""}
%a.button.large.secondary{href: main_app.shop_path}
%i.fi-arrow-left
Continue shopping
.columns.large-4.text-right
= button_tag :class => 'secondary', :id => 'update-button' do
= t(:update)
= t(:or)
= link_to "Checkout", main_app.checkout_path, class: "button checkout primary", id: "checkout-link"
%a#checkout-link.button.large.primary{href: main_app.checkout_path}
Checkout
%i.fi-arrow-right
= render partial: "shared/footer"