diff --git a/app/controllers/sub_document_comments_controller.rb b/app/controllers/sub_document_comments_controller.rb
index ce1a54313..e5a004bf8 100644
--- a/app/controllers/sub_document_comments_controller.rb
+++ b/app/controllers/sub_document_comments_controller.rb
@@ -113,7 +113,7 @@ class SubDocumentCommentsController < ApplicationController
@org_subfield = @subdomain.org_subfield
@organization = @org_subfield.organization
@comment = SubDocumentComment.new(:sub_domain_id => @document.sub_domain_id, :creator_id => User.current.id, :reply_id => params[:id])
- @comment.content = params[:org_comment][:sub_content]
+ @comment.content = params[:flag] ? params[:sub_content] : params[:org_comment][:sub_content]
@document.children << @comment
@document.save
respond_to do |format|
diff --git a/app/views/sub_document_comments/_show_newstyle.html.erb b/app/views/sub_document_comments/_show_newstyle.html.erb
index 90d503bd1..000511a3c 100644
--- a/app/views/sub_document_comments/_show_newstyle.html.erb
+++ b/app/views/sub_document_comments/_show_newstyle.html.erb
@@ -13,37 +13,37 @@
- <% comments_for_doc = @document.children.reorder("created_at desc") %>
- <% count = @document.children.count() %>
-
-
留言板80条留言
-
-
\ No newline at end of file
diff --git a/app/views/sub_document_comments/show.html.erb b/app/views/sub_document_comments/show.html.erb
index 8f8ba1363..0c2733086 100644
--- a/app/views/sub_document_comments/show.html.erb
+++ b/app/views/sub_document_comments/show.html.erb
@@ -81,6 +81,13 @@
<%# end %>
+ <% if count > 3 %>
+
<% comments_for_doc.each_with_index do |reply,i| %>
@@ -132,7 +139,7 @@
- <%= form_for :org_comment, :url => {:action => 'add_reply_in_doc',:controller => 'sub_document_comments', :id => @document.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
+ <%= form_for :org_comment, :url => {:action => 'add_reply_in_doc', :controller => 'sub_document_comments', :id => @document.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
<%= f.kindeditor :sub_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor' %>
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %>
<%= link_to l(:button_reply), "javascript:void(0)", :onclick => "message_content_editor.sync();$('#message_form').submit();", :class => "blue_btn fr c_white mt10 mb10", :style => "margin-right: 5px;" %>
全部评论
-