mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Partializing and adding yield blocks
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
product
|
||||
display: block
|
||||
|
||||
shop
|
||||
.darkswarm
|
||||
#search
|
||||
font-size: 2em
|
||||
@include big-input
|
||||
|
||||
11
app/views/shop/_details.html.haml
Normal file
11
app/views/shop/_details.html.haml
Normal 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"
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user