diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 2248b40c3..f622ad20c 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -52,7 +52,7 @@
回复( <% if activity.parent %> <% count=activity.parent.children.count%> - <% else %> + <% else %> <% count=activity.children.count%> <% end %> <%= count %> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 7d563bdf7..ebf3d0ad2 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -33,30 +33,19 @@ <%= activity.parent.content.to_s.html_safe%> <% end %>
-
-
<% count=0 %> +
+ <% count = 0 %>
回复( - <% if activity.parent_id.nil? %> - <% count=activity.replies_count%> - <%=count %> + <% if activity.parent %> + <% count=activity.parent.children.count%> <% else %> - <% count=activity.parent.replies_count%> - <%=count %> + <% count=activity.children.count%> <% end %> + <%=count %> )
<%#=format_date(activity.updated_on)%>
<%if count>2 %> @@ -81,7 +70,7 @@ <% activity= activity.parent_id.nil? ? activity : activity.parent %> <% replies_all_i = 0 %> - <% unless activity.children.empty? %> + <% if count > 0 %>
    <% activity.children.reorder("created_on desc").each do |reply| %> @@ -98,15 +87,6 @@ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_date(reply.created_on) %> - <%#= link_to( - l(:button_delete), - {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete), - :class => 'replyGrey fr ml10' - ) if reply.course_destroyable_by?(User.current) %> -
<%= reply.content.html_safe %>