<commit_before><% if @product.relations.order(:id).any? %>
  <div class="heading">
    <h3 class="product-section-title">
      <%= Spree.t('related_products') %>
    </h3>
  </div>
  <div id="related-products-carousel" class="<%= "carousel" if @product.relations.count > 3 %> slide">
    <div class="carousel-inner">
      <% @product.relations.order(:id).each_slice(3).with_index do |slide, key| %>
        <div class="item<%= " active " unless key > 0 %>">
          <% slide.each do |relation| %>
            <div class="span4 related-product">
              <div class="row-fluid">
                <div class="span6"><%= link_to product_image(relation.related_to, :itemprop => "image"), relation.related_to %></div> 
                <div class="span6">
                  <div class="product-title"><%= link_to relation.related_to.name, relation.related_to %></div>
                  <div class="price"><%= display_discounted_price relation %></div>
                  <% if relation.discount_amount > 0 %>
                    <div class="discount"><%= Spree.t 'save' %> <%= display_discount relation %></div>
                  <% end -%>
                </div> 
              </div>
            </div>
          <% end %>
        </div>
      <% end %>
    </div>

    <% if @product.relations.count > 3 %>
      <a class="carousel-control left" href="#related-products-carousel" data-slide="prev">&lsaquo;</a>
      <a class="carousel-control right" href="#related-products-carousel" data-slide="next">&rsaquo;</a>
    <% end -%>  
  </div>
<% end %>
<commit_msg>spruce up related products<commit_after><% if @product.relations.order(:id).any? %>
  <div class="heading">
    <h3 class="product-section-title">
      <%= Spree.t('related_products') %>
    </h3>
  </div>
  <div id="related-products-carousel" class="<%= "carousel" if @product.relations.count > 4 %> slide">
    <div class="carousel-inner">
      <% @product.relations.order(:id).each_slice(4).with_index do |slide, key| %>
        <div class="item<%= " active " unless key > 0 %>">
          <% slide.each do |relation| %>
            <div class="span3 related-product">
              <div class="row-fluid">
                <div class="span12 center">
                  <%= link_to product_image(relation.related_to, :itemprop => "image"), relation.related_to %>
                  <div class="product-title"><%= link_to relation.related_to.name, relation.related_to %></div>
                  <div class="price"><%= display_discounted_price relation %></div>
                  <% if relation.discount_amount > 0 %>
                    <div class="discount"><%= Spree.t 'save' %> <%= display_discount relation %></div>
                  <% end -%>
                </div> 
              </div>
            </div>
          <% end %>
        </div>
      <% end %>
    </div>

    <% if @product.relations.count > 4 %>
      <a class="carousel-control left" href="#related-products-carousel" data-slide="prev">&lsaquo;</a>
      <a class="carousel-control right" href="#related-products-carousel" data-slide="next">&rsaquo;</a>
    <% end -%>  
  </div>
<% end %>

{'fraction_non_alphanumeric': 0.18640280880944782, 'fraction_numerical': 0.0063836578359399935, 'mean_word_length': 2.3059071729957807, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 103, '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': '515739', 'n_tokens_mistral': 1045, 'n_tokens_neox': 938, 'n_words': 187}