<commit_before><% breadcrumbs do %>
  <%= link_to 'Blogs &raquo;', blogs_path %>
<% end %>
  
<%= page_heading "#{h(@blog.title)}'s Posts" %>

<div class="content">

  <% if @blog.posts? %>
  
  <div class="sort">
    Show: 
    <%= link_to_unless_current 'All', blog_posts_path %> |
    <%= link_to_unless_current 'Published', published_blog_posts_path %> |
    <%= link_to_unless_current 'Draft', draft_blog_posts_path %>
  </div>
  
  <%= link_to 'New Post', new_blog_post_path %>
  
  <table>
    <% if @posts.present? %>
      <% for post in @posts %>
        <tr class="<%= alternate_row %>">
          <td><%= link_to h(post.title), edit_blog_post_path(@blog, post) %></td>
          <td><%= post.published? ? 'Published' : 'Draft' %></td>
          <td>
            <%= link_to 'Visit', [@blog, post] %>
            <%= link_to 'Edit', edit_blog_post_path(@blog, post) %>
            <%= link_to 'Delete', edit_blog_post_path(@blog, post) %>
          </td>
        </tr>
      <% end %>
    <% else %>
      <tr>
        <td class="empty">There are no <%= controller.action_name %> posts.</td>
      </tr>
    <% end %>
  </table>
  
  <%= link_to 'New Post', new_blog_post_path %>
  
  <% else %>
    <div class="empty">
      <p>
        You currently don't have any posts for <b><%=h @blog.title %></b>.
      </p>
      
      <p>
        <%= link_to 'Create a New Post', new_blog_post_path %>
      </p>
    </div>
  <% end %>
</div>

<%= aside_help_for :posts %><commit_msg>Fixed delete link on posts.<commit_after><% breadcrumbs do %>
  <%= link_to 'Blogs &raquo;', blogs_path %>
<% end %>
  
<%= page_heading "#{h(@blog.title)}'s Posts" %>

<div class="content">

  <% if @blog.posts? %>
  
  <div class="sort">
    Show: 
    <%= link_to_unless_current 'All', blog_posts_path %> |
    <%= link_to_unless_current 'Published', published_blog_posts_path %> |
    <%= link_to_unless_current 'Draft', draft_blog_posts_path %>
  </div>
  
  <%= link_to 'New Post', new_blog_post_path %>
  
  <table>
    <% if @posts.present? %>
      <% for post in @posts %>
        <tr class="<%= alternate_row %>">
          <td><%= link_to h(post.title), edit_blog_post_path(@blog, post) %></td>
          <td><%= post.published? ? 'Published' : 'Draft' %></td>
          <td>
            <%= link_to 'Visit', [@blog, post] %>
            <%= link_to 'Edit', edit_blog_post_path(@blog, post) %>
            <%= link_to 'Delete', [@blog, post], :method => :delete, :confirm => 'Are you sure?' %>
          </td>
        </tr>
      <% end %>
    <% else %>
      <tr>
        <td class="empty">There are no <%= controller.action_name %> posts.</td>
      </tr>
    <% end %>
  </table>
  
  <%= link_to 'New Post', new_blog_post_path %>
  
  <% else %>
    <div class="empty">
      <p>
        You currently don't have any posts for <b><%=h @blog.title %></b>.
      </p>
      
      <p>
        <%= link_to 'Create a New Post', new_blog_post_path %>
      </p>
    </div>
  <% end %>
</div>

<%= aside_help_for :posts %>
{'fraction_non_alphanumeric': 0.19953673064195895, 'fraction_numerical': 0.0, 'mean_word_length': 2.4430523917995446, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 111, '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': '7033429', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1079, 'n_words': 234}