|
|
|
@ -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>
|
|
|
|
|