38 lines
745 B
Plaintext
38 lines
745 B
Plaintext
|
<p id="notice"><%= flash_messages %></p>
|
||
|
|
||
|
<p>
|
||
|
<b><%= t('blog.body') %></b>
|
||
|
<%=h @post.body %>
|
||
|
</p>
|
||
|
|
||
|
<h2><%= t('blog.comments') %></h2>
|
||
|
|
||
|
<% @post.comments.each do |c| %>
|
||
|
<p>
|
||
|
<b><%=h c.name %> said:</b><br />
|
||
|
<%= time_ago_in_words(c.created_at) %> ago
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
<%=h c.body %>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
|
||
|
<%= form_for Comment.new, :url => panel_blog_comments_path do |f| %>
|
||
|
<p>
|
||
|
|
||
|
<%= f.label :name, "Author" %><br />
|
||
|
<%= f.text_field :name %><br />
|
||
|
<%= f.label :body, "Comment Description" %><br />
|
||
|
<%= f.text_area :body %>
|
||
|
<%= hidden_field_tag :post_id, @post.id %>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
<%= f.submit "Add Comment" %>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
|
||
|
|
||
|
<%= link_to t('blog.edit'), edit_panel_blog_post_path(@post) %> |
|
||
|
<%= link_back %>
|