mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Delete dead code, this is old spree logic
This commit is contained in:
@@ -289,12 +289,6 @@ module Spree
|
||||
}.inject(:or)
|
||||
end
|
||||
|
||||
def empty_option_values?
|
||||
options.empty? || options.any? do |opt|
|
||||
opt.option_type.option_values.empty?
|
||||
end
|
||||
end
|
||||
|
||||
def property(property_name)
|
||||
return nil unless prop = properties.find_by(name: property_name)
|
||||
|
||||
|
||||
@@ -30,17 +30,9 @@
|
||||
= link_to_with_icon('icon-edit', Spree.t(:edit), edit_object_url(variant, @url_filters), no_text: true) unless variant.deleted?
|
||||
= link_to_delete(variant, { url: object_url(variant, @url_filters), no_text: true }) unless variant.deleted?
|
||||
|
||||
- if @product.empty_option_values?
|
||||
%p.first_add_option_types.no-objects-found
|
||||
= t('.to_add_variants_you_must_first_define')
|
||||
= link_to t('.option_types'), admin_product_url(@product)
|
||||
= t('.and')
|
||||
= link_to t('.option_values'), admin_option_types_url
|
||||
- content_for :page_actions do
|
||||
%ul.inline-menu
|
||||
%li#new_var_link
|
||||
= link_to_with_icon('icon-plus', t('.new_variant'), new_admin_product_variant_url(@product, @url_filters), class: 'button')
|
||||
|
||||
- else
|
||||
- content_for :page_actions do
|
||||
%ul.inline-menu
|
||||
%li#new_var_link
|
||||
= link_to_with_icon('icon-plus', t('.new_variant'), new_admin_product_variant_url(@product, @url_filters), class: 'button')
|
||||
|
||||
%li= link_to_with_icon('icon-filter', @deleted.blank? ? t('.show_deleted') : t('.show_active'), admin_product_variants_url(@product, @url_filters.merge(deleted: @deleted.blank? ? "on" : "off")), class: 'button')
|
||||
%li= link_to_with_icon('icon-filter', @deleted.blank? ? t('.show_deleted') : t('.show_active'), admin_product_variants_url(@product, @url_filters.merge(deleted: @deleted.blank? ? "on" : "off")), class: 'button')
|
||||
|
||||
@@ -3679,7 +3679,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
price: "Price"
|
||||
options: "Options"
|
||||
no_results: "No results"
|
||||
to_add_variants_you_must_first_define: "To add variants, you must first define"
|
||||
option_types: "Option Types"
|
||||
option_values: "Option Values"
|
||||
and: "and"
|
||||
|
||||
Reference in New Issue
Block a user