Partializing and adding yield blocks

This commit is contained in:
Will Marshall
2014-02-14 14:40:58 +11:00
parent 5c498735b0
commit a6d58aa498
5 changed files with 46 additions and 39 deletions

View File

@@ -4,7 +4,7 @@
product
display: block
shop
.darkswarm
#search
font-size: 2em
@include big-input

View File

@@ -0,0 +1,11 @@
%navigation
%distributor.details.row
#distributor_title
%img.left{src: current_distributor.logo.url(:thumb)}
%h4
= current_distributor.name
%location= current_distributor.address.city
%small
%a{href: "/"} Change location
= render partial: "shop/shop/order_cycles"

View File

@@ -1,15 +1,22 @@
- unless spree_current_user
%checkout.darkswarm
- content_for :order_cycle_form do
%form.custom
%strong.avenir
Order ready on
= pickup_time current_order_cycle
= render partial: "shop/details"
- unless spree_current_user
.row
%section#checkout_login
.large-4.columns
= render partial: "shop/checkout/login"
%section#checkout_signup
.large-4.columns
= render partial: "shop/checkout/signup"
.large-2.columns
Cart bitches!
.row
%section#checkout_login
.large-4.columns
= render partial: "shop/checkout/login"
%section#checkout_signup
.large-4.columns
= render partial: "shop/checkout/signup"
.large-2.columns
Cart bitches!
.row
= render partial: "shop/checkout/form"
= render partial: "shop/checkout/form"

View File

@@ -1,9 +1,7 @@
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
:javascript
angular.module('Shop').value('orderCycleData', #{render "shop/shop/order_cycle"})
- if @order_cycles.empty?
Orders are currently closed for this hub
%p
@@ -14,14 +12,4 @@
= render partial: "shop/shop/last_order_cycle"
- else
%form.custom
%strong.avenir Ready for
%select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
"ng-change" => "changeOrderCycle()",
"ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}"}
%closing
-#%img{src: "/icon/goes/here"}
Orders close
%strong {{ order_cycle.orders_close_at | date_in_words }}
= yield :order_cycle_form

View File

@@ -1,17 +1,18 @@
%shop{"ng-app" => "Shop"}
%navigation
%distributor.details.row
#distributor_title
%img.left{src: @distributor.logo.url(:thumb)}
%h4
= @distributor.name
%location= @distributor.address.city
%small
%a{href: "/"} Change location
%shop.darkswarm{"ng-app" => "Shop"}
= render partial: "shop/shop/order_cycles"
- content_for :order_cycle_form do
%form.custom
%strong.avenir Ready for
%select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
"ng-change" => "changeOrderCycle()",
"ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}"}
%closing
-#%img{src: "/icon/goes/here"}
Orders close
%strong {{ order_cycle.orders_close_at | date_in_words }}
= render partial: "shop/details"
-#%description
%tabs
.row