socialforge/app/views/forums/_show_topics.html.erb

33 lines
2.0 KiB
Plaintext

<div style="padding-top: 10px">
<% if memos.any? %>
<% memos.each do |topic| %>
<div class="postDetailRow">
<div class="postDetailPortrait">
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>-->
<%= link_to image_tag(url_to_avatar(topic.author), :width => 50,:height => 50,:alt => '贴吧图片'), user_path(topic.author) if topic.author%>
</div>
<div class="postDetailWrap">
<div class="postDetailTitle"><a href="<%= forum_memo_path(topic.forum, topic) %>" class="f14 linkGrey4 fb"><%=topic.subject%></a></div>
<div class="postDetailDes"><%= topic.content.html_safe%>
<!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>-->
</div>
<% author = topic.last_reply.try(:author)%>
<% if author%>
<div class="postDetailCreater">最后回复:<a href="<%= user_path(author) %>" class="linkBlue2" target="_blank"><%= author.name%></a></div>
<div class="postDetailDate"><%= format_date(topic.last_reply.created_at)%></div>
<% end%>
<span class=" fr" style="color: #888888; font-size: 12px;">更新时间:<%= format_date(topic.updated_at)%></span>
</div>
<div class="postDetailReply">
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10 mt20" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
</div>
<div class="cl"></div>
</div>
<% end %>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>