34 lines
2.2 KiB
Plaintext
34 lines
2.2 KiB
Plaintext
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
|
|
<ul class="homepageNewsList fl">
|
|
<div class="longMessageWidth">
|
|
<li class="homepageNewsPortrait fl">
|
|
<%= link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"), user_path(ma.author) %>
|
|
</li>
|
|
<li class="homepageNewsPubType fl">
|
|
<span class="newsBlue homepageNewsPublisher">
|
|
<%= link_to ma.author.show_name, user_path(ma.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
</span><span class="homepageNewsType fl">提到了你:</span>
|
|
</li>
|
|
<li class="messageInformationContents">
|
|
<% 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),
|
|
:title => "#{ma.subject.html_safe}",
|
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
|
|
<% 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),
|
|
:title => "#{ma.subject.html_safe}",
|
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
|
|
<% else %>
|
|
<%= link_to ma.subject.html_safe, ma.url,
|
|
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
|
:title => "#{ma.subject.html_safe}" %>
|
|
<% end %>
|
|
</li>
|
|
</div>
|
|
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %> |