Sha256: c6544eafec90cc1697c9e76143ce385b4acdafe9cd2806c30b750e8148beeae6

Contents?: true

Size: 1.15 KB

Versions: 5

Compression:

Stored size: 1.15 KB

Contents

<%= form_tag '', :method => :get 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">
      <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

5 entries across 5 versions & 1 rubygems

Version Path
spree_core-0.40.4 app/views/shared/_filters.html.erb
spree_core-0.40.3 app/views/shared/_filters.html.erb
spree_core-0.40.2 app/views/shared/_filters.html.erb
spree_core-0.40.1 app/views/shared/_filters.html.erb
spree_core-0.40.0 app/views/shared/_filters.html.erb