Hiding 'Back to Cart' and 'Back to Store' buttons on completed orders when distributor does not match cart

This commit is contained in:
Rob Harrington
2017-05-05 12:05:57 +10:00
parent 5eadb33db9
commit c3eda435eb

View File

@@ -1,13 +1,16 @@
.row
.columns.small-12.medium-3
- if current_order.andand.line_items.present?
= link_to spree.cart_path, :class => "button expand" do
%i.ofn-i_008-caret-left
= t(:order_back_to_cart)
- if current_order.andand.distributor == @order.distributor
- if current_order.line_items.present?
= link_to spree.cart_path, :class => "button expand" do
%i.ofn-i_008-caret-left
= t(:order_back_to_cart)
- else
= link_to main_app.shop_path, :class => "button expand" do
%i.ofn-i_008-caret-left
= t(:order_back_to_store)
- else
= link_to main_app.shop_path, :class => "button expand" do
%i.ofn-i_008-caret-left
= t(:order_back_to_store)
 
- if order.changes_allowed?
.columns.show-for-medium-up.medium-3  
.columns.small-12.medium-3