Sha256: a692cb3b0ffd1bf3557e71bcc51146e1388b9bf51eb6b0b4b72050df9502051c

Contents?: true

Size: 1.21 KB

Versions: 16

Compression:

Stored size: 1.21 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">
        <h6 class="filter-title"> <%= filter[:name] %> </h6>
        <ul class="filter_choices">
          <% labels.each do |nm,val| %>
            <% label = "#{filter[:name]}_#{nm}".gsub(/\s+/,'_') %>
            <li class="nowrap">
              <input type="checkbox"
                     id="<%= label %>"
                     name="search[<%= filter[:scope].to_s %>][]"
                     value="<%= val %>"
                     <%= params[:search] && 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 %>
  <% end %>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
solidus_frontend-2.4.2 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.2.2 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.4.1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.3.1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.4.0 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.4.0.rc1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.4.0.beta1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.3.0 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.3.0.rc3 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.3.0.rc2 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.3.0.rc1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.3.0.beta1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.2.1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.2.0 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.2.0.rc1 app/views/spree/shared/_filters.html.erb
solidus_frontend-2.2.0.beta1 app/views/spree/shared/_filters.html.erb