Refactor views

This commit is contained in:
Rohan Mitchell
2013-06-20 15:14:23 +10:00
parent b8d0e3f49a
commit 69019859da
2 changed files with 1 additions and 4 deletions

View File

@@ -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]

View File

@@ -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