|
|
|
@ -258,6 +258,7 @@ class CCommentItem extends Component{
|
|
|
|
|
const isAnonymous = homework_status && homework_status.indexOf('匿评中') != -1
|
|
|
|
|
const isAppealing = homework_status && homework_status.indexOf('申诉中') != -1
|
|
|
|
|
const attachments = item.attachments;
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="ccomment comment_item_cont df clearfix" key={item.id}>
|
|
|
|
@ -302,23 +303,29 @@ class CCommentItem extends Component{
|
|
|
|
|
{item.score !== null && <span className="score_area fl">{item.score}分</span>}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* !item.is_invalid && */}
|
|
|
|
|
{/* { item.delete && <Tooltip title={ "删除" } >
|
|
|
|
|
{/* item.is_invalid && */}
|
|
|
|
|
{/* { item.delete && isAdmin && <Tooltip title={ "删除" } >
|
|
|
|
|
<i className="iconfont icon-shanchu mr5 fr" style={{marginLeft: '6px'}}
|
|
|
|
|
onClick={() => this.props.onDelete(item)}>
|
|
|
|
|
</i>
|
|
|
|
|
</Tooltip>} */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* fr */}
|
|
|
|
|
{/* <WordsBtn style="blue" className="fr">回复</WordsBtn> */}
|
|
|
|
|
{ item.is_invalid ? <span className="validate_area fr">失效</span> :
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<WordsBtn style="blue" className="fr" onClick={this.state.show_reply ? this.cancelReply : this.showReply}>回复</WordsBtn>
|
|
|
|
|
{(isAppealing || isAnonymous) && item.can_appeal && item.appeal_status == 0 && <WordsBtn style="blue" className="fr mr20" onClick={this.state.show_appeal ? this.cancelAppeal : this.showAppeal}>申诉</WordsBtn>}
|
|
|
|
|
|
|
|
|
|
{(isAppealing || isAnonymous) && item.can_appeal && item.appeal_status == 0 &&
|
|
|
|
|
<WordsBtn style="blue" className="fr mr20" onClick={this.state.show_appeal ? this.cancelAppeal : this.showAppeal}>申诉</WordsBtn>}
|
|
|
|
|
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
{item.delete && isAdmin
|
|
|
|
|
&& <WordsBtn style="blue" className="fr mr12"
|
|
|
|
|
onClick={() => this.props.onDelete(item)}>删除</WordsBtn>}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|