forum index页面分页及排序
This commit is contained in:
parent
143e33a891
commit
9fcd5b48ed
|
@ -1,7 +1,7 @@
|
|||
|
||||
<% @forums.each_with_index do |forum, i| %>
|
||||
<div class="wenba-rightbar-li clearfix <%= i > 9 ? 'none' : ''%> " id="forum_list_<%= forum.id %>">
|
||||
<h4 class="fl wenba-rightbar-title mt5 ml5" style="border-bottom: 0px"><%= link_to forum.name, forum_path(forum), :class => "" %></h4>
|
||||
<h4 class="fl wenba-rightbar-title mt5 ml10" style="border-bottom: 0px"><%= link_to forum.name, forum_path(forum), :class => "" %></h4>
|
||||
<ul class=" fl right-line wenba-rightbar-ul" >
|
||||
<li><%= link_to forum.topic_count, forum_path(forum), :class => "linkGrey5" %></li>
|
||||
<li>回答</li>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="banner-big f16 fontGrey3 mb10">问吧</div>
|
||||
|
||||
<div class="postRightContainer mr10">
|
||||
<div class="postDetailBanner" style="padding-bottom: 10px">
|
||||
|
@ -9,12 +9,12 @@
|
|||
<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a><a href="javascript:void(0);" id="reorder_popu" class=""></a></div>
|
||||
<div class="postSort" id="complex"><a href="javascript:void(0);" class="linkGrey2 fl">综合</a><a href="javascript:void(0);" id="reorder_complex" class=""></a><!--<a href="javascript:void(0);" class="sortArrowActiveD"></a>--></div>
|
||||
<div class="creatPost" id="create_memo_btn">
|
||||
<%= link_to "发布新帖", new_forum_path(@forums), :class => "c_white db creatPostIcon bBlue", :remote => true %>
|
||||
<%= link_to "发布新帖", new_forum_path(@forum), :class => "c_white db creatPostIcon bBlue", :remote => true %>
|
||||
<!--<a href="javascript:void(0);" class="c_white db creatPostIcon bBlue" onclick="$('#error').hide();$('#create_memo_div').slideToggle();$(this).parent().slideToggle();">发布新帖</a>-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="topics_list">
|
||||
<div id="forum_list">
|
||||
<%= render :partial => 'show_topics',:locals => {:memos => @memos} %>
|
||||
</div>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
|
||||
<div class="postDetailContainer mb10 fl" style="width: 208px;">
|
||||
<div class="fl mr10"><%= link_to image_tag(url_to_avatar(User.current),:width=>50,:height => 50,:alt=>'贴吧图像' ), user_path( User.current) %></div>
|
||||
<div class="fl mr10"><%= link_to image_tag(url_to_avatar(User.current), :width => 50, :height => 50,:alt=>'贴吧图像' ), user_path( User.current) %></div>
|
||||
<div class="fl">
|
||||
<div class="f16 fontGrey2 ml38">我在贴吧</div>
|
||||
<div class="homepageImageBlock" style="width: 68px !important;">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//$("#postBanner").html("<%#= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str }%>");
|
||||
$("#forum_list").html("<%= escape_javascript(render :partial => 'forum_list',:locals => {:forums=>@forums}) %>");
|
||||
$("#forum_list").html("<%= escape_javascript(render :partial => 'show_topics', :locals => {:memos => @memos}) %>");
|
||||
//这里出现一个问题竟然是单双引号引起的。注意!!
|
||||
$("#pages").html('<%= pagination_links_full @forums_pages, @forums_count,:per_page_links => false,:remote =>true,:flag=>true%>');
|
||||
$("#pages").html('<%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true, :is_new => true %>');
|
|
@ -3,9 +3,9 @@
|
|||
.wenba-h3-top{ font-size: 14px; color: #666; }
|
||||
.wenba-rightbar-top{ height: 40px; line-height: 40px; border-bottom:1px solid #ddd; }
|
||||
.wenba-rightbar-li{ padding:10px 0; border-bottom:1px solid #ddd; color: #666;}
|
||||
.wenba-rightbar-title{ font-size: 14px; width: 140px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.wenba-rightbar-title{ font-size: 14px; width: 145px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.right-line{ border-right:1px solid #ddd;}
|
||||
.wenba-rightbar-ul{ width: 45px; text-align: center;}
|
||||
.wenba-rightbar-ul{ width: 40px; text-align: center;}
|
||||
.wenba-rightbar-more{ padding:10px 0 ; text-align: center; display: block;}
|
||||
.wenba-tiwenbox{border: 1px solid #ddd;background-color:#fff; width: 718px; padding:15px;}
|
||||
.wenba-tiwen-con{ width: 100%; }
|
||||
|
|
Loading…
Reference in New Issue