Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_home
cxt 5 years ago
commit d09e141ab0

@ -1,7 +1,8 @@
import React,{ Component } from "react";
import {Tooltip} from 'antd'
import moment from 'moment'
import { getUrl, WordsBtn } from 'educoder'
import { getUrl, WordsBtn, ConditionToolTip } from 'educoder'
import './boardsListItem.css';
class BoardsListItem extends Component{
constructor(props){
super(props);
@ -75,6 +76,16 @@ class BoardsListItem extends Component{
</Tooltip>) : ""
}
</h6>
<div className="fr">
{(isAdmin || discussMessage.author.login == current_user.login) &&
<WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}>
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
</div>
<div className="cl"></div>
<p className="color-grey panel-lightgrey mt18 fl">
@ -88,20 +99,20 @@ class BoardsListItem extends Component{
<span className="mr15 color-light-grey-C font-14">{moment(discussMessage.created_on).fromNow()} </span>
</span>
</p>
<div className="fr mt15">
{(isAdmin || discussMessage.author.login == current_user.login) &&
<WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}>
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
</div>
{
discussMessage.category_name &&
<div className={'directory_style'}>
<ConditionToolTip title={discussMessage.category_name} condition={discussMessage.category_name}>
{ <div className=" color-grey9 task-hide fr"
style={{"maxWidth":"216px"}}
title={discussMessage.category_name}>
所属目录{discussMessage.category_name}
</div>
}
</ConditionToolTip>
</div>
}
{/* { (isAdmin || discussMessage.author.login == current_user.login) &&
<div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}>
<ul>

@ -0,0 +1,9 @@
.directory_style {
position: absolute;
right: 0;
bottom: 0;
maxSize: 20px;
overflow: hidden;
whiteSpace: nowrap;
textOverflow: ellipsis
}

@ -386,8 +386,8 @@ class Boards extends Component{
{
boards && boards.filter((item)=> {
return item.id != bid && (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
}).map( (item) => {
return <li onClick={() => this.moveTo(item)} title={item.name}>{item.name}</li>
}).map( (item, index) => {
return <li key={`i_${index}`} onClick={() => this.moveTo(item)} title={item.name}>{item.name}</li>
})
}
{ isAdmin && !isCourseEnd &&
@ -427,7 +427,7 @@ class Boards extends Component{
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{ messages.map((item, index) => {
return (
<div className="mt20 edu-back-white padding02010">
<div className="mt20 edu-back-white padding02010" key={`d_${index}`}>
<BoardsListItem
{...this.props}
discussMessage={item}

Loading…
Cancel
Save