Remove taxon icons

These icons are inconsistently used across instances and have already been removed in a few places in the app in the mobile UX redesign.
This commit is contained in:
Matt-Yorkley
2020-07-01 11:22:15 +02:00
parent c1b635903c
commit 26c511d47e
7 changed files with 1 additions and 27 deletions

View File

@@ -1,9 +1,6 @@
Spree::Taxon.class_eval do
has_many :classifications, dependent: :destroy
attachment_definitions[:icon][:path] = 'public/images/spree/taxons/:id/:style/:basename.:extension'
attachment_definitions[:icon][:url] = '/images/spree/taxons/:id/:style/:basename.:extension'
# Indicate which filters should be used for this taxon
def applicable_filters
fs = []

View File

@@ -1,11 +0,0 @@
class Api::TaxonImageSerializer < ActiveModel::Serializer
attributes :id, :alt, :small_url, :large_url
def small_url
object.attachment.url(:small, false)
end
def large_url
object.attachment.url(:large, false)
end
end

View File

@@ -2,9 +2,5 @@ class Api::TaxonSerializer < ActiveModel::Serializer
cached
delegate :cache_key, to: :object
attributes :id, :name, :permalink, :icon, :pretty_name, :position, :parent_id, :taxonomy_id
def icon
object.icon(:original)
end
attributes :id, :name, :permalink, :pretty_name, :position, :parent_id, :taxonomy_id
end

View File

@@ -22,7 +22,6 @@
%p.trans-sentence
%div
%span.fat-taxons{"ng-repeat" => "taxon in producer.supplied_taxons"}
%render-svg{path: "{{taxon.icon}}"}
%span{"ng-bind" => "::taxon.name"}
%div
%span.fat-properties{"ng-repeat" => "property in producer.supplied_properties"}

View File

@@ -18,4 +18,3 @@
%span{"ng-bind" => "::enterprise.name"}
.small-2.medium-2.large-1.columns.text-center
.taxon-flag
%render-svg{path: "{{::product.primary_taxon.icon}}"}

View File

@@ -10,7 +10,6 @@
.trans-sentence
%div
%span.fat-taxons{"ng-repeat" => "taxon in hub.taxons"}
%render-svg{path: "{{taxon.icon}}"}
%span{"ng-bind" => "::taxon.name"}
%div
%span.fat-properties{"ng-repeat" => "property in hub.distributed_properties"}

View File

@@ -12,11 +12,6 @@
%br/
= @taxon.permalink.split("/")[0...-1].join("/") + "/"
= text_field_tag :permalink_part, @permalink_part
= f.field_container :icon do
= f.label :icon, t(:icon)
%br/
= f.file_field :icon
%img{src: @taxon.icon(:original)}
= f.field_container :meta_title do
= f.label :meta_title, t(:meta_title)
%br/