<commit_before><%
  extra_content = @plugins.dispatch(:catalog_item_extras, product).collect{ |content| instance_exec(&content) }
  extra_content_list = @plugins.dispatch(:catalog_list_item_extras, product).collect { |content| instance_exec(&content) }

  status = []
  status << 'not-available' if !product.available
  status << 'highlighted' if product.highlighted

  rank = @offset + i rescue i
  catalog_params = request.query_parameters.merge rank: rank
%>

<li id="product-<%= product.id %>" class="product <%= status.join ' ' %>"
  data-category-name="<%= product.product_category.name rescue nil %>"
  data-qualifiers-ids="<%= product.qualifiers.map(&:id).join ' ' %>"
  data-term="<%= @query %>" data-order="<%= @order %>" data-rank="<%=rank%>">

  <ul>
    <li class="product-image-link">
      <% if product.highlighted? %>
        <%= link_to image_tag(themed_path('/images/star.png'), :class => 'star', :alt => _('Highlighted product')), product_path(product, catalog_params) %>
      <% end %>
      <% if product.image %>
        <div class="zoomable-image">
          <%= link_to_product_from_catalog product, url_options: catalog_params, class: 'product-big', style: "background-image: url(#{product.default_image(:big)})" %>
          <%= link_to content_tag(:span, _('Zoom in')), product.default_image(:big).gsub('_big',''), :class => 'zoomify-image' %>
        </div>
      <% else %>
        <div class="no-image"><%= _('No image') %></div>
      <% end %>
      <div class="catalog-item-extras"><%= extra_content.join("\n") %></div>
    </li>

    <li class="product-link"><%= link_to_product_from_catalog product, url_options: catalog_params %></li>

    <% if show_supplier %>
      <li class="product-supplier">
        <span><%= _('Offered by') %>:</span> <%= link_to product.profile.short_name, product.profile.url %>
      </li>
    <% end %>

    <li class="product-price-line">
      <% unless product.discount.blank? or product.discount == 0 %>
        <span class="product-discount">
          <span><%= _('from ') + price_span(product.price) %></span>
          <span class="product-discount-by"><%= _('by ') %></span>
        </span>
      <% end %>
      <% unless product.price.blank? or product.price == 0 %>
        <span class="product-price">
          <%= price_span product.price_with_discount, :class => "product-price #{'with-discount' unless product.discount}" %>
          <span class="product-unit"><%= _(' / ') + (product.unit ? product.unit.singular : _('unit')) %></span>
        </span>
      <% end %>
      <div style="clear: both"></div>
    </li>

    <% if product.description %>
      <li class="product-description expand-box">
        <span class="product-description-button"><%= _('description') %></span>
        <div class="float-box">
          <div class="arrow"></div>
          <div class="content"><%= product.description %></div>
        </div>
      </li>
    <% end %>

    <% if product.price_described? %>
      <li class="product-price-composition expand-box">
        <span class="product-price-composition-button"><%= _('price composition') %></span>
        <div class="float-box">
          <div class="arrow"></div>
          <div class="content">
            <% product.inputs.relevant_to_price.each do |i| %>
              <div class="search-product-input-dots-to-price">
                <div class="search-product-input-name"><%= i.product_category.name %></div>
                <%= price_span i.cost, :class => 'search-product-input-price' %>
              </div>
            <% end %>
            <% product.price_details.each do |i| %>
              <div class="search-product-input-dots-to-price">
                <div class="search-product-input-name"><%= i.name %></div>
                <%= price_span i.price, :class => 'search-product-input-price' %>
              </div>
            <% end %>
          </div>
        </div>
      </li>
    <% end %>

    <% if product.inputs.count > 0 %>
      <li class="product-inputs expand-box">
        <span id="inputs-button"><%= _('inputs and raw materials') %></span>
        <div class="float-box">
          <div class="arrow"></div>
          <div class="content">
            <% product.inputs.each do |i| %>
              <div>
                <%= _('%{amount_used} %{unit} of') % {:amount_used => i.amount_used, :unit => i.unit.singular} + ' ' if i.has_all_price_details? %>
                <%= i.product_category.name %>
              </div>
            <% end %>
          </div>
        </div>
      </li>
    <% end %>

    <% unless product.qualifiers.blank? %>
      <li class="product-qualifiers">
        <span><%= _('qualifiers') if product.product_qualifiers.count > 0 %></span>
        <div><%= render :partial => 'shared/product/qualifiers', :locals => {:product => product} %></div>
      </li>
    <% end %>

    <% extra_content_list.map do |content| %>
      <li class="catalog-list-item-extras"><%= content %></li>
    <% end %>

    <li class="product-unavailable"><%= _('product unavailable') unless product.available %></li>
  </ul>
</li>
<commit_msg>Update _product.html.erb<commit_after><%
  extra_content = @plugins.dispatch(:catalog_item_extras, product).collect{ |content| instance_exec(&content) }
  extra_content_list = @plugins.dispatch(:catalog_list_item_extras, product).collect { |content| instance_exec(&content) }

  status = []
  status << 'not-available' if !product.available
  status << 'highlighted' if product.highlighted

  rank = @offset + i rescue i
  catalog_params = request.query_parameters.merge rank: rank
%>

<li id="product-<%= product.id %>" class="product <%= status.join ' ' %>"
  data-category-name="<%= product.product_category.name rescue nil %>"
  data-qualifiers-ids="<%= product.qualifiers.map(&:id).join ' ' %>"
  data-term="<%= @query %>" data-order="<%= @order %>" data-rank="<%=rank%>">

  <ul>
    <li class="product-image-link">
      <% if product.highlighted? %>
        <%= link_to image_tag(themed_path('/images/star.png'), :class => 'star', :alt => _('Highlighted product')), product_path(product, catalog_params) %>
      <% end %>
      <% if product.image %>
        <div class="zoomable-image">
          <%= link_to_product_from_catalog product, url_options: catalog_params, class: 'product-big', style: "background-image: url(#{product.default_image(:big)})" %>
          <%= link_to content_tag(:span, _('Zoom in')), product.default_image(:big).gsub('_big',''), :class => 'zoomify-image' %>
        </div>
      <% else %>
        <div class="no-image"><%= _('No image') %></div>
      <% end %>
      <div class="catalog-item-extras"><%= extra_content.join("\n") %></div>
    </li>

    <li class="product-link"><%= link_to_product_from_catalog product, url_options: catalog_params %></li>

    <% if show_supplier %>
      <li class="product-supplier">
        <span><%= _('Oferecido por') %>:</span> <%= link_to product.profile.short_name, product.profile.url %>
      </li>
    <% end %>

    <li class="product-price-line">
      <% unless product.discount.blank? or product.discount == 0 %>
        <span class="product-discount">
          <span><%= _('from ') + price_span(product.price) %></span>
          <span class="product-discount-by"><%= _('by ') %></span>
        </span>
      <% end %>
      <% unless product.price.blank? or product.price == 0 %>
        <span class="product-price">
          <%= price_span product.price_with_discount, :class => "product-price #{'with-discount' unless product.discount}" %>
          <span class="product-unit"><%= _(' / ') + (product.unit ? product.unit.singular : _('unit')) %></span>
        </span>
      <% end %>
      <div style="clear: both"></div>
    </li>

    <% if product.description %>
      <li class="product-description expand-box">
        <span class="product-description-button"><%= _('description') %></span>
        <div class="float-box">
          <div class="arrow"></div>
          <div class="content"><%= product.description %></div>
        </div>
      </li>
    <% end %>

    <% if product.price_described? %>
      <li class="product-price-composition expand-box">
        <span class="product-price-composition-button"><%= _('price composition') %></span>
        <div class="float-box">
          <div class="arrow"></div>
          <div class="content">
            <% product.inputs.relevant_to_price.each do |i| %>
              <div class="search-product-input-dots-to-price">
                <div class="search-product-input-name"><%= i.product_category.name %></div>
                <%= price_span i.cost, :class => 'search-product-input-price' %>
              </div>
            <% end %>
            <% product.price_details.each do |i| %>
              <div class="search-product-input-dots-to-price">
                <div class="search-product-input-name"><%= i.name %></div>
                <%= price_span i.price, :class => 'search-product-input-price' %>
              </div>
            <% end %>
          </div>
        </div>
      </li>
    <% end %>

    <% if product.inputs.count > 0 %>
      <li class="product-inputs expand-box">
        <span id="inputs-button"><%= _('inputs and raw materials') %></span>
        <div class="float-box">
          <div class="arrow"></div>
          <div class="content">
            <% product.inputs.each do |i| %>
              <div>
                <%= _('%{amount_used} %{unit} of') % {:amount_used => i.amount_used, :unit => i.unit.singular} + ' ' if i.has_all_price_details? %>
                <%= i.product_category.name %>
              </div>
            <% end %>
          </div>
        </div>
      </li>
    <% end %>

    <% unless product.qualifiers.blank? %>
      <li class="product-qualifiers">
        <span><%= _('qualifiers') if product.product_qualifiers.count > 0 %></span>
        <div><%= render :partial => 'shared/product/qualifiers', :locals => {:product => product} %></div>
      </li>
    <% end %>

    <% extra_content_list.map do |content| %>
      <li class="catalog-list-item-extras"><%= content %></li>
    <% end %>

    <li class="product-unavailable"><%= _('product unavailable') unless product.available %></li>
  </ul>
</li>

{'fraction_non_alphanumeric': 0.19851504493942945, 'fraction_numerical': 0.0007815552950371239, 'mean_word_length': 2.632718239886444, 'pattern_counts': {'":': 0, '<': 297, '<?xml version=': 0, '>': 315, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4313990', 'n_tokens_mistral': 3389, 'n_tokens_neox': 3119, 'n_words': 609}