<%= content_for :data_controls do %> <%= form_tag admin_posts_path, :method => :get, :class => 'form-inline' do %>
<%= text_field_tag 'search', params[:search], :placeholder => 'Search', :class => 'form-control' %> <% if params[:search] %>
<%= link_to raw(''), admin_posts_path %>
<% end %>
<%= link_to "Manage Categories", admin_post_categories_path, :class => 'btn btn-default spud-blog-manage-categories', :title => 'Manage Categories' %> <% if Spud::Blog.disqus_shortname %> <%= link_to "Manage Comments", "https://#{Spud::Blog.disqus_shortname}.disqus.com/admin/moderate/#/all", :target => :blank, :class => 'btn btn-default', :title => 'Manage Comments' %> <% end %> <%= link_to "New Post", new_admin_post_path, :class => "btn btn-primary", :title => "New Post" %>
<% end %> <% end %> <% content_for :detail do %>
<% if Spud::Blog.disqus_shortname %> <% end %> <% cache @posts do %> <% @posts.each do |post| %> <% cache post do %> <% if Spud::Blog.disqus_shortname %> <% end %> <% end %> <% end %> <% end %>
Title Author Published AtComments 
<%= link_to post.title, post_path(post.url_name), :target => :blank %> <% if !post.visible? %> Draft <% end %> <%= post.author_name %> <%= post.published_at.strftime('%m/%d/%Y') %> <%= link_to_disqus_comment_count(post) %> <%= link_to 'Edit', edit_admin_post_path(post), :class => 'btn btn-sm btn-default' %> <%= link_to 'Delete', admin_post_path(post), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this post?'}, :class => 'btn btn-sm btn-danger' %>
<%= will_paginate @posts, :renderer => BootstrapPagination::Rails %> <% if Spud::Blog.disqus_shortname %> <%= javascript_include_tag "//#{Spud::Blog.disqus_shortname}.disqus.com/count.js", :id => 'dsq-count-scr', :async => true %> <% end %> <%end%>