Sha256: 379dccfb1710f65fc881fdb9e311d128ffa5ea1d6513b1e2ebbb9db98e520256

Contents?: true

Size: 1.94 KB

Versions: 27

Compression:

Stored size: 1.94 KB

Contents

<% content_for :head do %>
  <% if products.respond_to?(:total_pages) %>
    <%= rel_next_prev_link_tags products %>
  <% end %>
<% end %>

<div data-hook="products_search_results_heading">
  <% if products.empty? %>
    <div data-hook="products_search_results_heading_no_results_found">
      <%= Spree.t(:no_products_found) %>
    </div>
  <% elsif params.key?(:keywords) %>
    <div data-hook="products_search_results_heading_results_found">
      <h6 class="search-results-title"><%= Spree.t(:search_results, keywords: h(params[:keywords])) %></h6>
    </div>
  <% end %>
</div>

<% if products.any? %>
  <div id="products" class="row" data-hook>
    <% products.each do |product| %>
      <% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
      <div id="product_<%= product.id %>" class="col-md-3 col-sm-6 col-xs-6 product-list-item" data-hook="products_list_item" itemscope itemtype="https://schema.org/Product">
        <div class="panel panel-default">
          <% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : cache_key_for_product(product)) do %>
            <div class="panel-body text-center product-body">
              <%= link_to url, itemprop: "url" do %>
                <%= small_image(product, itemprop: "image") %><br/>
                <%= content_tag(:span, truncate(product.name, length: 50), class: 'info', itemprop: "name", title: product.name) %>
              <% end %>
              <br/>
            </div>
            <div class="panel-footer text-center">
              <span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
                <span class="price selling lead" itemprop="price"><%= display_price(product) %></span>
              </span>
            </div>
          <% end %>
        </div>
      </div>
    <% end %>
    <% reset_cycle("classes") %>
  </div>
<% end %>

<% if products.respond_to?(:total_pages) %>
  <%= paginate products, theme: 'twitter-bootstrap-3' %>
<% end %>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
spree_frontend-3.2.9 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.14 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.8 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.13 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.7 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.12 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.6 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.11 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.10 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.5 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.9 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.4 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.8 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.7 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.3 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.2 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.6 app/views/spree/shared/_products.html.erb
spree_frontend-3.1.5 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.1 app/views/spree/shared/_products.html.erb
spree_frontend-3.2.0 app/views/spree/shared/_products.html.erb