2015-12-17 15:14:52 +08:00
|
|
|
<% if AtMessage === ma && ma.at_valid? %>
|
2015-12-16 16:37:00 +08:00
|
|
|
<ul class="homepageNewsList fl">
|
2015-12-17 15:14:52 +08:00
|
|
|
<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>
|
2015-12-16 16:37:00 +08:00
|
|
|
<li class="homepageNewsPubType fl">
|
2015-12-17 15:14:52 +08:00
|
|
|
<span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span>
|
2015-12-16 16:37:00 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl">
|
2016-03-09 17:22:16 +08:00
|
|
|
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
2016-03-09 16:44:11 +08:00
|
|
|
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
|
2016-03-09 17:22:16 +08:00
|
|
|
: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))" %>
|
|
|
|
<% 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-09 16:44:11 +08:00
|
|
|
: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 %>
|
|
|
|
</li>
|
2015-12-16 16:37:00 +08:00
|
|
|
<div style="display: none" class="message_title_red system_message_style">
|
2015-12-17 15:14:52 +08:00
|
|
|
<p><strong>标题:</strong><%= ma.subject %></p>
|
|
|
|
<% unless ma.description.nil? %>
|
2015-12-16 16:37:00 +08:00
|
|
|
<div class="fl"><strong>内容:</strong></div>
|
2015-12-17 15:14:52 +08:00
|
|
|
<div class="ml36"><%= ma.description.html_safe %></div>
|
2015-12-16 16:37:00 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|