mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Hide distributors from product details page
This commit is contained in:
@@ -5,24 +5,25 @@
|
|||||||
- if @product.supplier
|
- if @product.supplier
|
||||||
%tr.odd
|
%tr.odd
|
||||||
%td= link_to @product.supplier.name, [main_app, @product.supplier]
|
%td= link_to @product.supplier.name, [main_app, @product.supplier]
|
||||||
%br/
|
- if false
|
||||||
%h6.product-section-title DISTRIBUTORS
|
%br/
|
||||||
%table#product-source.table-display{:width => "100%"}
|
%h6.product-section-title DISTRIBUTORS
|
||||||
%tbody
|
%table#product-source.table-display{:width => "100%"}
|
||||||
- order = current_order(false)
|
%tbody
|
||||||
- validator = DistributionChangeValidator.new(order)
|
- order = current_order(false)
|
||||||
- Enterprise.distributing_product(@product).each do |distributor|
|
- validator = DistributionChangeValidator.new(order)
|
||||||
- if !order.nil? && distributor == order.distributor
|
- Enterprise.distributing_product(@product).each do |distributor|
|
||||||
%tr.odd
|
- if !order.nil? && distributor == order.distributor
|
||||||
%td
|
%tr.odd
|
||||||
%b= link_to(distributor.name, [main_app, distributor])
|
%td
|
||||||
%td
|
%b= link_to(distributor.name, [main_app, distributor])
|
||||||
%b Current
|
%td
|
||||||
- elsif order.nil? || validator.can_change_to_distributor?(distributor)
|
%b Current
|
||||||
%tr.even
|
- elsif order.nil? || validator.can_change_to_distributor?(distributor)
|
||||||
%td= link_to distributor.name, [main_app, distributor]
|
%tr.even
|
||||||
%td Available
|
%td= link_to distributor.name, [main_app, distributor]
|
||||||
- else
|
%td Available
|
||||||
%tr.even
|
- else
|
||||||
%td= link_to distributor.name, [main_app, distributor]
|
%tr.even
|
||||||
%td
|
%td= link_to distributor.name, [main_app, distributor]
|
||||||
|
%td
|
||||||
|
|||||||
Reference in New Issue
Block a user