<commit_before><% title 'Search', params[:q] %>
<%= render 'shared/navbar' %>
<%= render 'products/navbar' if params[:product_id] %>

<div class="page page-flat">
  <div class="container">

    <% if @search %>

      <div class="page-header">
        <h2 class="page-header-title">
          <i class="icon-magnifier text-muted" style="margin-right: 6px;  font-size: 22px; top: -2px; position: relative;"></i>
          Search results for
          <span class="mark"><%= params[:q] %></span>
          <% if @product %>in <%= @product.name %><% end %>
        </h2>
      </div>

      <div class="row">
        <div class="col-md-8 col-xs-8">

          <div class="list-group list-group-breakout list-group-padded">
            <% @search.results.page(params[:page]).each do |result| %>
              <div class="list-group-item">
                <%= render "#{@type}_result", result: result %>
              </div>
            <% end %>
          </div>

          <%= paginate @search.results, theme: 'twitter-bootstrap-3' %>
        </div>

        <div class="col-md-3 col-xs-3 col-md-offset-1 col-xs-offset-1">
          <%= render 'types' %>
          <%= render "#{@type.to_s}_facets", facets: @search.facets %>
        </div>
      </div>

    <% else %>

    <div class="page-header">
      <form action="<%= polymorphic_path([@product, :search]) %>" class="pull-right form-inline">
        <input type="text" name="q" value="<%= params[:q] %>" class="form-control" autocomplete="off" placeholder="Search…" />
        <input type="hidden" name="type" value="<%= @type %>">
        <!-- <button class="btn btn-default">Search</button> -->
      </form>

      <h2 class="page-header-title">Search</h2>
    </div>

    <% end %>

  </div>
</div>

<%= render 'shared/footer' %>
<commit_msg>remove reference to old product navbar from search#index<commit_after><% title 'Search', params[:q] %>
<%= render 'shared/navbar' %>

<div class="page page-flat">
  <div class="container">

    <% if @search %>

      <div class="page-header">
        <h2 class="page-header-title">
          <i class="icon-magnifier text-muted" style="margin-right: 6px;  font-size: 22px; top: -2px; position: relative;"></i>
          Search results for
          <span class="mark"><%= params[:q] %></span>
          <% if @product %>in <%= @product.name %><% end %>
        </h2>
      </div>

      <div class="row">
        <div class="col-md-8 col-xs-8">

          <div class="list-group list-group-breakout list-group-padded">
            <% @search.results.page(params[:page]).each do |result| %>
              <div class="list-group-item">
                <%= render "#{@type}_result", result: result %>
              </div>
            <% end %>
          </div>

          <%= paginate @search.results, theme: 'twitter-bootstrap-3' %>
        </div>

        <div class="col-md-3 col-xs-3 col-md-offset-1 col-xs-offset-1">
          <%= render 'types' %>
          <%= render "#{@type.to_s}_facets", facets: @search.facets %>
        </div>
      </div>

    <% else %>

    <div class="page-header">
      <form action="<%= polymorphic_path([@product, :search]) %>" class="pull-right form-inline">
        <input type="text" name="q" value="<%= params[:q] %>" class="form-control" autocomplete="off" placeholder="Search…" />
        <input type="hidden" name="type" value="<%= @type %>">
        <!-- <button class="btn btn-default">Search</button> -->
      </form>

      <h2 class="page-header-title">Search</h2>
    </div>

    <% end %>

  </div>
</div>

<%= render 'shared/footer' %>

{'fraction_non_alphanumeric': 0.21014492753623187, 'fraction_numerical': 0.008361204013377926, 'mean_word_length': 2.3636363636363638, 'pattern_counts': {'":': 0, '<': 108, '<?xml version=': 0, '>': 108, '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': '7197147', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1143, 'n_words': 241}