Sha256: eab855c695d25622f79e757febf590be6b3d7126f83536ef1b3dd896f4b6ab96

Contents?: true

Size: 1.25 KB

Versions: 63

Compression:

Stored size: 1.25 KB

Contents

<% filters = @taxon ? @taxon.applicable_filters : [Spree::Core::ProductFilters.all_taxons] %>

<% unless filters.empty? %>
  <%= form_tag '', method: :get, id: 'sidebar_products_search' do %>
    <%= hidden_field_tag 'per_page', params[:per_page] %>
    <% filters.each do |filter| %>
      <% labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} %>
      <% next if labels.empty? %>
      <div class="navigation" data-hook="navigation">
        <h4 class="filter-title"> <%= filter[:name] %> </h4>
        <ul class="list-group">
          <% labels.each do |nm,val| %>
            <% label = "#{filter[:name]}_#{nm}".gsub(/\s+/,'_') %>
            <li class="list-group-item">
              <input type="checkbox"
                     id="<%= label %>"
                     name="search[<%= filter[:scope].to_s %>][]"
                     value="<%= val %>"
                     <%= params[:search].present? && params[:search][filter[:scope]] && params[:search][filter[:scope]].include?(val.to_s) ? "checked" : "" %> />
              <label class="nowrap" for="<%= label %>"> <%= nm %> </label>
            </li>
          <% end %>
        </ul>
      </div>
    <% end %>
    <%= submit_tag Spree.t(:search), name: nil, class: 'btn btn-primary' %>
  <% end %>
<% end %>

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
spree_frontend-3.7.0.rc1 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.6 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.5 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.4 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.3 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.2 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.1 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.0 app/views/spree/shared/_filters.html.erb
spree_frontend-3.5.0 app/views/spree/shared/_filters.html.erb
spree_frontend-3.3.6 app/views/spree/shared/_filters.html.erb
spree_frontend-3.2.8 app/views/spree/shared/_filters.html.erb
spree_frontend-3.6.0.rc1 app/views/spree/shared/_filters.html.erb
spree_frontend-3.5.0.rc2 app/views/spree/shared/_filters.html.erb
spree_frontend-3.5.0.rc1 app/views/spree/shared/_filters.html.erb
spree_frontend-3.4.5 app/views/spree/shared/_filters.html.erb
spree_frontend-3.3.5 app/views/spree/shared/_filters.html.erb
spree_frontend-3.4.4 app/views/spree/shared/_filters.html.erb
spree_frontend-3.4.3 app/views/spree/shared/_filters.html.erb
spree_frontend-3.3.4 app/views/spree/shared/_filters.html.erb
spree_frontend-3.2.7 app/views/spree/shared/_filters.html.erb