<% if params[:action] == 'show' %> <% content_for :head do %><%= carnonical_link(blog_post) %><% end %> <% end %> <div class="blogPost"> <h1 class="blogPostTitle header"> <%= link_to(h(blog_post.title), blog_post) %> <% if !blog_post.published? %> [Draft] <% end %> </h1> <div class="blogPostBody"> <% if defined?(show_comments) %> <%= raw(blog_post.parsed_body) %> <% else %> <%= raw(blog_post.parsed_body(1000)) %> <% end %> </div> <% if params[:action] == 'show' %> <p class="blogPostPostedAt"> <% if blog_post.show_user? %> By <span class="blogPoster"><a rel="author" style="color: red" href=/"><%= blog_post.user_name %></a></span> <% end %> if you liked it, hit the +1 like a man! <g:plusone></g:plusone> </p> <% end %> <p class="blogPostTags"> <b>Tags: </b> <% blog_post.tag_list.each do |tag| %> <%= link_to tag, tag_url(tag) %><% if tag != blog_post.tag_list.last %>, <% end %> <% end %> </p> <p class="blogFooter"> <ul class="blogList"> <li class="blogListFirst"><%= link_to(pluralize(blog_post.blog_comments.count, 'comment'), blog_post_path(blog_post), :class => 'blogCommentCount') %></li> <% if params[:action] == 'show' %> <li><%= link_to('Back', blog_posts_path) %></li> <% end %> <% if signed_in? %> <li><%= link_to('Edit Post', edit_blog_post_path(blog_post))%></li> <li><%= link_to('Delete', blog_post_path(blog_post), :method => :delete, :confirm => "Are you sure you want to delete the post: #{blog_post.title}") %></li> <% end %> </ul> </p> <% if defined?(show_comments) %> <%= render :partial => 'blog_basic/blog_comments/new_blog_comment', :locals => {:blog_comment => @blog_comment} %> <%= render :partial => 'blog_basic/blog_posts/comments' %> <% end %> <br style="clear: both;" /> </div>