贴吧没数据的显示

This commit is contained in:
huang 2016-12-30 10:44:28 +08:00
parent fd291850ae
commit 6c86f655fd
3 changed files with 1 additions and 59 deletions

View File

@ -142,39 +142,6 @@ class ForumsController < ApplicationController
}# show.html.erb
format.json { render json: @forum }
end
# @offset, @limit = api_offset_and_limit({:limit => 10})
# @forums = Memo.all
#
# if(params[:reorder_complex])
# @type="reorder_complex"
# @str=params[:reorder_complex]
# @forums_all = Forum.reorder("topic_count #{params[:reorder_complex]},updated_at #{params[:reorder_complex]}")
# elsif(params[:reorder_popu])
# @type="reorder_popu"
# @str=params[:reorder_popu]
# @forums_all = Forum.reorder("topic_count #{params[:reorder_popu]}")
# elsif(params[:reorder_time])
# @type="reorder_time"
# @str=params[:reorder_time]
# @forums_all = Forum.reorder("updated_at #{params[:reorder_time]}")
# else
# params[:reorder_complex] = "desc"
# @type="reorder_complex"
# @str=params[:reorder_complex]
# @forums_all = Forum.reorder("topic_count desc,updated_at desc")
# end
# @forums_count = @forums_all.count
# @forums_pages = Paginator.new @forums_count, @limit, params['page']
#
# @offset ||= @forums_pages.offset
# @forums = @forums_all.offset(@offset).limit(@limit).all
# #@forums = Forum.all
# respond_to do |format|
# format.html{render :layout => 'base_new_forum'}
# format.js
# format.json { render json: @forums }
# end
end
# GET /forums/1

View File

@ -58,6 +58,6 @@
<%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true, :is_new => true %>
</ul>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<%= render :partial => "projects/no_data" %>
<% end %>
</div>

View File

@ -4,31 +4,6 @@
<div class="banner-big f16 fontGrey3 mb10"><%= link_to "问吧", forums_path, :class => "c_blue" %> > <%= @forum.name %></div>
<div class="postRightContainer mr10">
<div id="create_memo_div" style="display: none">
<div id="error" class="red fl mb10" style="display: none">error</div>
<%= labelled_form_for(@memo, :url => forum_memos_path(@forum), :remote => true) do |f| %>
<div>
<textarea type="text" name="memo[subject]" id="memo_subject" maxlength="50" onblur="check_memo_name();" onfocus="$('#error').hide();" onmouseover="this.style.borderColor='#d9d9d9'" class="postDetailInput" placeholder="输入帖子标题" ></textarea>
<script>
var textarea1 = document.getElementById('memo_subject');
autoTextarea(textarea1);
</script>
</div>
<div class="mt15">
<%= kindeditor_tag 'memo[content]','',:height=>300,:editor_id=>'memo_content'%>
</div>
<div class="mt10">
<!--<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>-->
<%= render :partial => 'file_form', :locals => {:container => @memo} %>
<div class="fr">
<a href="javascript:void(0);" class="submit_btn" onclick="check_and_submit();">确定</a>
</div>
<div class="fr"><a href="javascript:void(0);" class="linkGrey2 mr10" onclick="create_cancle();">取消</a><span class="mr10 fontGrey">或</span></div>
<div class="cl"></div>
</div>
<% end %>
</div>
<div class="postDetailBanner" style="padding-bottom: 10px">
<div class="postSort" id="time"><a href="javascript:void(0);" class="linkGrey2 fl">时间</a><a href="javascript:void(0);" id="reorder_time" class="sortArrowActiveD"></a></div>
<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>