Show "Back To Store" button when no shop has been selected yet

This commit is contained in:
Maikel Linke
2020-03-11 15:59:07 +11:00
parent 1db8283e98
commit 6b8b3be524

View File

@@ -1,12 +1,12 @@
.row
.columns.small-12.medium-3
- if current_order.andand.distributor == @order.distributor
- if current_order.line_items.present?
- if current_order.nil? || current_order.distributor.nil? || current_order.distributor == @order.distributor
- if current_order&.line_items.present?
= link_to main_app.cart_path, :class => "button expand" do
%i.ofn-i_008-caret-left
= t(:order_back_to_cart)
- else
= link_to current_shop_products_path, :class => "button expand" do
= link_to "#{main_app.enterprise_shop_path(@order.distributor)}#/shop", class: "button expand" do
%i.ofn-i_008-caret-left
= t(:order_back_to_store)
- else