diff --git a/app/views/content_viewer/view_page.html.erb b/app/views/content_viewer/view_page.html.erb index a41f631..650646e 100644 --- a/app/views/content_viewer/view_page.html.erb +++ b/app/views/content_viewer/view_page.html.erb @@ -70,37 +70,36 @@ <%= @plugins.dispatch(:article_extra_contents, @page).collect { |content| instance_exec(&content) }.join("") %> -
> <%= display_number_of_comments(@comments_count) %>
- <% end %> - <% if @comments.present? && @comments.count > 1 %> - <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") if @page.accept_comments? %> + <% if @comments.present? && @comments.count > 1 %> + <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") if @page.accept_comments? %> + + <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier, :page => @page.explode_path)) %> + <%= javascript_include_tag "comment_order.js" %> ++ <% if @comments.present? %> + <%= render :partial => 'comment/comment', :collection => @comments %> + <%= pagination_links @comments, :param_name => 'comment_page' %> <% end %> -
- <% if @comments.present? %> - <%= render :partial => 'comment/comment', :collection => @comments %> - <%= pagination_links @comments, :param_name => 'comment_page' %> + <% if @page.accept_comments? %> +<%= render :partial => 'comment/comment_form', :locals =>{:url => {:controller => :comment, :action => :create}, :display_link => true, :cancel_triggers_hide => true}%>
<% end %>
-
- - <% if @page.accept_comments? %> -