From cef9fd96cdb778990b591434d1460e0a1c798956 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Jan 2016 18:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=B8=96=E5=AD=90=E7=9A=84?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=82=B9=E8=B5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_org_course_message.html.erb | 23 ++++++++++++++---- .../_org_subfield_message.html.erb | 24 ++++++++++++++----- .../organizations/_project_message.html.erb | 23 ++++++++++++++---- 3 files changed, 54 insertions(+), 16 deletions(-) diff --git a/app/views/organizations/_org_course_message.html.erb b/app/views/organizations/_org_course_message.html.erb index 93aa7a97b..55be0bf91 100644 --- a/app/views/organizations/_org_course_message.html.erb +++ b/app/views/organizations/_org_course_message.html.erb @@ -72,11 +72,17 @@ <% count=activity.children.count%> <% end %>
-
-
-
回复( - <%= count %> - )
+
+
回复 + <%= count>0 ? "(#{count})" : "" %> + + <% if activity.author == User.current %> + + <% else %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> + <% end %> + +
<%#=format_date(activity.updated_on)%>
<%if count > 3 %>
@@ -111,6 +117,13 @@ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(reply.created_on) %> + + <% if reply.author == User.current %> + + <% else %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> + <% end %> +
<%= reply.content.html_safe %> diff --git a/app/views/organizations/_org_subfield_message.html.erb b/app/views/organizations/_org_subfield_message.html.erb index bc9e28de0..901c2ecf4 100644 --- a/app/views/organizations/_org_subfield_message.html.erb +++ b/app/views/organizations/_org_subfield_message.html.erb @@ -57,12 +57,17 @@ <% count=activity.children.count%> <% end %>
-
-
-
回复( - <%=count %> - )
-
<%#=format_date(activity.updated_on)%>
+
+
回复 + <%= count>0 ? "(#{count})" : "" %> + + <% if activity.author == User.current %> + + <% else %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> + <% end %> + +
<%if count>3 %> <% end %> @@ -92,6 +97,13 @@ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(reply.created_on) %> + + <% if reply.author == User.current %> + + <% else %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> + <% end %> +
<%= reply.content.html_safe %>
diff --git a/app/views/organizations/_project_message.html.erb b/app/views/organizations/_project_message.html.erb index 7e8746fc4..c7d99c5fb 100644 --- a/app/views/organizations/_project_message.html.erb +++ b/app/views/organizations/_project_message.html.erb @@ -57,11 +57,17 @@ <% count=activity.children.count%> <% end %>
-
-
-
回复( - <%=count %> - )
+
+
回复 + <%= count>0 ? "(#{count})" : "" %> + + <% if activity.author == User.current %> + + <% else %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> + <% end %> + +
<%#=format_date(activity.updated_on)%>
<%if count>3 %> @@ -92,6 +98,13 @@ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(reply.created_on) %> + + <% if reply.author == User.current %> + + <% else %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> + <% end %> +
<%= reply.content.html_safe %>