Sha256: b210cae34e25f26903ad7a9272b30903d8d30daecf2bc6d3cb242353d130e934

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

<% @taxons = @taxon && @taxon.parent ? @taxon.parent.children : Spree::Taxon.roots %>

<%= form_tag spree.products_path, method: :get do %>
  <% cache [I18n.locale, :taxons_for_search_select, @taxons] do %>
    <%= select_tag :taxon,
          options_for_select([[t('spree.all_departments'), '']] +
                                @taxons.map {|t| [t.name, t.id]},
                                @taxon ? @taxon.id : params[:taxon]), 'aria-label' => 'Taxon' %>
  <% end %>
  <%= search_field_tag :keywords, params[:keywords], placeholder: t('spree.search') %>
  <%= submit_tag t('spree.search'), name: nil %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_starter_frontend-0.1.0 app/views/spree/components/search/_form.html.erb