|
|
@ -104,6 +104,7 @@ class CommonWorkItem extends Component{
|
|
|
|
let coursesId = this.props.match.params.coursesId;
|
|
|
|
let coursesId = this.props.match.params.coursesId;
|
|
|
|
|
|
|
|
|
|
|
|
const isStudent = this.props.isStudent()
|
|
|
|
const isStudent = this.props.isStudent()
|
|
|
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
const isAdminOrStudent = this.props.isAdminOrStudent()
|
|
|
|
const isAdminOrStudent = this.props.isAdminOrStudent()
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div className="workList">
|
|
|
|
<div className="workList">
|
|
|
@ -128,19 +129,20 @@ class CommonWorkItem extends Component{
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
|
|
|
|
mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
|
|
|
|
|
|
|
|
let canNotLink = !isAdminOrStudent && item.private_icon == true
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div className="mt20 edu-back-white padding02010" key={index} >
|
|
|
|
<div className="mt20 edu-back-white padding02010" key={index} >
|
|
|
|
<div className="clearfix">
|
|
|
|
<div className="clearfix">
|
|
|
|
<div className="workList_Item">
|
|
|
|
<div className="workList_Item">
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mainList && mainList.course_identity < 5 &&
|
|
|
|
mainList && isAdmin &&
|
|
|
|
<span className="fl mr12"><Checkbox value={item.homework_id}></Checkbox></span>
|
|
|
|
<span className="fl mr12"><Checkbox value={item.homework_id}></Checkbox></span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
|
|
|
|
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
|
|
|
|
<p className="clearfix mb20">
|
|
|
|
<p className="clearfix mb20">
|
|
|
|
<a title={item.name}
|
|
|
|
<a title={item.name}
|
|
|
|
className="fl font-16 font-bd mt2 comnonwidth580"
|
|
|
|
className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'normal' : 'poninter'}}
|
|
|
|
onClick={() => this.onItemClick(item)}
|
|
|
|
onClick={canNotLink ? () => {} : () => this.onItemClick(item)}
|
|
|
|
>{item.name}</a>
|
|
|
|
>{item.name}</a>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
|
|
|
|
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
|
|
|
@ -155,7 +157,7 @@ class CommonWorkItem extends Component{
|
|
|
|
<CoursesListType typelist={item.status} />
|
|
|
|
<CoursesListType typelist={item.status} />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mainList && mainList.course_identity < 5 &&
|
|
|
|
mainList && isAdmin &&
|
|
|
|
<li className="fr drop_down">
|
|
|
|
<li className="fr drop_down">
|
|
|
|
<i className="iconfont icon-caidan font-16 color-grey-c"></i>
|
|
|
|
<i className="iconfont icon-caidan font-16 color-grey-c"></i>
|
|
|
|
<ul className="drop_down_normal" style={{ textAlign: 'center'}}>
|
|
|
|
<ul className="drop_down_normal" style={{ textAlign: 'center'}}>
|
|
|
|