view_comments.rjs 956 Bytes
if @paragraph_comment_page == 1
  page.replace_html "comments_list_paragraph_#{@paragraph_id}", :partial => 'comment/comment.html.erb', :collection => @comments
else
  page.insert_html :bottom, "comments_list_paragraph_#{@paragraph_id}", :partial => 'comment/comment.html.erb', :collection => @comments
end
page.replace_html "comment-count-#{@paragraph_id}", @comments_count

if @no_more_pages
  page.replace_html "comments_list_paragraph_#{@paragraph_id}_more", ""
else
  page.replace_html "comments_list_paragraph_#{@paragraph_id}_more", link_to_remote(_('More'), :url => { :profile => profile.identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_id => @paragraph_id, :article_id => @article_id, :paragraph_comment_page => @paragraph_comment_page + 1}, :loaded => visual_effect(:highlight, "comments_list_paragraph_#{@paragraph_id}"), :method => :post, :complete => "loadCompleted(#{@paragraph_id})")
end