2016-03-11 14:39:17 +08:00
|
|
|
<% if AtMessage === ma && ma.at_valid? %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
<span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
|
|
|
<%= 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),
|
2016-03-17 15:09:08 +08:00
|
|
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
|
|
|
|
<!--# :onmouseover =>"message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
2016-03-11 14:39:17 +08:00
|
|
|
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
|
|
|
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
|
|
|
|
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
|
2016-03-17 15:09:08 +08:00
|
|
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
|
|
|
|
<!--# :onmouseover =>"message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
2016-03-11 14:39:17 +08:00
|
|
|
<% 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 %>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
2015-12-16 16:37:00 +08:00
|
|
|
<% end %>
|