|
|
|
@ -259,9 +259,9 @@ class NewHeader extends Component {
|
|
|
|
|
|
|
|
|
|
NewCoursesAndShixuns=(sum)=>{
|
|
|
|
|
|
|
|
|
|
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){
|
|
|
|
|
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null||this.props.current_user&&this.props.current_user=== ""){
|
|
|
|
|
window.location.href = "/login";
|
|
|
|
|
}else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user===null){
|
|
|
|
|
}else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user=== ""){
|
|
|
|
|
window.location.href = "/login";
|
|
|
|
|
}else if(sum===1){
|
|
|
|
|
window.location.href = "/courses/new";
|
|
|
|
@ -478,8 +478,8 @@ class NewHeader extends Component {
|
|
|
|
|
<div className="overPart"></div>
|
|
|
|
|
<ul className="fl with50 edu-txt-center pr ul-leftline">
|
|
|
|
|
{
|
|
|
|
|
this.props.user&&this.props.user.is_student=== true||this.props.current_user&&this.props.current_user.is_student==true?"":
|
|
|
|
|
<li><a onClick={()=>this.NewCoursesAndShixuns(1)}>新建课堂</a></li>
|
|
|
|
|
this.props.user&&this.props.user.is_student=== false || this.props.current_user&&this.props.current_user.is_student==false?
|
|
|
|
|
<li><a onClick={()=>this.NewCoursesAndShixuns(1)}>新建课堂</a></li>:""
|
|
|
|
|
}
|
|
|
|
|
<li><a onClick={()=>this.NewCoursesAndShixuns(2)}>新建实训</a></li>
|
|
|
|
|
<li><a onClick={()=>this.NewCoursesAndShixuns(3)}>新建实践课程</a></li>
|
|
|
|
|