|
|
@ -261,18 +261,21 @@ class NewHeader extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
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){
|
|
|
|
window.location.href = "/login";
|
|
|
|
window.location.href = "/login";
|
|
|
|
}else{
|
|
|
|
return
|
|
|
|
if(sum===1){
|
|
|
|
}else if(this.state.current_user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){
|
|
|
|
window.location.href = "/courses/new";
|
|
|
|
window.location.href = "/login";
|
|
|
|
}else if(sum===2){
|
|
|
|
return
|
|
|
|
window.location.href = "/shixuns/new";
|
|
|
|
|
|
|
|
}else if(sum===3){
|
|
|
|
|
|
|
|
window.location.href = "/paths/new";
|
|
|
|
|
|
|
|
}else if(sum===4){
|
|
|
|
|
|
|
|
window.location.href = "/projects/new";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(sum===1){
|
|
|
|
|
|
|
|
window.location.href = "/courses/new";
|
|
|
|
|
|
|
|
}else if(sum===2){
|
|
|
|
|
|
|
|
window.location.href = "/shixuns/new";
|
|
|
|
|
|
|
|
}else if(sum===3){
|
|
|
|
|
|
|
|
window.location.href = "/paths/new";
|
|
|
|
|
|
|
|
}else if(sum===4){
|
|
|
|
|
|
|
|
window.location.href = "/projects/new";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|