removecomments

This commit is contained in:
Andreas Stephanides
2014-10-04 12:09:56 +02:00
parent 6a4d2ff536
commit 6ee1468ce3
19 changed files with 5 additions and 296 deletions

View File

@@ -33,18 +33,5 @@
</div>
</div>
<%= link_to "comment" , new_comment_path( commentable_type: "Beispiel", commentable_id: beispiel.id), remote:true if can? :comment, beispiel %>
<%= link_to "comments:.."+beispiel.comments.count().to_s, comments_path(commentable_type: "Beispiel", commentable_id: beispiel.id), remote:true, id: Comment.switchshowid_for(beispiel) %>
<div id="<%= Comment.formid_for(beispiel) %>">
</div>
<% unless beispiel.comments.roots.empty? %>
<div class="row-fluid">
<div class="span12">
<div id="<%= Comment.wrapid_for(beispiel)%>">
<%= render partial:"comments/comments", object: beispiel.comments.order(:created_at).roots.reverse_order if params[:show_comments] %>
</div>
</div>
</div>
<% end %>
</div>