|
|
|
@ -82,6 +82,11 @@ class Contentpart extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
let {page}=this.state;
|
|
|
|
|
let {defaultActiveKey,item_type,booljupyterurls}=this.props;
|
|
|
|
|
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
|
|
|
|
|
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
|
|
|
|
|
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const content = (
|
|
|
|
|
<div className="questiontypes" style={{
|
|
|
|
|
width:'93px',
|
|
|
|
@ -115,8 +120,6 @@ class Contentpart extends Component {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const buttonWidth = 70;
|
|
|
|
|
//console.log("Contentpart");
|
|
|
|
|
//console.log(this.props);
|
|
|
|
|
return (
|
|
|
|
|
<div className=" clearfix mt25">
|
|
|
|
|
<div className="educontent mt10 pb20 w1200s">
|
|
|
|
@ -141,12 +144,23 @@ class Contentpart extends Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Tabs defaultActiveKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
|
|
|
|
|
<TabPane tab="公共" key="1">
|
|
|
|
|
</TabPane>
|
|
|
|
|
<TabPane tab="我的" key="0">
|
|
|
|
|
</TabPane>
|
|
|
|
|
</Tabs>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
isysladmins===true||(is_teacher===true&&professional_certification===true)?
|
|
|
|
|
<Tabs activeKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
|
|
|
|
|
<TabPane tab="公共" key="1">
|
|
|
|
|
</TabPane>
|
|
|
|
|
<TabPane tab="我的" key="0">
|
|
|
|
|
</TabPane>
|
|
|
|
|
</Tabs>
|
|
|
|
|
:
|
|
|
|
|
<Tabs activeKey={1} onChange={(e)=>this.props.callback(e)}>
|
|
|
|
|
<TabPane tab="公共" key="1">
|
|
|
|
|
</TabPane>
|
|
|
|
|
</Tabs>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className=" mt19" style={{
|
|
|
|
|
position:"absolute",
|
|
|
|
@ -181,11 +195,13 @@ class Contentpart extends Component {
|
|
|
|
|
<div className="xaxisreverseorder">
|
|
|
|
|
{
|
|
|
|
|
defaultActiveKey===0||defaultActiveKey==="0"?
|
|
|
|
|
<a onClick={(e)=>this.xinzenw(e)}>
|
|
|
|
|
<div className="newbutoon">
|
|
|
|
|
<p className="newbutoontes" >新增</p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
isysladmins===true||(is_teacher===true&&professional_certification===true)?
|
|
|
|
|
<a onClick={(e)=>this.xinzenw(e)}>
|
|
|
|
|
<div className="newbutoon">
|
|
|
|
|
<p className="newbutoontes" >新增</p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
:""
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -208,7 +224,7 @@ class Contentpart extends Component {
|
|
|
|
|
{
|
|
|
|
|
defaultActiveKey===0||defaultActiveKey==="0"?
|
|
|
|
|
<Search
|
|
|
|
|
style={{ marginRight:"30px"}}
|
|
|
|
|
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"30px"}:{marginRight:"0px"}}
|
|
|
|
|
className={"xaxisreverseorder searchwidth"}
|
|
|
|
|
placeholder="请输入题目名称、内容"
|
|
|
|
|
enterButton
|
|
|
|
|