Sha256: a2e06588162f6f6bb078ab40248351c90c99e2213c738a4c5e00a045967295ae

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

<%= form_tag '', :method => :get, :id => 'sidebar_products_search' do  %>
  <% params[:search] ||= {} %>
  <input type="hidden" name="per_page" value="<%= params[:per_page] %>"/>

  <% filters = @taxon ? @taxon.applicable_filters : [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 style="list-style-type:none; padding-left: 0px;" 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

2 entries across 2 versions & 1 rubygems

Version Path
spree_core-0.70.0.rc2 app/views/shared/_filters.html.erb
spree_core-0.70.RC1 app/views/shared/_filters.html.erb