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.
This commit is contained in:
Matt-Yorkley
2020-03-25 10:08:48 +01:00
parent f5e254a105
commit 91e88bd028
4 changed files with 13 additions and 3 deletions

View File

@@ -7,7 +7,6 @@
.darkswarm.footer-pad
- content_for :order_cycle_form do
%closing
= t :checkout_now
%p
@@ -15,6 +14,10 @@
%strong
= pickup_time current_order_cycle
- content_for :ordercycle_sidebar do
.show-for-large-up.large-4.columns
= render partial: "shopping_shared/order_cycles"
= render partial: "shopping_shared/header"
%accordion{"close-others" => "false"}

View File

@@ -38,6 +38,10 @@
- if oc_select_options.count > 1
%option{value: "", disabled: "", selected: ""}= t :shopping_oc_select
- content_for :ordercycle_sidebar do
.show-for-large-up.large-4.columns
= render partial: "shopping_shared/order_cycles"
= render partial: "shopping_shared/header"
= render partial: "shopping_shared/tabs"

View File

@@ -10,5 +10,4 @@
= distributor.name
%location= distributor.address.city
.show-for-large-up.large-4.columns
= render partial: "shopping_shared/order_cycles"
= yield :ordercycle_sidebar

View File

@@ -16,6 +16,10 @@
- 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