面包屑-作业

dev_forum
hjm 5 years ago
parent ad7938d80f
commit b9d48c420a

@ -145,6 +145,7 @@ class CommonWorkDetailIndex extends Component{
, end_immediately, publish_immediately, work_statuses, accessoryVisible , end_immediately, publish_immediately, work_statuses, accessoryVisible
} =this.state; } =this.state;
const { current_user } = this.props
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id= category && category.category_id; let category_id= category && category.category_id;
@ -197,15 +198,15 @@ class CommonWorkDetailIndex extends Component{
background: #fff; background: #fff;
} }
`}</style> `}</style>
<CBreadcrumb items={[ {current_user && <CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: course_name}, { to: current_user.first_category_url , name: course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name }, { to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name },
window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' }, window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' },
// 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名” // 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名”
window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name }, window.location.pathname.indexOf('appraise') == -1 ? { name: '作业详情' } : { name: author_name },
// window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' }, // window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作品列表' },
// { name: childModuleName } // { name: childModuleName }
]}></CBreadcrumb> ]}></CBreadcrumb>}
<div style={{ width:'100%',height:'52px'}} > <div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`} <span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}

@ -481,6 +481,7 @@ render(){
course_name, homework_name, course_name, homework_name,
memberNumMax, memberNumMin memberNumMax, memberNumMin
} =this.state; } =this.state;
const { current_user } = this.props
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let workId=this.props.match.params.workId; let workId=this.props.match.params.workId;
@ -522,7 +523,6 @@ render(){
const moduleName = this.props.getModuleName() const moduleName = this.props.getModuleName()
const moduleCHName = this.props.getModuleName(true) const moduleCHName = this.props.getModuleName(true)
const isGroup = this.props.isGroup() const isGroup = this.props.isGroup()
const { current_user } = this.props;
return( return(
<React.Fragment> <React.Fragment>
@ -540,7 +540,7 @@ render(){
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/${moduleName}/${category ? category.category_id : ''}`} className="color-grey-6">{course_name}</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={ current_user && current_user.first_category_url} className="color-grey-6">{course_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/${moduleName}/${workId}`} className="color-grey-6">{moduleCHName}</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={`/courses/${courseId}/${moduleName}/${workId}`} className="color-grey-6">{moduleCHName}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>

@ -313,6 +313,7 @@ class NewWork extends Component{
init_max_num, init_min_num, init_max_num, init_min_num,
title_num, course_name, category, has_commit, has_project title_num, course_name, category, has_commit, has_project
}=this.state }=this.state
const { current_user } = this.props
const courseId = this.state.course_id || this.props.match.params.coursesId ; const courseId = this.state.course_id || this.props.match.params.coursesId ;
const isEdit = this.isEdit; const isEdit = this.isEdit;
@ -369,7 +370,7 @@ class NewWork extends Component{
<span>{pageType==="new"?"新建":"编辑"}</span> <span>{pageType==="new"?"新建":"编辑"}</span>
</p> */} </p> */}
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: this.state.course_name}, { to: current_user.first_category_url, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}` { to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name }, , name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` } { name: `${ this.isEdit ? '编辑' : '新建'}` }

@ -59,7 +59,7 @@ class WorkDetailPageHeader extends Component{
const dateFormat = 'YYYY-MM-DD HH:mm'; const dateFormat = 'YYYY-MM-DD HH:mm';
let {course_name, homework_name, search, page, loadingstate, homework_status, description, noTab let {course_name, homework_name, search, page, loadingstate, homework_status, description, noTab
, view_answer, author_name, category, work_id , view_answer, author_name, category, work_id, current_user
} =this.props; } =this.props;
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
@ -89,7 +89,7 @@ class WorkDetailPageHeader extends Component{
} }
`}</style> `}</style>
<CBreadcrumb items={[ <CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: course_name}, { to: current_user.first_category_url, name: course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name }, { to: `/courses/${courseId}/${moduleEngName}/${category_id}`, name: category_name },
window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' }, window.location.pathname.indexOf('appraise') == -1 ? { } : { to: `/courses/${courseId}/${moduleEngName}/${workId}/list`, name: '作业详情' },
// 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名” // 1. 与上一条联动当匿评他人作品时TA人作品的作者真实姓名切换为“匿名”

Loading…
Cancel
Save