mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Refactor views
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
%tr.even
|
||||
%td= link_to distributor.name, [main_app, distributor]
|
||||
%td Available
|
||||
-#%td= link_to "Change to distributor", select_distributor_order_path(distributor)
|
||||
- else
|
||||
%tr.even
|
||||
%td= link_to distributor.name, [main_app, distributor]
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
- validator = DistributionChangeValidator.new(order)
|
||||
- @distributors.each do |distributor|
|
||||
%li.nowrap
|
||||
- if order.nil? || validator.can_change_to_distributor?(distributor)
|
||||
= link_to distributor.name, [main_app, distributor]
|
||||
- elsif order.distributor == distributor
|
||||
- if order.nil? || order.distributor == distributor || validator.can_change_to_distributor?(distributor)
|
||||
= link_to distributor.name, [main_app, distributor]
|
||||
- else
|
||||
%abbr(title="One or more of the products in your cart is not available from this distributor")= distributor.name
|
||||
|
||||
Reference in New Issue
Block a user