socialforge/app/views/users/_user_message_forum.html.erb

41 lines
2.6 KiB
Plaintext

<% if ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
</li>
<% if ma.memo.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.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">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<% unless ma.memo.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.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">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<% unless ma.memo.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>