%= content_for :data_controls do %> <%= link_to "Manage Categories", spud_admin_post_categories_path, :class => 'btn spud_blog_manage_categories', :title => 'Manage Categories' %> <%= link_to "Manage Comments", spud_admin_post_comments_path, :class => 'btn', :title => 'Manage Comments' %> <%= link_to "New Post", new_spud_admin_post_path, :class => "btn btn-primary", :title => "New Post" %> <% end %> <%=content_for :detail do %>
Title | Author | Published At | Comments | |
---|---|---|---|---|
<%= link_to edit_spud_admin_post_path(post) do %> <%=post.title%> <%if !post.visible%> Draft <%end%> <%end%> | <%= post.author.full_name %> | <%= link_to(post.published_at.strftime('%m/%d/%Y'), blog_post_path(post.url_name)) %> |
Approved: <%=link_to post.visible_comments.count, spud_admin_post_post_comments_path(:post_id => post.id) %>
Spam: <%=link_to post.spam_comments.count, spud_admin_post_post_comments_path(:post_id => post.id) %> |
<%= link_to 'Delete', spud_admin_post_path(post), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this post?'}, :class => 'btn btn-danger' %> |