mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Added 'meta_keywords' to search of products in shop page. Changed labels
on SEO tab and SEO form (edit product Screen) and added in en.yml file.
This commit is contained in:
@@ -4,5 +4,5 @@ Darkswarm.filter 'products', (Matcher) ->
|
||||
text ?= ""
|
||||
return products if text == ""
|
||||
products.filter (product) =>
|
||||
propertiesToMatch = [product.name, product.variant_names, product.supplier.name, product.primary_taxon.name]
|
||||
propertiesToMatch = [product.name, product.variant_names, product.supplier.name, product.primary_taxon.name, product.meta_keywords]
|
||||
Matcher.matchBeginning propertiesToMatch, text
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/ insert_bottom "[data-hook='admin_product_tabs']"
|
||||
|
||||
- klass = current == 'SEO' ? 'active' : ''
|
||||
- klass = current == 'Search' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t('admin.products.seo'), seo_admin_product_url(@product)
|
||||
= link_to_with_icon 'icon-tasks', 'Search', seo_admin_product_url(@product)
|
||||
|
||||
@@ -36,7 +36,7 @@ class Api::CachedProductSerializer < ActiveModel::Serializer
|
||||
#delegate :cache_key, to: :object
|
||||
include ActionView::Helpers::SanitizeHelper
|
||||
|
||||
attributes :id, :name, :permalink
|
||||
attributes :id, :name, :permalink, :meta_keywords
|
||||
attributes :on_demand, :group_buy, :notes, :description, :description_html
|
||||
attributes :properties_with_values
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
.row{"data-hook" => "admin_product_meta_form"}
|
||||
.alpha.eleven.columns
|
||||
= f.field_container :meta_description do
|
||||
= f.label :meta_keywords, t(:meta_keywords)
|
||||
= f.label :meta_keywords, t(:product_search_keywords)
|
||||
%br/
|
||||
= f.text_field :meta_keywords, :class => 'fullwidth', :rows => 6
|
||||
= f.field_container :meta_description do
|
||||
= f.label :meta_description, t(:meta_description)
|
||||
= f.label :meta_description, t(:SEO_keywords)
|
||||
%br/
|
||||
= f.text_field :meta_description, :class => 'fullwidth', :rows => 6
|
||||
.alpha.eleven.columns
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
= render :partial => 'spree/admin/shared/product_sub_menu'
|
||||
= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'SEO' }
|
||||
= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'Search' }
|
||||
= render :partial => 'spree/shared/error_messages', :locals => { :target => @product }
|
||||
|
||||
= form_for [:admin, @product], :method => :put, :html => { :multipart => true } do |f|
|
||||
|
||||
Reference in New Issue
Block a user