<% page_title entry.title %>

<%= entry.title %>

<%= entry.published_at.try(:to_s, :long) %>
<%= entry.body.html_safe %>

Comments

<% if entry.comments.any? %> <% entry.comments.each do |comment| %>
<% if admin_signed_in? %>
<%= link_to image_tag('jabe/delete.png'), entry_comment_path(entry, comment), :confirm => 'Are you sure?', :method => :delete %>
<% end %> <% if comment.respond_to?(:gravatar_url) %>
<%= image_tag comment.gravatar_url(:default => default_gravatar_url) %>
<% end %>
<%= comment.name %> <%= comment.created_at.to_s(:long) %>
<%= comment.body.html_safe %>
<% end %> <% else %>
None yet...
<% end %>

Add a comment

<%= form_for [entry, comment] do |form| %> <%= form.label :name %> <%= form.text_field :name %> <%= form.label :nickname %> <%= form.text_field :nickname %> <%= form.label :email %> <%= form.text_field :email, :label => 'Email (not shown to the public)' %> <%= form.label :url, 'Website' %> <%= form.text_field :url %> <%= form.label :body, "Comment - Textile enabled (#{link_to 'Reference', 'http://redcloth.org/try-redcloth/', :target => '_blank'})".html_safe %> <%= form.text_area :body %>
<%= form.submit 'Add comment', :class => 'btn btn-primary' %> <% end %>