Created
December 5, 2010 03:13
-
-
Save safarista/728728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="notice"><%= notice %></p> | |
<article class=""> | |
<h1><%= @post.title %></h1> | |
<h2> | |
<%= @post.created_at.strftime('%b %d, %Y') %> • By: | |
<%= link_to "#{@post.user.name}", @user %> | |
• Category: | |
<%= link_to "#{@post.category.name}", categories_path(@category) %> | |
<a href="" title="Read comments" class="speech-bubl" > | |
<span class="point"></span> | |
<em> 23 </em> | |
</a> | |
</h2> | |
<%= @post.body %> | |
<div class="controls"> | |
<p> | |
<%= link_to 'Edit This Post', edit_post_path(@post) %> | | |
<%= link_to 'Back', posts_path %> | | |
</p> | |
</div> | |
</article> | |
<h2 class="hr">Comments</h2> | |
<ul id="comment-list" > | |
<% @post.comments.each do |comment| %> | |
<li> | |
<div class="comment"> | |
<%= comment.body %> | |
<p><%= link_to "Destroy Comment", [comment.post, comment], | |
:confirm => 'Are you sure?', | |
:method => :delete %> | |
</p> | |
</div><!-- end .comment --> | |
<div class="commentor"> | |
<%= link_to "#{comment.commenter}", "http://twitter.com/", :target=>"_blank" %> | |
</div> | |
</li> | |
<% end %> | |
</ul><!-- end #comment-list --> | |
<div id="comment-form"> | |
<h2 class="hr">add a comment</h2> | |
<p> | |
I welcome your comments on this article. Please complete the form below to add to the conversation. | |
</p> | |
<p> | |
<strong>Note:</strong> | |
I reserve the right to edit or remove any comment that is deemed inappropriate, off-topic, or offensive. | |
</p> | |
<% form_for([@post, @post.comments.build]) do |f| %> | |
<p> | |
<%= f.label :commenter %> <br> | |
<%= f.text_field :commenter %> | |
</p> | |
<p> | |
<%= f.label :body %> <br> | |
<%= f.text_area :body %> | |
</p> | |
<p> | |
<%= f.submit %> | |
</p> | |
<% end %> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment