|
|
|
@ -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',
|
|
|
|
@ -144,8 +149,16 @@ class Contentpart extends Component {
|
|
|
|
|
<Tabs defaultActiveKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
|
|
|
|
|
<TabPane tab="公共" key="1">
|
|
|
|
|
</TabPane>
|
|
|
|
|
{
|
|
|
|
|
isysladmins===true?
|
|
|
|
|
<TabPane tab="我的" key="0">
|
|
|
|
|
</TabPane>
|
|
|
|
|
:is_teacher===true&&professional_certification===true?
|
|
|
|
|
<TabPane tab="我的" key="0">
|
|
|
|
|
</TabPane>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</Tabs>
|
|
|
|
|
|
|
|
|
|
<div className=" mt19" style={{
|
|
|
|
@ -181,11 +194,20 @@ class Contentpart extends Component {
|
|
|
|
|
<div className="xaxisreverseorder">
|
|
|
|
|
{
|
|
|
|
|
defaultActiveKey===0||defaultActiveKey==="0"?
|
|
|
|
|
isysladmins===true?
|
|
|
|
|
<a onClick={(e)=>this.xinzenw(e)}>
|
|
|
|
|
<div className="newbutoon">
|
|
|
|
|
<p className="newbutoontes" >新增</p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
:
|
|
|
|
|
is_teacher===true&&professional_certification===true?
|
|
|
|
|
<a onClick={(e)=>this.xinzenw(e)}>
|
|
|
|
|
<div className="newbutoon">
|
|
|
|
|
<p className="newbutoontes" >新增</p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
:""
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -208,7 +230,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
|
|
|
|
|