<% unless @post.nil? %>

The post

<%= link_to_person_icon(@post.person) + ' ' + sanitize(@post.title) %>

<%= summary_for_post @post %>

<%= tags_for @post %>

<%= markup @post.contents %>

<%= comments_string_for @post %>

<% if @post.comments.length > 0 %> <% @post.comments.each do |comment| %>
<%= link_to_person_icon(comment.person, '30x30') %> <%= link_to_person(comment.person) %>

<%= summary_for_comment(comment, false) %> <%= link_to_comment(comment, '#') %>

<%= markup comment.contents %>
<% end %> <% end %> <% if logged_in? %> <% form_for :comment, @comment, :url => url_for_post(@post) + '/comment', :html => {:id => 'comment'} do |f| -%>


This field supports <%= link_to 'Markdown', 'http://daringfireball.net/projects/markdown/basics', :title => 'The basics of the Markdown markup.' %>.
<%= f.text_area :contents, :size => '70x10' %>

<%= submit_tag 'Add your comment' %>

<% end -%> <% else %>

You need to be logged in to leave a comment.

<% end %> <% else %>

There's no post here!

Sorry about that.

<% end %>