mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
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:
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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"}
|
||||
|
||||
@@ -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}}"}
|
||||
|
||||
@@ -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"}
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user