mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Instanciate only one ProductsCtrl
- instead of 2: therefore, for each shop display, we only request products one time instead of two times.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.content.footer-pad{ "darker-background" => true, "ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id == null" }
|
||||
.content.footer-pad{ "darker-background" => true, "ng-show" => "order_cycle.order_cycle_id == null" }
|
||||
.row
|
||||
.small-12.columns
|
||||
.select-oc-message
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%form{action: main_app.cart_path}
|
||||
%products{"ng-controller" => "ProductsCtrl", "ng-init" => "refreshStaleData()", "ng-show" => "order_cycle.order_cycle_id != null", "ng-cloak" => true }
|
||||
%products{"ng-init" => "refreshStaleData()", "ng-show" => "order_cycle.order_cycle_id != null", "ng-cloak" => true }
|
||||
|
||||
= render partial: "shop/products/searchbar"
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
.order-cycle-bar.hide-for-large-up
|
||||
= render partial: "shopping_shared/order_cycles"
|
||||
|
||||
- if no_open_order_cycles?
|
||||
= render partial: "shop/messages/closed_shop"
|
||||
- else
|
||||
= render partial: "shop/messages/select_oc"
|
||||
%div{"ng-controller" => "ProductsCtrl"}
|
||||
- if no_open_order_cycles?
|
||||
= render partial: "shop/messages/closed_shop"
|
||||
- else
|
||||
= render partial: "shop/messages/select_oc"
|
||||
|
||||
-# Rendering the form, even if there are no open OCs, makes display only shops possible
|
||||
= render partial: "shop/products/form"
|
||||
-# Rendering the form, even if there are no open OCs, makes display only shops possible
|
||||
= render partial: "shop/products/form"
|
||||
|
||||
Reference in New Issue
Block a user