63 lines
3.8 KiB
Plaintext
63 lines
3.8 KiB
Plaintext
<div style="padding-top: 10px">
|
|
<% if memos.any? %>
|
|
<% memos.each do |topic| %>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
showNormalImage('postDetailDes_<%= topic.id %>');
|
|
autoUrl('postDetailDes_<%= topic.id %>');
|
|
if($("#intro_content_<%= topic.id %>").height() > 300) {
|
|
$("#intro_content_show_<%= topic.id %>").show();
|
|
}
|
|
$("#intro_content_show_<%= topic.id %>").click(function(){
|
|
$("#postDetailDes_<%= topic.id %>").toggleClass("maxh300");
|
|
$("#intro_content_show_<%= topic.id %>").hide();
|
|
$("#intro_content_hide_<%= topic.id %>").show();
|
|
});
|
|
$("#intro_content_hide_<%= topic.id %>").click(function(){
|
|
$("#postDetailDes_<%= topic.id %>").toggleClass("maxh300");
|
|
$("#intro_content_hide_<%= topic.id %>").hide();
|
|
$("#intro_content_show_<%= topic.id %>").show();
|
|
});
|
|
});
|
|
</script>
|
|
<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 fl">
|
|
<a href="<%= forum_memo_path(topic.forum, topic) %>" class="f14 linkGrey4 fb"><%=topic.subject%></a>
|
|
</div>
|
|
<div class="postDetailReply fr">
|
|
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
|
|
<% replies_count = Memo.where("root_id = #{topic.id}").count %>
|
|
<%= link_to (replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
|
|
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
|
|
</div>
|
|
|
|
<div class="postDetailDes maxh300" id = "postDetailDes_<%= topic.id %>">
|
|
<div id="intro_content_<%= topic.id %>">
|
|
<%= topic.content.html_safe%>
|
|
</div>
|
|
</div>
|
|
<div id="intro_content_show_<%= topic.id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
|
<div id="intro_content_hide_<%= topic.id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
|
<div class="cl"></div>
|
|
<% author = topic.last_reply.try(:author)%>
|
|
<% if author%>
|
|
<div class="postDetailCreater">最后回复:<a href="<%= user_path(author) %>" class="linkBlue2" target="_blank"><%= author.show_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="cl"></div>
|
|
</div>
|
|
<% end %>
|
|
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
|
<%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true, :is_new => true %>
|
|
</ul>
|
|
<% else %>
|
|
<%= render :partial => "projects/no_data" %>
|
|
<% end %>
|
|
</div> |