Sha256: 0376341b1275aae4f09755030c112ebecd3cf76ec14a828ed663309246d79baf

Contents?: true

Size: 1.14 KB

Versions: 10

Compression:

Stored size: 1.14 KB

Contents

<%= form_tag '', :method => :get, :id => 'sidebar_products_search' do %>
  <% params[:search] ||= {} %>
  <%= hidden_field_tag 'per_page', params[:per_page] %>
  <% filters = @taxon ? @taxon.applicable_filters : [Spree::ProductFilters.all_taxons] %>
  <% filters.each do |filter| %>
    <% labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} %>
    <% next if labels.empty? %>
    <div class="navigation" data-hook="navigation">
      <span class="category"> <%= filter[:name] %> </span>
      <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 %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_core-1.0.7 app/views/spree/shared/_filters.html.erb
spree_core-1.0.6 app/views/spree/shared/_filters.html.erb
spree_core-1.0.4 app/views/spree/shared/_filters.html.erb
spree_core-1.0.3 app/views/spree/shared/_filters.html.erb
spree_core-1.0.2 app/views/spree/shared/_filters.html.erb
spree_core-1.0.1 app/views/spree/shared/_filters.html.erb
spree_core-1.0.0 app/views/spree/shared/_filters.html.erb
spree_core-1.0.0.rc4 app/views/spree/shared/_filters.html.erb
spree_core-1.0.0.rc3 app/views/spree/shared/_filters.html.erb
spree_core-1.0.0.rc2 app/views/spree/shared/_filters.html.erb