mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
12 lines
426 B
Ruby
12 lines
426 B
Ruby
module TempLandingPageHelper
|
|
def temp_landing_page_distributor_link_class(distributor)
|
|
cart = current_order(true)
|
|
@active_distributors ||= Enterprise.distributors_with_active_order_cycles
|
|
|
|
klass = "shop-distributor"
|
|
klass += " empties-cart" unless cart.line_items.empty? || cart.distributor == distributor
|
|
klass += @active_distributors.include?(distributor) ? ' active' : ' inactive'
|
|
klass
|
|
end
|
|
end
|