mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Only inject taxons and properties AMS data in pages where it's actually needed
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
- content_for :injection_data do
|
||||
- cache(*CacheService::FragmentCaching.ams_shop(@enterprise)) do
|
||||
= inject_enterprise_shopfront(@enterprise)
|
||||
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
|
||||
= inject_taxons
|
||||
- cache(*CacheService::FragmentCaching.ams_all_properties) do
|
||||
= inject_properties
|
||||
|
||||
%shop.darkswarm
|
||||
- if @shopfront_layout == 'embedded'
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
= inject_available_countries
|
||||
= inject_group_enterprises
|
||||
= inject_open_street_map_config
|
||||
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
|
||||
= inject_taxons
|
||||
- cache(*CacheService::FragmentCaching.ams_all_properties) do
|
||||
= inject_properties
|
||||
|
||||
#group-page.row.pad-top.footer-pad{"ng-controller" => "GroupPageCtrl"}
|
||||
.small-12.columns.pad-top
|
||||
|
||||
@@ -54,10 +54,6 @@
|
||||
= inject_current_hub
|
||||
= inject_current_user
|
||||
= inject_rails_flash
|
||||
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
|
||||
= inject_taxons
|
||||
- cache(*CacheService::FragmentCaching.ams_all_properties) do
|
||||
= inject_properties
|
||||
= inject_current_order
|
||||
= inject_currency_config
|
||||
= yield :injection_data
|
||||
|
||||
@@ -5,5 +5,9 @@
|
||||
= inject_available_countries
|
||||
= inject_enterprise_shopfront_list
|
||||
= inject_open_street_map_config
|
||||
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
|
||||
= inject_taxons
|
||||
- cache(*CacheService::FragmentCaching.ams_all_properties) do
|
||||
= inject_properties
|
||||
|
||||
= render partial: "shared/map"
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
- content_for :injection_data do
|
||||
- cache @enterprises do
|
||||
= inject_enterprises(@enterprises)
|
||||
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
|
||||
= inject_taxons
|
||||
- cache(*CacheService::FragmentCaching.ams_all_properties) do
|
||||
= inject_properties
|
||||
|
||||
.producers{"ng-controller" => "EnterprisesCtrl", "ng-cloak" => true}
|
||||
.row
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
- content_for :injection_data do
|
||||
- cache(*CacheService::FragmentCaching.ams_shops) do
|
||||
= inject_enterprises(@enterprises)
|
||||
- cache(*CacheService::FragmentCaching.ams_all_taxons) do
|
||||
= inject_taxons
|
||||
- cache(*CacheService::FragmentCaching.ams_all_properties) do
|
||||
= inject_properties
|
||||
|
||||
#panes
|
||||
#shops.pane
|
||||
|
||||
Reference in New Issue
Block a user