Sha256: 5bc5dfe56920c4a50b6adfa2b0e1c8f87280a27a81271b3dcedc9b0b9ed3cc6d

Contents?: true

Size: 1.47 KB

Versions: 3

Compression:

Stored size: 1.47 KB

Contents

<%
  paginated_products = @searcher.products if params.key?(:keywords)
  paginated_products ||= products
%>
<% if products.empty? %>
  <%= t(:no_products_found) %>
<% elsif params.key?(:keywords) %>
  <h3><%= t(:search_results, :keywords => h(params[:keywords])) %></h3>
<% end %>
 
<% if products.any? %>
<ul class="product-listing">
  <% products.each do |product| %>
    <% if Spree::Config[:show_zero_stock_products] || product.has_stock? %>
      <li id="product_<%= product.id %>">
        <%= hook :products_list_item, {:product => product} do %>
          <%= link_to raw(product.name), product, :class => 'product-name' %>
          <%= hook :products_list_item_image, {:product => product} do %>
          <div class="product-image-wrapper">
              <%= link_to small_image(product), product %>
          </div>
          <% end %>
          <% if defined?(SpreeReviews) %>
            <div align="center" style="height: 15px;"><%= render 'shared/rating', :product => product %></div>
          <% end %>  
          <%= link_to raw("<span class='price selling'>#{product_price(product)}</span>"), product, :class => 'info' %>
        <% end %>
      </li>
    <% end %>
  <% end %>
</ul>
<% end %>
 
<% if paginated_products.respond_to?(:total_pages)
      params.delete(:search)
      params.delete(:taxon)
%>
  <%= will_paginate(paginated_products,
                    :previous_label => "&#171; #{t('previous')}",
                    :next_label => "#{t('next')} &#187;") %>
<% end %>
 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
synergy_default_theme-1.0.2 app/views/shared/_products.html.erb
synergy_default_theme-1.0.1 app/views/shared/_products.html.erb
synergy_default_theme-1.0.0 app/views/shared/_products.html.erb