Sha256: 44a0b1e459b0fb66dd0a274bb9d1477c277babad6ec963b0e1aef6cf86916418

Contents?: true

Size: 1.22 KB

Versions: 22

Compression:

Stored size: 1.22 KB

Contents

<% filters = @taxon ? @taxon.applicable_filters : [Spree::ProductFilters.all_taxons] %>
<% unless filters.empty? %>
  <%= form_tag '', :method => :get, :id => 'sidebar_products_search' do %>
    <% params[:search] ||= {} %>
    <%= 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][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 t(:search), :name => nil %>
  <% end %>
<% end %>

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
spree_core-1.3.5 app/views/spree/shared/_filters.html.erb
spree_core-1.3.4 app/views/spree/shared/_filters.html.erb
spree_core-1.3.3 app/views/spree/shared/_filters.html.erb
spree_core-1.2.5 app/views/spree/shared/_filters.html.erb
spree_core-1.1.6 app/views/spree/shared/_filters.html.erb
spree_core-1.1.5 app/views/spree/shared/_filters.html.erb
spree_core-1.2.4 app/views/spree/shared/_filters.html.erb
spree_core-1.3.2 app/views/spree/shared/_filters.html.erb
spree_core-1.2.3 app/views/spree/shared/_filters.html.erb
spree_core-1.3.1 app/views/spree/shared/_filters.html.erb
spree_core-1.3.0 app/views/spree/shared/_filters.html.erb
spree_core-1.3.0.rc2 app/views/spree/shared/_filters.html.erb
dup_spree_core-1.3.0.rc1 app/views/spree/shared/_filters.html.erb
spree_core-1.3.0.rc1 app/views/spree/shared/_filters.html.erb
spree_core-1.2.2 app/views/spree/shared/_filters.html.erb
spree_core-1.1.4 app/views/spree/shared/_filters.html.erb
spree_core-1.2.0 app/views/spree/shared/_filters.html.erb
spree_core-1.2.0.rc2 app/views/spree/shared/_filters.html.erb
spree_core-1.2.0.rc1 app/views/spree/shared/_filters.html.erb
spree_core-1.1.3 app/views/spree/shared/_filters.html.erb