<commit_before><div class="page-header">
  <h1>Lastest posts</h1>
</div>
<a href="<%= Blog.Router.Helpers.posts_path(@conn, :new) %>" >Create a new post</a>
<%= for post <- @posts do %>
  <div class="row">
    <div class="col-xs-2"></div>
    <div class="col-xs-8">
      <h2><%= post.title %></h4>
      <p class="post-content"><%= post.content %></p>
      <div>
        <%= link "Edit", to: posts_path(@conn, :edit, post), class: "btn btn-default" %>
        <!-- Remove this when become possible to pass the `window.confirm` to generated link helper form -->
        <form style="float: right;" method="post" onsubmit="return confirm('Are you sure?');" action="<%= posts_path(@conn, :delete, post.id, _method: "delete") %>">
          <input type="hidden" name="_csrf_token" value="<%= get_csrf_token %>" />
          <input type="submit" value="Remove" class="btn btn-danger">
        </form>
      </div>
    </div>
    <div class="col-xs-2"></div>
  </div>
  <hr />
<% end %><commit_msg>When listing posts show edit/delete only to owner<commit_after><div class="page-header">
  <h1>Lastest posts</h1>
</div>
<a href="<%= Blog.Router.Helpers.posts_path(@conn, :new) %>" >Create a new post</a>
<%= for post <- @posts do %>
  <div class="row">
    <div class="col-xs-2"></div>
    <div class="col-xs-8">
      <h2><%= post.title %></h4>
      <p class="post-content"><%= post.content %></p>
      <%= if post.author_id == current_user_id(@conn) do %>
        <div>
          <%= link "Edit", to: posts_path(@conn, :edit, post), class: "btn btn-default" %>
          <!-- Remove this when become possible to pass the `window.confirm` to generated link helper form -->
          <form style="float: right;" method="post" onsubmit="return confirm('Are you sure?');" action="<%= posts_path(@conn, :delete, post.id, _method: "delete") %>">
            <input type="hidden" name="_csrf_token" value="<%= get_csrf_token %>" />
            <input type="submit" value="Remove" class="btn btn-danger">
          </form>
        </div>
      <% end %>
    </div>
    <div class="col-xs-2"></div>
  </div>
  <hr />
<% end %>
{'fraction_non_alphanumeric': 0.21739130434782608, 'fraction_numerical': 0.006616257088846881, 'mean_word_length': 3.102713178294574, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 73, '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': '4607110', 'n_tokens_mistral': 745, 'n_tokens_neox': 715, 'n_words': 184}