forked from bofh/fetsite
AutoCommit Mon Aug 10 18:03:03 CEST 2015
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<%= 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 %>
|
||||
<p>
|
||||
<%= 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 content_tag(:span, content_tag(:i,"",class:"fa fa-comment-o fa-stack-2x")+ content_tag(:i,"",class:"fa fa-plus-square-o fa-stack-1x"),class:"fa-stack")+ "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 %>
|
||||
<div id="<%= divid_for(comments_block,"newform") %>">
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div id="<%= Comment.wrapid_for( comments_block)%>">
|
||||
<% unless comments_block.comments.roots.empty? %>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user