forked from bofh/fetsite
AutoCommit Sam Aug 1 13:03:01 CEST 2015
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
|
||||
<div id="<%= divid_for(comment,"newform") %>">
|
||||
</div>
|
||||
<div id="<%= Comment.wrapid_for( comment)%>">
|
||||
|
||||
<%= render partial:"comments/comments", object: comment.children.order(:created_at).reverse_order if comment.children.size >0 %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<%= link_to "Comment" , new_comment_path( commentable_type: comments_block.class.to_s.gsub("::","_"), commentable_id: comments_block.id), remote:true if can? :comment, comments_block %> <%# This is the button to add a new comment %>
|
||||
<%= link_to "comments:.."+ comments_block.comments.count().to_s, comments_path(commentable_type: "Survey_Question", commentable_id: comments_block.id), remote:true, id: Comment.switchshowid_for( comments_block) %> <%# load the comments in the comments block %>
|
||||
<%= link_to "comments:.."+ comments_block.comments.count().to_s, comments_path(commentable_type: comments_block.class.to_s.gsub("::","_"), commentable_id: comments_block.id), remote:true, id: Comment.switchshowid_for( comments_block) %> <%# load the comments in the comments block %>
|
||||
<div id="<%= divid_for(comments_block,"newform") %>">
|
||||
</div>
|
||||
<% unless comments_block.comments.roots.empty? %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
|
||||
<div id="<%= Comment.wrapid_for( comments_block)%>">
|
||||
<%= render partial:"comments/comments", object: comments_block.comments.order(:created_at).roots.reverse_order if params[:show_comments] %><%# can? fehlt!%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user