From 5a4f422b1cce2804d4b9299bca6fc73b20d2b94a Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Mar 2016 16:44:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_at_message.html.erb | 14 ++++++++++---- app/views/users/_user_message_course.html.erb | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/views/users/_user_at_message.html.erb b/app/views/users/_user_at_message.html.erb index c4a257358..dd5ffbe56 100644 --- a/app/views/users/_user_at_message.html.erb +++ b/app/views/users/_user_at_message.html.erb @@ -5,10 +5,16 @@ <%= ma.author.login %>提到了你:
  • - <%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course, :parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id), - :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", - :onmouseover =>"message_titile_show($(this),event)", - :onmouseout => "message_titile_hide($(this))" %>
  • + <% if ma.at_message_type == "Message" %> + <%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course, + :parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id), + :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", + :onmouseover =>"message_titile_show($(this),event)", + :onmouseout => "message_titile_hide($(this))" %> + <% else %> + <%= link_to ma.subject.html_safe, ma.url, :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %> + <% end %> +