<commit_before><queries>
  <div class='container'>
    <div class="btn-group btn-group-justified" role="group">
      <div class="btn-group" role="group">
        <%= link_to("My Searches", { action: "index", option: 'current' }, class: "btn btn-default") %>
      </div>
      <div class="btn-group" role="group">
        <%= link_to("All Searches (by time)", { action: "index", option: 'all-time' }, class: "btn btn-default") %>
      </div>
      <div class="btn-group" role="group">
        <%= link_to("All Searches (by user)", { action: "index", option: 'all-user' }, class: "btn btn-default") %>
      </div>
    </div>

    <div>
      <% if !params[:option] || params[:option] == 'current' %>
      <% if signed_in? %>
      <div class='well'>
        <h2 style="text-align: center;">
          <%= "Showing searches for #{@username}" %>
        </h2>
        <table class="table">
          <thead>
            <tr>
              <th>Date</th>
              <th>Time</th>
              <th>Search</th>
            </tr>
          </thead>
          <tbody>
            <% current_user.queries.each do |q| %>
            <tr>
              <td><%= q.created_at.to_date %></td>
              <td><%= q.created_at.to_s(:time) %></td>
              <td><%= q.content %></td>
            </tr>
            <% end %>
          </tbody>
        </table>

      <% else %>
        You are not logged in, to see your searches please log in
        <% end %>

        <% elsif params[:option] == 'all-time' %>
        <div class='well'>
          <table class="table">
              <thead>
                <tr>
                  <th>Date</th>
                  <th>Time</th>
                  <th>Search</th>
                </tr>
              </thead>
              <tbody>
                <% @queries.each do |q| %>
                <tr>
                  <td><%= q.created_at.to_date %></td>
                  <td><%= q.created_at.to_s(:time) %></td>
                  <td><%= q.content %></td>
                </tr>
                <% end %>
              </div>

            <% elsif params[:option] == 'all-user' %>
            <div class='well'>
              <ul>
                <% @users.each do |u| %>
                <h4 style="text-align: center;">
                  <%='Searches by #{u.name}' %></h4>
                    <table class="table">
                    <thead>
                      <tr>
                        <th>Date</th>
                        <th>Time</th>
                        <th>Search</th>
                      </tr>
                    </thead>
                    <tbody>
                      <% u.queries.each do |q| %>
                      <tr>
                        <td><%= q.created_at.to_date %></td>
                        <td><%= q.created_at.to_s(:time) %></td>
                        <td><%= q.content %></td>
                      </tr>
                      <% end %>
                    <% end %><commit_msg>Styling of the query analysis page<commit_after><queries>
  <div class='container'>
    <div class="btn-group btn-group-justified" role="group">
      <div class="btn-group" role="group">
        <%= link_to("My Searches", { action: "index", option: 'current' }, class: "btn btn-default") %>
      </div>
      <div class="btn-group" role="group">
        <%= link_to("All Searches (by time)", { action: "index", option: 'all-time' }, class: "btn btn-default") %>
      </div>
      <div class="btn-group" role="group">
        <%= link_to("All Searches (by user)", { action: "index", option: 'all-user' }, class: "btn btn-default") %>
      </div>
    </div>

    <div>
      <% if !params[:option] || params[:option] == 'current' %>
      <% if signed_in? %>
      <div class='well'>
        <h2 style="text-align: center;">
          <%= "Showing searches for #{@username}" %>
        </h2>
        <table class="table">
          <thead>
            <tr>
              <th>Date</th>
              <th>Time</th>
              <th>Search</th>
            </tr>
          </thead>
          <tbody>
            <% current_user.queries.reverse.each do |q| %>
            <tr>
              <td><%= q.created_at.to_date %></td>
              <td><%= q.created_at.to_s(:time) %></td>
              <td><%= q.content %></td>
            </tr>
            <% end %>
          </tbody>
        </table>

      <% else %>
        You are not logged in, to see your searches please log in
        <% end %>

        <% elsif params[:option] == 'all-time' %>
        <div class='well'>
          <table class="table">
              <thead>
                <tr>
                  <th>Date</th>
                  <th>Time</th>
                  <th>Search</th>
                </tr>
              </thead>
              <tbody>
                <% @queries.reverse.each do |q| %>
                <tr>
                  <td><%= q.created_at.to_date %></td>
                  <td><%= q.created_at.to_s(:time) %></td>
                  <td><%= q.content %></td>
                </tr>
                <% end %>
              </div>

            <% elsif params[:option] == 'all-user' %>
            <div class='well'>
              <ul>
                <% @users.each do |u| %>
                <h4 style="text-align: center;">
                  <%='Searches by #{u.name}' %></h4>
                    <table class="table">
                    <thead>
                      <tr>
                        <th>Date</th>
                        <th>Time</th>
                        <th>Search</th>
                      </tr>
                    </thead>
                    <tbody>
                      <% u.queries.reverse.each do |q| %>
                      <tr>
                        <td><%= q.created_at.to_date %></td>
                        <td><%= q.created_at.to_s(:time) %></td>
                        <td><%= q.content %></td>
                      </tr>
                      <% end %>
                    <% end %>
{'fraction_non_alphanumeric': 0.18040461461294097, 'fraction_numerical': 0.001337568968399933, 'mean_word_length': 1.120524636653669, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 223, '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': '4612842', 'n_tokens_mistral': 1913, 'n_tokens_neox': 1726, 'n_words': 369}