diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a856678c9a..0af8b68e13 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1872,7 +1872,6 @@ Style/HashSyntax: - 'app/overrides/remove_search_bar.rb' - 'app/overrides/remove_side_bar.rb' - 'app/overrides/replace_checkout_payment_button.rb' - - 'app/overrides/replace_order_details_steps_data.rb' - 'app/overrides/replace_payment_name_with_description.rb' - 'app/overrides/replace_shipping_address_form_with_distributor_details.rb' - 'app/overrides/set_auth_token_in_backend.rb' diff --git a/app/overrides/replace_order_details_steps_data.rb b/app/overrides/replace_order_details_steps_data.rb deleted file mode 100644 index 15e6f20075..0000000000 --- a/app/overrides/replace_order_details_steps_data.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/shared/_order_details", - :replace => "div.row.steps-data", - :partial => "spree/shared/order_details_steps_data", - :name => "replace_order_details_steps_data", - :original => '1a68aa5db3fee7f7bbb2b6b826749aeb69168cee') diff --git a/app/overrides/replace_payment_name_with_description.rb b/app/overrides/replace_payment_name_with_description.rb deleted file mode 100644 index b808d20e38..0000000000 --- a/app/overrides/replace_payment_name_with_description.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/payments/_payment", - :replace => "code[erb-loud]:contains('content_tag(:span, payment.payment_method.name)')", - :text => "<%= content_tag( :span, ( payment.payment_method.description || payment.payment_method.name ).html_safe ) %>", - :name => "replace_payment_name_with_description", - :original => 'dff62efcadc0f9e6513b0f81a51ebbda035f78f6') diff --git a/app/views/spree/products/_add_to_cart.html.haml b/app/views/spree/products/_add_to_cart.html.haml deleted file mode 100644 index dd406ff50b..0000000000 --- a/app/views/spree/products/_add_to_cart.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -.add-to-cart - - order = current_order(false) - - - if product_out_of_stock - = content_tag('strong', t(:out_of_stock)) - - - elsif !distributor_available_for?(order, @product) - = render 'add_to_cart_distributor_unavailable' - - - elsif !order_cycle_available_for?(order, @product) - = render 'add_to_cart_order_cycle_unavailable' - - - else - = render 'add_to_cart_quantity_fields', product: @product - - %br - = button_tag :class => 'large primary', :id => 'add-to-cart-button', :type => :submit do - = t(:add_to_cart) diff --git a/app/views/spree/products/_add_to_cart_distributor_choice.html.haml b/app/views/spree/products/_add_to_cart_distributor_choice.html.haml deleted file mode 100644 index 6348760786..0000000000 --- a/app/views/spree/products/_add_to_cart_distributor_choice.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -.distributor - = t :products_cart_distributor_choice -= select_tag "distributor_id", options_from_collection_for_select([Enterprise.new]+distributor_collection, "id", "name", current_distributor.andand.id) diff --git a/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml b/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml deleted file mode 100644 index 1c82199c89..0000000000 --- a/app/views/spree/products/_add_to_cart_distributor_fixed.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -= hidden_field_tag "distributor_id", distributor.id - -.distributor-fixed - - if changing_distributor - = t :products_cart_distributor_change, name: distributor.name - - else - = t :products_cart_distributor_is, name: distributor.name diff --git a/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml b/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml deleted file mode 100644 index 283c628c72..0000000000 --- a/app/views/spree/products/_add_to_cart_distributor_unavailable.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -.error-distributor - = t :products_distributor_error, link: link_to(current_distributor.name, root_path) diff --git a/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml b/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml deleted file mode 100644 index 18091d2dfe..0000000000 --- a/app/views/spree/products/_add_to_cart_order_cycle_choice.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%div - = t :products_oc -= select_tag "order_cycle_id", options_from_collection_for_select([OrderCycle.new(name: t(:none))]+order_cycle_collection, "id", "name", current_order_cycle.andand.id) diff --git a/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml b/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml deleted file mode 100644 index 492ee0d156..0000000000 --- a/app/views/spree/products/_add_to_cart_order_cycle_fixed.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -= hidden_field_tag "order_cycle_id", order_cycle.id - -.order-cycle-fixed - - if changing_order_cycle - = t :products_oc_change, name: order_cycle.name - - else - = t :products_oc_is, name: order_cycle.name diff --git a/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml b/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml deleted file mode 100644 index a123da18fe..0000000000 --- a/app/views/spree/products/_add_to_cart_order_cycle_unavailable.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -.error-distributor - = t :products_oc_error, link: = link_to((current_order_cycle.andand.name || t(:products_oc_current)), root_path) diff --git a/app/views/spree/products/_add_to_cart_quantity_fields.html.haml b/app/views/spree/products/_add_to_cart_quantity_fields.html.haml deleted file mode 100644 index 7235690c52..0000000000 --- a/app/views/spree/products/_add_to_cart_quantity_fields.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -%div(class = "columns alpha two") - %div - = t :products_quantity - = number_field_tag (product.has_variants? ? :quantity : "variants[#{product.master.id}]"), 1, :class => 'title', :in => 1..product.on_hand -- if product.group_buy - %div(class = "columns alpha three") - %div - = t :products_max_quantity - = number_field_tag (product.has_variants? ? :max_quantity : "variant_attributes[#{product.master.id}][max_quantity]"), 1, :class => 'title max_quantity', :in => 1..product.on_hand diff --git a/app/views/spree/products/_distributor_details.html.haml b/app/views/spree/products/_distributor_details.html.haml deleted file mode 100644 index e91c0ea6e5..0000000000 --- a/app/views/spree/products/_distributor_details.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -%fieldset#product-distributor-details.columns.five.omega - %legend - = t :products_distributor - .distributor-details - - order = current_order(false) - - if order.andand.distributor.present? - = render 'enterprises/distributor_details', :distributor => order.distributor - - else - = t :products_distributor_info diff --git a/app/views/spree/products/_source.html.haml b/app/views/spree/products/_source.html.haml deleted file mode 100644 index 7751ba36ef..0000000000 --- a/app/views/spree/products/_source.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -%div{:data-hook => "product_source"} - %h6.product-section-title= t(:supplier) - %table#product-source.table-display{:width => "100%"} - %tbody - - if @product.supplier - %tr.odd - %td= link_to @product.supplier.name, [main_app, @product.supplier] - - if false - %br/ - %h6.product-section-title= t(:distributors) - %table#product-source.table-display{:width => "100%"} - %tbody - - order = current_order(false) - - validator = DistributionChangeValidator.new(order) - - Enterprise.distributing_products(@product).each do |distributor| - - if !order.nil? && distributor == order.distributor - %tr.odd - %td - %b= link_to(distributor.name, [main_app, distributor]) - %td - %b= t(:current) - - elsif order.nil? || validator.can_change_to_distributor?(distributor) - %tr.even - %td= link_to distributor.name, [main_app, distributor] - %td= t(:available) - - else - %tr.even - %td= link_to distributor.name, [main_app, distributor] - %td diff --git a/app/views/spree/shared/_order_details_steps_data.html.erb b/app/views/spree/shared/_order_details_steps_data.html.erb deleted file mode 100644 index eabe239c78..0000000000 --- a/app/views/spree/shared/_order_details_steps_data.html.erb +++ /dev/null @@ -1,48 +0,0 @@ -
- - <% if order.has_step?("address") %> -
-
<%= "Customer Details" %> <%= link_to "(#{t(:edit)})", checkout_state_path(:address) unless @order.completed? %>
-
- <%= "#{t(:name)}: #{order.bill_address.full_name}" %>
- <%= "#{t(:address)}: #{order.bill_address.address1}, #{order.bill_address.city}" %> -
-
-
- <% order.payments.each do |payment| %> -
id="eft-payment-alert"<% end %>> -
<%= t(:payment_information) %> <%= link_to "(#{t(:edit)})", checkout_state_path(:payment) unless @order.completed? %>
-
- <% if payment.payment_method.name.include? "PayPal" %> -
<% t(:order_payment_paypal_successful) %>
- <% elsif payment.payment_method.name.include? "EFT" %> - <%= payment.payment_method.description.html_safe %> - <% elsif order.credit_cards.empty? == false %> - - <%= image_tag "credit_cards/icons/#{order.credit_cards.first.cc_type}.png" %> - <%= t(:ending_in)%> <%= order.credit_cards.first.last_digits %> - -
- - <%= order.credit_cards.first.first_name %> - <%= order.credit_cards.first.last_name %> - - <% elsif payment.payment_method.type == "Spree::PaymentMethod::Check" %> - <%= payment.payment_method.description %> - <% end %> -
-
- <% end %> -
-
- -
-
<% t(:order_hub_info) %>
-
- <%= render 'enterprises/distributor_details', :distributor => order.distributor %> -
-
- <% end %> - -
-