新注册用户(或资料不全的用户),进入的首页“基本资料”编辑页,导航栏显示新版

This commit is contained in:
daiao 2017-01-17 16:12:01 +08:00
parent 1c32c47d49
commit b1a71d12a9
4 changed files with 17 additions and 9 deletions

View File

@ -225,12 +225,7 @@ class MyController < ApplicationController
File.delete(diskfile1) if File.exist?(diskfile1)
end
# 基本资料不完善,无法使用其他功能,完善着可继续使用
if @force
render :layout => 'new_base_user_show'
else
render :layout => 'new_base_user'
end
end
# Destroys user's account

View File

@ -86,7 +86,7 @@
</li>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post"%>
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post", :id => "logout_trustie" %>
</li>
</ul>
</li>

View File

@ -16,8 +16,8 @@
<%= f.text_area :subject, :id=>"subject", :class => "opnionText mb5", :placeholder => l(:label_feedback_tips) %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<span class="c_grey fl ml10">还能输入<span id="textCount" class="c_orange">50</span>个字符</span>
<a href="javascript:void(0);" class="linkBlue f12 fr mr10" style="height:21px;" id="" onclick="f_submit();">
<%= l(:label_submit)%>
<a href="javascript:void(0);" class="linkBlue f12 fr mr10" style="height:21px;" id="inquiry_question" onclick="f_submit();">
<%= l(:label_submit) %>
</a>
<div class="cl"></div>
<% end %>

View File

@ -64,7 +64,6 @@
})
</script>
</head>
<body onload="prettyPrint();">
<div class="navContainer">
<% is_current_user = User.current.logged? && User.current == @user %>
@ -291,6 +290,20 @@
$("#projectMenu").mouseleave(function(){
$("#topnav_project_menu").hide();
});
// 如果是强制修改资料页面,则除退出按钮外,其他按钮的连接都失效
<% if @force %>
// 禁用所有a标签
var t = document.getElementsByTagName("a");
len = t.length;
for(var i=0;i<len;i++){
t[i].href = 'javascript:void(0)';
}
// 退出按钮可用
var d = document.getElementById("logout_trustie");
d.href='<%= logout_url_without_domain %>';
// 提问按钮不可用
document.getElementById('inquiry_question').onclick = function (){return false;};
<% end %>
</script>
</body>
</html>