Files
openfoodnetwork/app/views/spree/orders/edit.html.haml
Matt-Yorkley 91e88bd028 Allow conditional use of order cycle sidebar
We need to re-use the "shopping_shared/header" partial in multiple places, but we don't always want the (nested) order cycle sidebar inside it.
2020-03-25 23:07:39 +01:00

42 lines
1.2 KiB
Plaintext

- content_for(:title) do
= t :orders_edit_title
- content_for :injection_data do
= inject_enterprise_and_relatives
.darkswarm
- content_for :order_cycle_form do
%closing
= t :orders_edit_headline
%p
= t :orders_edit_time
%strong
- if @order.order_cycle
= pickup_time @order.order_cycle
- else
= @order.distributor.next_collection_at
- content_for :ordercycle_sidebar do
.show-for-large-up.large-4.columns
= render partial: "shopping_shared/order_cycles"
= render partial: "shopping_shared/header"
%fieldset.footer-pad
- if @order.line_items.empty?
%div.row{"data-hook" => "empty_cart"}
%p= t(:your_cart_is_empty)
%p= link_to t(:continue_shopping), current_shop_products_path, :class => 'button continue'
- else
%div{"data-hook" => "outside_cart_form"}
= form_for @order, :url => main_app.update_cart_path, :html => {:id => 'update-cart'} do |order_form|
%div{"data-hook" => "inside_cart_form"}
%div{"data-hook" => "cart_items"}
.row
= render :partial => 'form', :locals => { :order_form => order_form }
= render "spree/orders/form/cart_links"
= render partial: "shared/footer"