- <% if activity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% end %> TO
+ <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
+ TO
<%= link_to activity.project.name.to_s+" | 项目新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#= format_date(activity.updated_on) %>
- <%if count>3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index 8de9b3dce..ee12c04dd 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -7,11 +7,8 @@
- <% if activity.try(:user).try(:realname) == ' ' %>
- <%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
- <% end %> TO
+ <%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
+ TO
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb
index 9ed7e6e76..85e0e9335 100644
--- a/app/views/users/_course_journalsformessage.html.erb
+++ b/app/views/users/_course_journalsformessage.html.erb
@@ -6,11 +6,8 @@
- <% if activity.try(:user).try(:realname) == ' ' %>
- <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
- <% end %> TO
+ <%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %>
+ TO
<% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
@@ -43,22 +40,7 @@
<% count = fetch_user_leaveWord_reply(activity).count %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
- <%if count>3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.children.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb
index 88fbcef6c..135013a62 100644
--- a/app/views/users/_course_message.html.erb
+++ b/app/views/users/_course_message.html.erb
@@ -6,11 +6,7 @@
- <% if activity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
- <% end %>
+ <%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
TO
<%= link_to activity.course.name.to_s+" | 课程问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
@@ -89,22 +85,7 @@
<% count=activity.children.count%>
<% end %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#=format_date(activity.updated_on)%>
- <%if count > 3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% activity= activity.parent ? activity.parent : activity%>
<% comments = activity.children.reorder("created_on desc").limit(3) %>
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb
index dd234ac90..efd3770aa 100644
--- a/app/views/users/_course_news.html.erb
+++ b/app/views/users/_course_news.html.erb
@@ -6,11 +6,8 @@
- <% if @ctivity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% end %> TO
+ <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
+ TO
<%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
@@ -67,22 +64,7 @@
<% count=activity.comments.count %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#= format_date(activity.updated_on) %>
- <%if count>3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb
index d1f7363a7..3dac8026a 100644
--- a/app/views/users/_project_issue_reply.html.erb
+++ b/app/views/users/_project_issue_reply.html.erb
@@ -1,21 +1,6 @@
<% count = activity.journals.count %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#= format_date(activity.updated_on) %>
- <% if count > 3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index 502706289..1abc36a31 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -6,11 +6,7 @@
- <% if activity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% end %>
+ <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
TO
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
@@ -88,18 +84,7 @@
<% count=activity.children.count%>
<% end %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#=format_date(activity.updated_on)%>
- <%if count>3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% comments = activity.children.reorder("created_on desc").limit(3) %>
diff --git a/app/views/users/_project_news.html.erb b/app/views/users/_project_news.html.erb
index 04edc05e0..cdceb490d 100644
--- a/app/views/users/_project_news.html.erb
+++ b/app/views/users/_project_news.html.erb
@@ -6,11 +6,8 @@
- <% if @ctivity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% end %> TO
+ <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
+ TO
<%= link_to activity.project.name.to_s+" | 新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
@@ -64,23 +61,8 @@
<% count=activity.comments.count %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#= format_date(activity.updated_on) %>
- <%if count>3 %>
-
- <% end %>
-
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
+
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/app/views/users/_reply_banner.html.erb b/app/views/users/_reply_banner.html.erb
new file mode 100644
index 000000000..0d7e0b2bd
--- /dev/null
+++ b/app/views/users/_reply_banner.html.erb
@@ -0,0 +1,18 @@
+
+
+ 回复
+ ︿
+ <%= count>0 ? "(#{count})" : "" %>▪
+
+ <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
+
+
+
<%#= format_date(activity.updated_on) %>
+ <%if count>3 %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/users/_user_blog.html.erb b/app/views/users/_user_blog.html.erb
index f0761ff78..77510c858 100644
--- a/app/views/users/_user_blog.html.erb
+++ b/app/views/users/_user_blog.html.erb
@@ -6,11 +6,8 @@
- <% if @ctivity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% end %> TO
+ <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
+ TO
<%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author_id), :class => "newsBlue ml15" %>
@@ -46,22 +43,7 @@
<% count=activity.children.count %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
<%#= format_date(activity.updated_on) %>
- <%if count>3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.children.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb
index b84adf5fe..dd36d1328 100644
--- a/app/views/users/_user_journalsformessage.html.erb
+++ b/app/views/users/_user_journalsformessage.html.erb
@@ -64,22 +64,7 @@
<% count=fetch_user_leaveWord_reply(activity).count %>
-
-
回复
- <%= count>0 ? "(#{count})" : "" %>▪
-
- <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
-
-
-
- <%if count>3 %>
-
- <% end %>
-
+ <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.children.reorder("created_on desc").limit(3) %>
<% if count > 0 %>
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 6c7bde896..74cbff5dd 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -1166,3 +1166,5 @@ a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px;
/*未登录回复提示*/
.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
+
+.reply_iconup{ position:absolute; top:21px; left:13px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
\ No newline at end of file