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 %>
|
<%= 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 id="<%= divid_for(comments_block,"newform") %>">
|
||||||
</div>
|
</div>
|
||||||
</p>
|
|
||||||
<% unless comments_block.comments.roots.empty? %>
|
|
||||||
|
|
||||||
<div id="<%= Comment.wrapid_for( comments_block)%>">
|
<div id="<%= Comment.wrapid_for( comments_block)%>">
|
||||||
|
<% unless comments_block.comments.roots.empty? %>
|
||||||
|
|
||||||
|
|
||||||
<%= render partial:"comments/comments", object: comments_block.comments.order(:created_at).roots.reverse_order if params[:show_comments] %><%# can? fehlt!%>
|
<%= render partial:"comments/comments", object: comments_block.comments.order(:created_at).roots.reverse_order if params[:show_comments] %><%# can? fehlt!%>
|
||||||
</div>
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
$("#<%= divid_for(@comment.parent_object,"newform") %>").html("")
|
$("#<%= divid_for(@comment.parent_object,"newform") %>").html("")
|
||||||
$("#<%= Comment.wrapid_for(@comment.parent_object) %>").html("<%= escape_javascript render partial:"comments/comments", object: @comments %>")
|
$("#<%= Comment.wrapid_for(@comment.parent_object) %>").html("<%= escape_javascript render partial:"comments/comments", object: @comments %>")
|
||||||
|
$("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Ausblenden", hide_comments_path(params: {commentable_type: @commentable.class.to_s.gsub("::","_"), commentable_id: @commentable.id}), remote: true , id: Comment.switchshowid_for( @commentable) %>")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<b>Typ:</b>
|
<b>Typ:</b>
|
||||||
<%= @survey_question.typ %>
|
<%= @survey_question.typ %>
|
||||||
</p>
|
</p>
|
||||||
<%= render @survey_question.parent unless @survey_question.parent.nil?|| !(@survey_question.parent.class == Neuigkeit) %>
|
<%= render partial: "/"+@survey_question.parent.to_partial_path, object: @survey_question.parent unless @survey_question.parent.nil? %>
|
||||||
<%= render @survey_question %>
|
<%= render @survey_question %>
|
||||||
|
|
||||||
<%= render_comments_for(@survey_question) %>
|
<%= render_comments_for(@survey_question) %>
|
||||||
|
|||||||
Reference in New Issue
Block a user