From c8467a50a023a2381dede7b6fdf359a3bf4f03ad Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 25 May 2016 16:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=B7=B1=E5=8F=AF=E4=BB=A5=E7=BB=99?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E7=82=B9=E8=B5=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/praise_tread_controller.rb | 16 ++++++++-------- app/views/blog_comments/show.html.erb | 12 ++---------- app/views/messages/_course_show.html.erb | 10 +--------- app/views/messages/_project_show.html.erb | 12 ++---------- app/views/news/_course_show.html.erb | 12 ++---------- app/views/org_document_comments/show.html.erb | 12 ++---------- .../organizations/_org_course_homework.html.erb | 14 +++----------- .../organizations/_org_course_message.html.erb | 12 ++---------- .../organizations/_org_course_news.html.erb | 14 +++----------- .../organizations/_org_project_issue.html.erb | 12 ++---------- .../organizations/_org_subfield_message.html.erb | 12 ++---------- .../organizations/_org_subfield_news.html.erb | 12 ++---------- .../organizations/_project_message.html.erb | 12 ++---------- .../organizations/_show_org_document.html.erb | 12 ++---------- app/views/projects/_project_news.html.erb | 12 ++---------- app/views/users/_course_homework.html.erb | 12 ++---------- .../users/_course_journalsformessage.html.erb | 13 +++++++++---- app/views/users/_course_message.html.erb | 12 ++---------- app/views/users/_course_news.html.erb | 12 ++---------- app/views/users/_project_issue_reply.html.erb | 14 +++----------- app/views/users/_project_message.html.erb | 12 ++---------- app/views/users/_user_activities.html.erb | 12 ++++++------ app/views/users/_user_blog.html.erb | 12 ++---------- app/views/users/_user_homework_detail.html.erb | 12 ++---------- .../users/_user_journalsformessage.html.erb | 12 ++---------- 25 files changed, 69 insertions(+), 240 deletions(-) diff --git a/app/controllers/praise_tread_controller.rb b/app/controllers/praise_tread_controller.rb index 96eeab884..0c665341a 100644 --- a/app/controllers/praise_tread_controller.rb +++ b/app/controllers/praise_tread_controller.rb @@ -25,14 +25,14 @@ class PraiseTreadController < ApplicationController return end @horizontal = params[:horizontal].downcase == "false" ? false:true if params[:horizontal] - if @obj.respond_to?("author_id") - author_id = @obj.author_id - elsif @obj.respond_to?("user_id") - author_id = @obj.user_id - end - unless author_id == User.current.id - praise_tread_plus(@obj_type,@obj_id,1) - end + # if @obj.respond_to?("author_id") + # author_id = @obj.author_id + # elsif @obj.respond_to?("user_id") + # author_id = @obj.user_id + # end + # unless author_id == User.current.id + praise_tread_plus(@obj_type,@obj_id,1) + # end respond_to do |format| format.js end diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb index d3763abf3..288a02d56 100644 --- a/app/views/blog_comments/show.html.erb +++ b/app/views/blog_comments/show.html.erb @@ -122,11 +122,7 @@
回复 <%= count>0 ? "(#{count})" : "" %> - <% if @article.author == User.current %> - - <% else %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@article, :user_activity_id=>@article.id,:type=>"activity"}%> - <% end %>
@@ -162,12 +158,8 @@
<%= 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 %> - + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> + @@ -131,11 +127,7 @@ <%= format_time(reply.created_on) %> @@ -187,11 +183,7 @@ <%= format_time(reply.created_on) %> @@ -137,11 +133,7 @@ <%= format_time(reply.created_on) %> @@ -100,11 +96,7 @@
<%= format_time(reply.created_at) %> - <% if reply.creator_id.to_i == User.current.id.to_i %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<%if count>3 %> @@ -359,11 +355,7 @@
- <% if comment.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%= link_to( diff --git a/app/views/organizations/_org_course_message.html.erb b/app/views/organizations/_org_course_message.html.erb index e68745f7a..03e986716 100644 --- a/app/views/organizations/_org_course_message.html.erb +++ b/app/views/organizations/_org_course_message.html.erb @@ -74,11 +74,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#=format_date(activity.updated_on)%>
@@ -117,11 +113,7 @@ <% 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
diff --git a/app/views/organizations/_org_course_news.html.erb b/app/views/organizations/_org_course_news.html.erb index acf0f0377..8c260c21c 100644 --- a/app/views/organizations/_org_course_news.html.erb +++ b/app/views/organizations/_org_course_news.html.erb @@ -44,12 +44,8 @@
回复 <%= 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 %> - + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> +
<%#= format_date(activity.updated_on) %>
<%if count>3 %> @@ -86,11 +82,7 @@ <% end %> <%= format_time(comment.created_on) %> - <% if comment.author == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
diff --git a/app/views/organizations/_org_project_issue.html.erb b/app/views/organizations/_org_project_issue.html.erb index 9ca10c91d..94eb2820a 100644 --- a/app/views/organizations/_org_project_issue.html.erb +++ b/app/views/organizations/_org_project_issue.html.erb @@ -55,11 +55,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#= format_date(activity.updated_on) %>
@@ -97,11 +93,7 @@ <% end %> <%= format_time(reply.created_on) %> - <% if reply.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
diff --git a/app/views/organizations/_org_subfield_message.html.erb b/app/views/organizations/_org_subfield_message.html.erb index 61bc5bc7f..bcc43610e 100644 --- a/app/views/organizations/_org_subfield_message.html.erb +++ b/app/views/organizations/_org_subfield_message.html.erb @@ -84,11 +84,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%if count>3 %> @@ -122,11 +118,7 @@ <% 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
diff --git a/app/views/organizations/_org_subfield_news.html.erb b/app/views/organizations/_org_subfield_news.html.erb index 5d6c38542..662a965e9 100644 --- a/app/views/organizations/_org_subfield_news.html.erb +++ b/app/views/organizations/_org_subfield_news.html.erb @@ -64,11 +64,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#= format_date(activity.updated_on) %>
@@ -106,11 +102,7 @@ <% end %> <%= format_time(comment.created_on) %> - <% if comment.author == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
diff --git a/app/views/organizations/_project_message.html.erb b/app/views/organizations/_project_message.html.erb index e1b000c70..4407d86bd 100644 --- a/app/views/organizations/_project_message.html.erb +++ b/app/views/organizations/_project_message.html.erb @@ -57,11 +57,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#=format_date(activity.updated_on)%>
@@ -96,11 +92,7 @@ <% 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index e8f531206..3042ca9ae 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -69,11 +69,7 @@
回复 <%= count>0 ? "(#{count})" : "" %> - <% if document.creator_id.to_i == User.current.id.to_i %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%>
<% if count > 3 %> @@ -102,11 +98,7 @@ <%= link_to User.find(comment.creator_id), user_url_in_org(comment.creator_id), :class => "newsBlue mr10 f14" %> <%= format_activity_day(comment.created_at) %> <%= format_time(comment.created_at, false) %> - <% if comment.creator_id.to_i == User.current.id.to_i %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% unless comment.content.blank? %> diff --git a/app/views/projects/_project_news.html.erb b/app/views/projects/_project_news.html.erb index 6d97b252d..7baf93e4f 100644 --- a/app/views/projects/_project_news.html.erb +++ b/app/views/projects/_project_news.html.erb @@ -44,11 +44,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#= format_date(activity.updated_on) %>
@@ -86,11 +82,7 @@ <% end %> <%= format_time(comment.created_on) %> - <% if comment.author == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 3721244ed..e694f471e 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -296,11 +296,7 @@ ︿ <%= count>0 ? "(#{count})" : "" %> - <% if activity.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
@@ -365,11 +361,7 @@
- <% if comment.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%= link_to( diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index aeb7f5e5d..a76081859 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -33,10 +33,12 @@
<% count = fetch_user_leaveWord_reply(activity).count %>
-
-
-
- 回复(<%= count %>) +
+
回复 + <%= count>0 ? "(#{count})" : "" %> + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> +
<%if count>3 %> @@ -72,6 +74,9 @@ <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(comment.created_on) %> + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> +
<%= comment.notes.html_safe %> diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 8b6056309..c0e667396 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -91,11 +91,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#=format_date(activity.updated_on)%>
@@ -134,11 +130,7 @@ <% 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 19d62b14e..b89873b43 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -69,11 +69,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#= format_date(activity.updated_on) %>
@@ -111,11 +107,7 @@ <% end %> <%= format_time(comment.created_on) %> - <% if comment.author == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb index 5323b76b6..2b43d8acf 100644 --- a/app/views/users/_project_issue_reply.html.erb +++ b/app/views/users/_project_issue_reply.html.erb @@ -4,11 +4,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#= format_date(activity.updated_on) %>
@@ -46,12 +42,8 @@ <% end %> <%= format_time(reply.created_on) %> - <% if reply.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> - <% end %> - + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> +
<% if reply.details.any? %> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index b6e3f9a94..b3c2fea59 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -90,11 +90,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#=format_date(activity.updated_on)%>
@@ -129,11 +125,7 @@ <% 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 2fe7315d5..432074191 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -5,24 +5,24 @@ $(document).ready(function(){ $("#relateProject,.relatePInfo").mouseover(function(){ $(".relatePInfo").css("display","block"); - }) + }); $("#relateProject,.relatePInfo").mouseout(function(){ $(".relatePInfo").css("display","none"); - }) + }); $(".coursesLineGrey").mouseover(function(){ $(this).css("color","#ffffff"); - }) + }); $(".coursesLineGrey").mouseout(function(){ $(this).css("color","#808080"); - }) + }); $(".homepagePostSetting,.coursesLineGrey").mouseover(function(){ $(this).prev().css("color","#ffffff"); $(this).css("z-index", "9999"); - }) + }); $(".homepagePostSetting").mouseout(function(){ $(this).prev().css("color","#808080"); $(this).css("z-index", "1"); - }) + }); }) diff --git a/app/views/users/_user_blog.html.erb b/app/views/users/_user_blog.html.erb index de5ffc31f..522bdc835 100644 --- a/app/views/users/_user_blog.html.erb +++ b/app/views/users/_user_blog.html.erb @@ -50,11 +50,7 @@
回复 <%= 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 %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<%#= format_date(activity.updated_on) %>
@@ -92,11 +88,7 @@ <% end %> <%= format_time(comment.created_on) %> - <% if comment.author == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index f81fbabf5..650ced5dc 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -306,11 +306,7 @@ ︿ <%= count>0 ? "(#{count})" : "" %> - <% if homework_common.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>homework_common, :user_activity_id=>homework_common.id,:type=>"activity"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>homework_common, :user_activity_id=>homework_common.id,:type=>"activity"}%>
@@ -379,11 +375,7 @@
- <% if comment.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%= link_to( diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index 47d5145ac..6967bb398 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -64,11 +64,7 @@
回复 <%= count>0 ? "(#{count})" : "" %> - <% if activity.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
@@ -106,11 +102,7 @@ <% end %> <%= format_time(comment.created_on) %> - <% if comment.user == User.current %> - - <% else %> - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - <% end %> + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>