问吧首页点击“我要提问”,显示的页面有点不合适
This commit is contained in:
parent
eb5f5f9ede
commit
b9cb857025
|
@ -28,6 +28,7 @@ class MemosController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
# 如何是问吧主页来的,导航不显示具体贴吧名
|
||||
@memo = Memo.new
|
||||
@my_forums_count = Memo.where("author_id =? and parent_id is null", User.current.id).count
|
||||
@my_memos_count = Memo.where("author_id =? and parent_id is not null", User.current.id).count
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<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_memo_path(:forum_id => Forum.first.id), :class => "c_white db creatPostIcon bGreen" %>
|
||||
<%= link_to "发布新帖", new_forum_memo_path(:forum_id => Forum.first.id, :forum_index => true), :class => "c_white db creatPostIcon bGreen" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,9 @@
|
|||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#forums_question_"+<%= params[:forum_id] %>).addClass("wenba-tiwen-tag-active");
|
||||
<% if params[:forum_index] != 'true'%>
|
||||
$("#forums_question_"+<%= params[:forum_id] %>).addClass("wenba-tiwen-tag-active");
|
||||
<% end %>
|
||||
});
|
||||
function add_forum(id){
|
||||
$("#memo_classify_tips").attr('style','color: #333;');
|
||||
|
@ -104,7 +106,6 @@
|
|||
}else if(memo_content.isEmpty()){
|
||||
$("#memo_contents_error_tips").html("内容不能为空").show();
|
||||
}else if ($("#forum_name").attr('value')== ""){
|
||||
alert("请选择分类");
|
||||
$("#memo_classify_tips").attr('style','color: #F00;');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="banner-big f16 fontGrey3 mb10"><%= link_to "问吧", forums_path, :class => "c_blue" %> > <%= link_to @forum.name, forum_path(@forum), :class => "c_blue" %> > 我要提问</div>
|
||||
<div class="banner-big f16 fontGrey3 mb10"><%= link_to "问吧", forums_path, :class => "c_blue" %> <% if params[:forum_index] != 'true'%> > <%= link_to @forum.name, forum_path(@forum), :class => "c_blue" %> <% end %> > 我要提问</div>
|
||||
<%= labelled_form_for(@memo, :url => forum_memos_path(@forum)) do |f| %>
|
||||
<%= render :partial => "memos/form", :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue