|
|
|
@ -1087,43 +1087,42 @@ class NewHeader extends Component {
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
<%= link_to '注册', user_join_path, :className => "ml5" %>
|
|
|
|
|
</span>*/}
|
|
|
|
|
{
|
|
|
|
|
user === undefined ?
|
|
|
|
|
<span className="font-15 fr mt17 ml5 mr25">
|
|
|
|
|
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
<a href={"/register"} className="mr5 color-white">注册</a>
|
|
|
|
|
</span> : user.login === "" ? <span className="font-15 fr mt17 ml5 mr25">
|
|
|
|
|
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
<a href={"/register"} className="mr5 color-white">注册</a>
|
|
|
|
|
</span> :
|
|
|
|
|
<div className="fr edu-menu-panel mr25" style={{ height: '60px' }}>
|
|
|
|
|
<a href={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`} className="fl ml15">
|
|
|
|
|
<img alt="头像" className="radius mt13" height="34" id="nh_user_logo" name="avatar_image"
|
|
|
|
|
src={getImageUrl(`images/` + user.image_url)} width="34">
|
|
|
|
|
</img>
|
|
|
|
|
</a>
|
|
|
|
|
<ul className="edu-menu-list" style={{ top: '60px' }}>
|
|
|
|
|
{/*<span className="bor-bottom-greyE currentName task-hide">{user.username}</span>*/}
|
|
|
|
|
<li><Link to={`/users/${this.props.current_user.login}/courses`}>我的个人主页</Link></li>
|
|
|
|
|
{coursestypes === true ? "" : <li><Link to={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}>{this.props.user && this.props.user.main_site === false ? "我的课堂" : "我的教学课堂"}</Link></li>}
|
|
|
|
|
{/* p 老师 l 学生 */}
|
|
|
|
|
{shixuntype === true ? "" : <li><Link to={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>}
|
|
|
|
|
{pathstype === true ? "" : <li><Link to={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/paths`}>{this.props.user && this.props.user.main_site === false ? "我的课程" : "我的实践课程"}</Link></li>}
|
|
|
|
|
{this.props.user && this.props.user.main_site === true ? <li><Link to={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/projects`}>我的开发项目</Link></li> : ""}
|
|
|
|
|
{/*<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>*/}
|
|
|
|
|
<li style={{ display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url === null || this.props.Headertop.customer_management_url === "" ? 'none' : 'block' }}>
|
|
|
|
|
<a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a>
|
|
|
|
|
</li>
|
|
|
|
|
{
|
|
|
|
|
this.props.Headertop && this.props.Headertop.college_identifier &&
|
|
|
|
|
<li><a href={`/colleges/${this.props.Headertop.college_identifier}/statistics`}>学院统计</a></li>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
this.props.Headertop && this.props.Headertop.laboratory_user &&
|
|
|
|
|
<li><a href={this.props.Headertop.laboratory_admin_url}>后台管理</a></li>
|
|
|
|
|
}
|
|
|
|
|
{ user===undefined?
|
|
|
|
|
<span className="font-15 fr mt20 ml5 mr25">
|
|
|
|
|
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
<a href={"/register"} className="mr5 color-white">注册</a>
|
|
|
|
|
</span> :user.login===""?<span className="font-15 fr mt20 ml5 mr25">
|
|
|
|
|
<a onClick={()=>this.educoderlogin()} className="mr5 color-white">登录</a>
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
<a href={"/register"} className="mr5 color-white">注册</a>
|
|
|
|
|
</span>:
|
|
|
|
|
<div className="fr edu-menu-panel mr25" style={{height:'60px'}}>
|
|
|
|
|
<a href={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`} className="fl ml15">
|
|
|
|
|
<img alt="头像" className="radius mt13" height="34" id="nh_user_logo" name="avatar_image"
|
|
|
|
|
src={getImageUrl(`images/`+user.image_url)} width="34">
|
|
|
|
|
</img>
|
|
|
|
|
</a>
|
|
|
|
|
<ul className="edu-menu-list" style={{top:'60px'}}>
|
|
|
|
|
{/*<span className="bor-bottom-greyE currentName task-hide">{user.username}</span>*/}
|
|
|
|
|
<li><Link to={`/users/${this.props.current_user.login}/courses`}>我的个人主页</Link></li>
|
|
|
|
|
{coursestypes===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>{this.props.user&&this.props.user.main_site===false?"我的课堂":"我的教学课堂"}</Link></li>}
|
|
|
|
|
{/* p 老师 l 学生 */}
|
|
|
|
|
{shixuntype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>}
|
|
|
|
|
{pathstype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>{this.props.user&&this.props.user.main_site===false?"我的课程":"我的实践课程"}</Link></li>}
|
|
|
|
|
{this.props.user&&this.props.user.main_site===true?<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的开发项目</Link></li>:""}
|
|
|
|
|
{/*<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>*/}
|
|
|
|
|
<li style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url===null || this.props.Headertop.customer_management_url===""? 'none' : 'block'}}>
|
|
|
|
|
<a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a>
|
|
|
|
|
</li>
|
|
|
|
|
{
|
|
|
|
|
this.props.Headertop && this.props.Headertop.college_identifier &&
|
|
|
|
|
<li><a href={`/colleges/${this.props.Headertop.college_identifier}/statistics`}>学院统计</a></li>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
this.props.Headertop && this.props.Headertop.laboratory_user &&
|
|
|
|
|
<li><a href={this.props.Headertop.laboratory_admin_url}>后台管理</a></li>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<li><a href={`/account/profile`}>账号管理</a></li>
|
|
|
|
|
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
|
|
|
|
@ -1135,15 +1134,24 @@ class NewHeader extends Component {
|
|
|
|
|
{/*<a onClick={()=>this.educoderlogin()} >登录</a>*/}
|
|
|
|
|
<a onClick={() => this.educoderloginysl()}>退出</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
{/*href="https://www.educoder.net/login"*/}
|
|
|
|
|
<div className="fr head-right">
|
|
|
|
|
{/*{ loadHeader()}*/}
|
|
|
|
|
{showSearchOpentype === true ? "" : this.props.user && this.props.user.main_site === true ? <a id="search-open" className="fl mr30 headIcon" onClick={(e) => this.showSearchOpen(e)}>
|
|
|
|
|
{/*"/images/educoder/icon/search.svg"
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
{/*href="https://www.educoder.net/login"*/}
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.yslheadIcon{
|
|
|
|
|
padding-top: 18px!important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="fr head-right">
|
|
|
|
|
{/*/!*{ loadHeader()}*!/padding-top: 16px!important;*/}
|
|
|
|
|
{showSearchOpentype===true?"":this.props.user&&this.props.user.main_site===true?<a id="search-open" className="fl mr30 headIcon yslheadIcon" onClick={(e)=>this.showSearchOpen(e)}>
|
|
|
|
|
{/*"/images/educoder/icon/search.svg"
|
|
|
|
|
<img src={getImageUrl(`images/educoder/icon/search.svg`)} /> */}
|
|
|
|
|
|
|
|
|
|
<i className="iconfont icon-sousuo color-white"></i>
|
|
|
|
|