|
|
@ -305,12 +305,11 @@ class NewHeader extends Component {
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
activeIndex = true;
|
|
|
|
activeIndex = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(this.props.user&&this.props.user.is_student=== true||this.props.current_user&&this.props.current_user.is_student==true)
|
|
|
|
|
|
|
|
// console.log(this.state.current_user)
|
|
|
|
console.log(this.props.user&&this.props.user.is_student=== true||this.props.current_user&&this.props.current_user.is_student==true)
|
|
|
|
|
|
|
|
console.log(this.state.current_user)
|
|
|
|
|
|
|
|
// console.log(match.path.startsWith("/ec_courses"))
|
|
|
|
// console.log(match.path.startsWith("/ec_courses"))
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="newHeader" id="nHeader">
|
|
|
|
<div className="newHeader" id="nHeader">
|
|
|
|
|
|
|
|
|
|
|
@ -401,51 +400,52 @@ class NewHeader extends Component {
|
|
|
|
<li className={`${activeForums === true ? 'active' : ''}`}><a href="/forums">交流问答</a></li>
|
|
|
|
<li className={`${activeForums === true ? 'active' : ''}`}><a href="/forums">交流问答</a></li>
|
|
|
|
<li className={`${activeCourses === true ? 'active' : ''}`} style={{display:ecUrl===null||ecUrl===undefined||ecUrl===""?'none':'block'}}><a href={ecUrl}>{ecUrl===null||ecUrl===undefined||ecUrl===""?'':'工程认证'}</a></li>
|
|
|
|
<li className={`${activeCourses === true ? 'active' : ''}`} style={{display:ecUrl===null||ecUrl===undefined||ecUrl===""?'none':'block'}}><a href={ecUrl}>{ecUrl===null||ecUrl===undefined||ecUrl===""?'':'工程认证'}</a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
<style>
|
|
|
|
|
|
|
|
{
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{/*<span className="font-15 fr mt17">
|
|
|
|
|
|
|
|
<%= link_to '登录', signin_path, :className => "mr5" %>
|
|
|
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
|
|
|
<%= link_to '注册', user_join_path, :className => "ml5" %>
|
|
|
|
|
|
|
|
</span>*/}
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
`
|
|
|
|
.marf28{
|
|
|
|
.marf28{
|
|
|
|
margin-right: -28px;
|
|
|
|
margin-right: -28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
<div className="posi-search marf28" id="posi-search" style={{display: 'none'}}>
|
|
|
|
<div className="posi-search marf28" id="posi-search" style={{display: 'none'}}>
|
|
|
|
<div className="search-all clearfix">
|
|
|
|
<div className="search-all clearfix">
|
|
|
|
{/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/}
|
|
|
|
{/*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">×</a>-->*/}
|
|
|
|
<div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}>
|
|
|
|
<div className="fl pr search-clear edu-menu-panel" style={{display: 'none'}}>
|
|
|
|
<input type="hidden" id="search_type" value="1"></input>
|
|
|
|
<input type="hidden" id="search_type" value="1"></input>
|
|
|
|
<span className="searchkey">实训</span>
|
|
|
|
<span className="searchkey">实训</span>
|
|
|
|
<i className="fa fa-angle-down ml5 font-16"></i>
|
|
|
|
<i className="fa fa-angle-down ml5 font-16"></i>
|
|
|
|
<ul id="searchkey" className="edu-menu-list edu-txt-center" style={{minWidth: '80px',right: '-10px',top: '50px'}}>
|
|
|
|
<ul id="searchkey" className="edu-menu-list edu-txt-center" style={{minWidth: '80px',right: '-10px',top: '50px'}}>
|
|
|
|
<li><a href="javascript:void(0)">实训</a></li>
|
|
|
|
<li><a href="javascript:void(0)">实训</a></li>
|
|
|
|
<li><a href="javascript:void(0)">课堂</a></li>
|
|
|
|
<li><a href="javascript:void(0)">课堂</a></li>
|
|
|
|
<li><a href="javascript:void(0)">用户</a></li>
|
|
|
|
<li><a href="javascript:void(0)">用户</a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<input type="text" className="search-input fl" id="search-input" name="search_keyword" placeholder="实践课程/翻转课堂/开发社区/交流问答"/>
|
|
|
|
<input type="text" className="search-input fl" id="search-input" name="search_keyword" placeholder="实践课程/翻转课堂/开发社区/交流问答"/>
|
|
|
|
<a href="javascript:void(0)" className="search-icon fl" id="header_keyword_search">
|
|
|
|
<a href="javascript:void(0)" className="search-icon fl" id="header_keyword_search">
|
|
|
|
{/*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*/}
|
|
|
|
{/*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*/}
|
|
|
|
<i className="iconfont icon-sousuo color-blue"></i>
|
|
|
|
<i className="iconfont icon-sousuo color-blue"></i>
|
|
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
{/* TODO 需要服务端接口提供最近搜索
|
|
|
|
{/* TODO 需要服务端接口提供最近搜索
|
|
|
|
<div class="search-content none" style="width: 86%;left: 0px;">
|
|
|
|
<div class="search-content none" style="width: 86%;left: 0px;">
|
|
|
|
<div class="search-title">最近搜索</div>
|
|
|
|
<div class="search-title">最近搜索</div>
|
|
|
|
<div><a href="javascript:void(0)" class="search_history">绿盟</a></div>
|
|
|
|
<div><a href="javascript:void(0)" class="search_history">绿盟</a></div>
|
|
|
|
<div><a href="javascript:void(0)" class="search_history">qwe</a></div>
|
|
|
|
<div><a href="javascript:void(0)" class="search_history">qwe</a></div>
|
|
|
|
</div>*/}
|
|
|
|
</div>*/}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*<span className="font-15 fr mt17">
|
|
|
|
|
|
|
|
<%= link_to '登录', signin_path, :className => "mr5" %>
|
|
|
|
|
|
|
|
<em className="vertical-line"></em>
|
|
|
|
|
|
|
|
<%= link_to '注册', user_join_path, :className => "ml5" %>
|
|
|
|
|
|
|
|
</span>*/}
|
|
|
|
|
|
|
|
<div style={{display:isLogin===true?'block':'none'}}>
|
|
|
|
<div style={{display:isLogin===true?'block':'none'}}>
|
|
|
|
<div className="fr edu-menu-panel" style={{height:'60px'}}>
|
|
|
|
<div className="fr edu-menu-panel mr10" style={{height:'60px'}}>
|
|
|
|
<a href={`/users/${current_user.login}`} className="fl">
|
|
|
|
<a href={`/users/${current_user.login}`} className="fl">
|
|
|
|
<img alt="头像" className="radius mt13" height="34" id="nh_user_logo" nhname="avatar_image"
|
|
|
|
<img alt="头像" className="radius mt13" height="34" id="nh_user_logo" nhname="avatar_image"
|
|
|
|
src={`/images/${current_user.image_url}`} width="34">
|
|
|
|
src={`/images/${current_user.image_url}`} width="34">
|
|
|
@ -554,7 +554,7 @@ class NewHeader extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
*/}
|
|
|
|
*/}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|