work on comments
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
<div class="comment-section" data-post-id="<%= post.id %>">
|
||||
<div class="comment-list">
|
||||
<%= render :partial => "comments/partials/show/comment", :collection => comments %>
|
||||
</div>
|
||||
|
||||
<div class="comment-response">
|
||||
<p><%= submit_tag "Post comment", :class => "expand-comment-response" %></p>
|
||||
|
||||
<div class="comment-preview"></div>
|
||||
|
||||
<%= form_tag(comments_path) do %>
|
||||
<%= hidden_field "comment", "post_id", :value => post.id%>
|
||||
<%= text_area "comment", "body", :size => "60x7" %><br>
|
||||
<%= submit_tag "Post" %>
|
||||
<%= submit_tag "Preview" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
6
app/views/comments/partials/index/_list.html.haml
Normal file
6
app/views/comments/partials/index/_list.html.haml
Normal file
@@ -0,0 +1,6 @@
|
||||
%div{:class => "comments-for-post", "data-post-id" => post.id}
|
||||
%div{:class => "list-of-comments"}
|
||||
= render :partial => "comments/partials/show/comment", :collection => comments
|
||||
%div{:class => "new-comment"}
|
||||
%p= link_to "Post comment", new_comment_path, :class => "expand-comment-response"
|
||||
= render :partial => "comments/partials/new/form", :locals => {:post => post}
|
||||
Reference in New Issue
Block a user