<% extra_content = @plugins.dispatch(:asset_product_extras, product).collect { |content| instance_eval(&content) } %> <% extra_properties = @plugins.dispatch(:asset_product_properties, product)%>
  • <%= render :partial => 'search/image', :object => product %> <% if product.available %> <% if product.price && product.price > 0 %> <% has_discount = product.discount && product.discount > 0 %> <% if product.price %> <%=_("from") if has_discount %><%= price_span(product.price, :class => "search-product-price " + (has_discount ? 'with-discount' : '')) %> <% if has_discount %> <%=_("by")%><%= price_span(product.price_with_discount, :class => "search-product-price") %> <% end %> <% if product.unit %>  <%= _('/') %> <%= product.unit.name %> <% end %> <% end %>
    <% if p = product.percentage_from_solidarity_economy %>
    <%= p[1] %>
    <% end %> <% if product.price_described? %> <% title = (product.inputs.relevant_to_price + product.price_details).map{ |i| '
    ' + '
    ' + i.name + '
    ' + price_span(i.price, :class => 'search-product-input-price') + '
    ' }.join('') %> <%= link_to_function _("Open Price"), '', :title => title, :class => "search-product-price-details" %> <% end %>
    <% end %> <% else %> <%= _('Not available') %>
    <% end %>
    <%= link_to_product product, :class => 'search-result-title' %>
    <%= _('Supplier') %> <%= link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>
    <% if product.description %> <% desc_stripped = strip_tags(product.description) %> <%= _('Description') %> <%= excerpt(desc_stripped, desc_stripped.first(3), 300) %> <% end %>
    <% if product.enterprise.region %> <%= _('City') %>
    <%= city_with_state(product.enterprise.region) %> <% end %>
    <% if product.product_qualifiers.count > 0 %> <%= _('Qualifiers') %> <% product.product_qualifiers.each do |pq| %> <% if pq.qualifier %> <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %> <% end %> <% if pq.certifier %>  <%= _('cert. ') + pq.certifier.name + _(";") %> <% end %> <% end %> <% end %>
    <%= extra_content.join('\n') %> <% extra_properties.each do |property| %>
    <%= property[:name] + ': ' + instance_eval(&property[:content]) %>
    <% end %>