|
|
|
<div class="reg_pass" id="backImg">
|
|
|
|
<div class="educontent realheight" id="realheight">
|
|
|
|
<div class="clearfix font-16 mb30 title_detail">
|
|
|
|
<a href="<%= home_path %>" class="none"><img src="/images/educoder/logo.png" class="fl"/></a>
|
|
|
|
<span class="fr">
|
|
|
|
<% if @require_trail_auth %>
|
|
|
|
<a href="javascript:void(0)" onclick="apply_trial_box()" class="color-blue">试用申请</a>
|
|
|
|
<% else %>
|
|
|
|
<a href="<%= home_path %>" class="color-blue">返回首页</a>
|
|
|
|
<% end %>
|
|
|
|
<em class="vertical-line ml5 mr5"></em>
|
|
|
|
<a href="<%= signout_path %>" class="color-blue">退出</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="account_main pb15">
|
|
|
|
<div class="account_title account_safe mb15">账号管理</div>
|
|
|
|
<div class="clearfix padding15-25">
|
|
|
|
<p class="account_left color-grey-9 edu-txt-right pr20">昵称</p>
|
|
|
|
<p class="account_middle edu-txt-left">
|
|
|
|
<span class="color-grey-4d mr15" id="user_nickname"><%= @user.nickname %></span>
|
|
|
|
<%#= @user.user_extensions.try(:location) %><%#= @user.user_extensions.try(:location_city) %>
|
|
|
|
</p>
|
|
|
|
<p class="account_right"><a href="javascript:void(0)" onclick="reNickname();" class="default_btn edu-blueback-btn">修改</a></p>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix padding15-25">
|
|
|
|
<p class="account_left color-grey-9">邮箱账号</p>
|
|
|
|
<% if @user.mail.blank? %>
|
|
|
|
<p class="account_middle edu-txt-left color-grey-4d">未绑定</p>
|
|
|
|
<p class="account_right"><a href="<%= change_or_bind_path(:type => 'mail') %>" class="default_btn edu-blueback-btn">绑定</a></p>
|
|
|
|
<% else %>
|
|
|
|
<p class="account_middle edu-txt-left color-grey-4d">可以使用安全邮箱<span class="ml10 mr10"><%= @user.mail %></span>登录</p>
|
|
|
|
<p class="account_right"><a href="<%= change_or_bind_path(:type => 'mail') %>" class="default_btn edu-blueback-btn">更换</a></p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix padding15-25">
|
|
|
|
<p class="account_left color-grey-9">手机账号</p>
|
|
|
|
<% if @user.phone.blank? %>
|
|
|
|
<p class="account_middle edu-txt-left color-grey-4d">未绑定</p>
|
|
|
|
<p class="account_right"><a href="<%= change_or_bind_path(:type => 'phone') %>" class="default_btn edu-blueback-btn">绑定</a></p>
|
|
|
|
<% else %>
|
|
|
|
<p class="account_middle edu-txt-left color-grey-4d">可以使用手机<span class="ml10 mr10"><%= @user.user_phone %></span>登录
|
|
|
|
<% if @user.mail.blank? %>
|
|
|
|
<a href="javascript:void(0);" onclick="op_confirm_box('<%= unbind_phone_path() %>', '未绑定邮箱的情况下解绑手机,将导致该账号被注销,无法继续使用<br/>是否确定解绑')" class="color-blue fr">解绑</a>
|
|
|
|
<% else %>
|
|
|
|
<a href="javascript:void(0);" onclick="op_confirm_box('<%= unbind_phone_path() %>', '解绑后该账号只能通过邮箱登录<br/>是否确定解绑')" class="color-blue fr">解绑</a>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<p class="account_right">
|
|
|
|
<a href="<%= change_or_bind_path(:type => 'phone') %>" class="default_btn edu-blueback-btn">更改</a>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix padding15-25">
|
|
|
|
<p class="account_left color-grey-9">实名信息</p>
|
|
|
|
<% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 1).last %>
|
|
|
|
<input type="hidden" value="<%= @user.id %>" id="user_current_id">
|
|
|
|
<p class="account_middle edu-txt-left">
|
|
|
|
<span class="color-grey-4d mr15 fl"><%= @user.lastname.blank? ? "--" : @user.lastname %></span>
|
|
|
|
<% unless @user.lastname.blank? %>
|
|
|
|
<span class="fl">
|
|
|
|
<input class="magic-checkbox" id="hide_realname" <%= @user.show_realname ? "" : "checked" %> type="checkbox"/>
|
|
|
|
<label for="hide_realname" data-tip-down="<%= !@user.show_realname ? '显示真实姓名' : '隐藏真实姓名' %>" style="top:0px;color: #999">隐藏</label>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<p class="account_right">
|
|
|
|
<a href="<%= authentication_account_path %>" class="default_btn edu-blueback-btn"><%= @user.authentication || (apply_auth && apply_auth.status == 0) ? "查看" : "修改" %></a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix padding15-25">
|
|
|
|
<p class="account_left color-grey-9">职业信息</p>
|
|
|
|
<% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 2).last %>
|
|
|
|
<p class="account_middle edu-txt-left color-grey-4d">
|
|
|
|
<%= @user.user_extensions.school ? @user.user_extensions.school.try(:name) : '--' %><em class="vertical-line ml5 mr5"></em>
|
|
|
|
<%= @user.user_extensions.show_identity.blank? ? "--" : @user.user_extensions.show_identity %><em class="vertical-line ml5 mr5"></em>
|
|
|
|
<%= @user.user_extensions.user_technical_title.blank? ? "--" : @user.user_extensions.user_technical_title %>
|
|
|
|
</p>
|
|
|
|
<p class="account_right">
|
|
|
|
<a href="<%= professional_certification_account_path %>" class="default_btn edu-blueback-btn"><%= @user.professional_certification || (apply_auth && apply_auth.status == 0) ? "查看" : "修改" %></a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix padding15-25">
|
|
|
|
<p class="account_left color-grey-9">登录密码</p>
|
|
|
|
<p class="account_middle edu-txt-left color-grey-4d">密码要求包含字母,建议您经常修改密码,以保证账号更加安全</p>
|
|
|
|
<p class="account_right"><a href="<%= change_psd_path %>" class="default_btn edu-blueback-btn">修改</a></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<%= render :partial => "account/copyright_info" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(function () {
|
|
|
|
<% if @require_trail_auth %>
|
|
|
|
var html = "<%= escape_javascript(render :partial => 'welcome/two_btn_mask_pop') %>";
|
|
|
|
pop_box_new(html, 500, 338,true);
|
|
|
|
<% if @certification_expired.present? %>
|
|
|
|
$("#apply_trial_text").html("您的账号授权已过期,继续使用需要经过授权审核<br>通过审核后,您将可以继续使用");
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if @noticed_result %>
|
|
|
|
<% if @trail_authentication.status == 1 %>
|
|
|
|
sure_box_redirect_without_newtab("<%= user_path(@user) %>", "试用申请已被接受");
|
|
|
|
<% elsif @trail_authentication.status == 2 %>
|
|
|
|
sure_box_redirect_without_newtab_btn("<%= my_account_path %>", "试用申请已被拒绝<br/>原因:<%= @trail_authentication.reason %>", "重新申请");
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% notice = SystemUpdateNotice.last %>
|
|
|
|
<% if User.current.certification == 1 && notice.present? && notice.end_time > Time.now && notice.start_time >= (Time.now - 21600) && User.current.user_system_notices.where(:notice_type => notice.notice_type).count == 0 %>
|
|
|
|
var htmlvalue = "<%= escape_javascript(render :partial => 'account/user_update_notice', :locals => {:notice => notice})%>";
|
|
|
|
pop_box_new(htmlvalue, 500, 380);
|
|
|
|
<% UserSystemNotice.create(:user_id => User.current.id, :notice_type => notice.notice_type) %>
|
|
|
|
<% end %>
|
|
|
|
});
|
|
|
|
|
|
|
|
function apply_trial_box(){
|
|
|
|
var html = "<%= escape_javascript(render :partial => 'welcome/two_btn_mask_pop') %>";
|
|
|
|
pop_box_new(html, 500, 338,true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//修改昵称
|
|
|
|
function reNickname(){
|
|
|
|
var html="<%= escape_javascript(render :partial => 'welcome/update_nickname') %>";
|
|
|
|
pop_box_new(html, 400, 120,false);
|
|
|
|
$("#update_user_nickname_form input").val($("#user_nickname").html());
|
|
|
|
}
|
|
|
|
</script>
|