user_message

enter course message ,username need to be realname
This commit is contained in:
lizanle 2015-10-30 17:32:50 +08:00
parent 55db83d31c
commit 732e4e1017
1 changed files with 2 additions and 2 deletions

View File

@ -554,14 +554,14 @@
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您增加了新的课程成员:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to User.find(ma.course_message_id), user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
<%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
<p>您增加了新的课程成员,详情如下:</p>
<p>成员:<%= User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login %></p>
<p>成员:<%= User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")" %></p>
<p>课程名称:<%= ma.course.name %></p>
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
<p>课程ID<%= ma.course.id %></p>