From 784df982d6be0032af424dcb478451cc88f31f8d Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 28 Mar 2014 15:45:12 +1100 Subject: [PATCH] Disabling the link when the previous distributor is the old distributor --- app/views/shared/_sidebar.html.haml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_sidebar.html.haml b/app/views/shared/_sidebar.html.haml index c77805cae6..55be6eed0f 100644 --- a/app/views/shared/_sidebar.html.haml +++ b/app/views/shared/_sidebar.html.haml @@ -16,8 +16,11 @@ %dl %dt Last hub: %dd - = link_to "#{order.distributor.name}".html_safe, "", - {class: distributor_link_class(order.distributor), - "ng-click" => "emptyCart('#{main_app.shop_enterprise_path(order.distributor)}', $event)"} + - if order.distributor != current_distributor + = link_to "#{order.distributor.name}".html_safe, "", + {class: distributor_link_class(order.distributor), + "ng-click" => "emptyCart('#{main_app.shop_enterprise_path(order.distributor)}', $event)"} + - else + = order.distributor.name = yield :sidebar