From a63f58de5b9c156f114d45eceb5c13ecb4883fc6 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 30 Sep 2016 14:48:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=BB=A3=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/blog_comments/show.html.erb | 6 +++--- app/views/blogs/_homepage.html.erb | 6 +++--- app/views/org_document_comments/show.html.erb | 6 +++--- app/views/organizations/_org_subfield_message.html.erb | 6 +++--- app/views/organizations/_show_org_document.html.erb | 6 +++--- app/views/users/_course_journalsformessage.html.erb | 6 +++--- app/views/users/_course_message.html.erb | 6 +++--- app/views/users/_project_message.html.erb | 6 +++--- app/views/users/_user_blog.html.erb | 6 +++--- app/views/users/_user_journalsformessage.html.erb | 6 +++--- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb index 45a621816..7143e980b 100644 --- a/app/views/blog_comments/show.html.erb +++ b/app/views/blog_comments/show.html.erb @@ -106,7 +106,8 @@
<% all_comments = []%> - <% count=get_all_children(all_comments, @article).count %> + <% all_replies = get_all_children(all_comments, @article) %> + <% count= all_replies.count %>
回复 @@ -119,8 +120,7 @@
- <% all_comments = []%> - <% comments = get_all_children(all_comments, @article) %> + <% comments = all_replies %> <% if count > 0 %>
<% comments.each do |comment| %> diff --git a/app/views/blogs/_homepage.html.erb b/app/views/blogs/_homepage.html.erb index a076ed15c..6e45fdd88 100644 --- a/app/views/blogs/_homepage.html.erb +++ b/app/views/blogs/_homepage.html.erb @@ -46,12 +46,12 @@
<% all_comments = []%> - <% count=get_all_children(all_comments, activity).count %> + <% all_repies = get_all_children(all_comments, activity) %> + <% count = all_repies.count %>
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1} %> - <% all_comments = []%> - <% comments = get_all_children(all_comments, activity)[0..2] %> + <% comments = all_repies[0..2] %> <% if count > 0 %>
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%> diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb index 1321fc83e..0fe72ad36 100644 --- a/app/views/org_document_comments/show.html.erb +++ b/app/views/org_document_comments/show.html.erb @@ -75,7 +75,8 @@
<% all_comments = []%> - <% count=get_all_children(all_comments, @document).count %> + <% all_replies = get_all_children(all_comments, @document) %> + <% count = all_replies.count %>
<%# if count > 0 %> @@ -88,8 +89,7 @@
- <% all_comments = []%> - <% comments = get_all_children(all_comments, @document) %> + <% comments = all_replies %>
<% comments.each do |comment| %>