From 6ce9d01ffbf786083c45d08a5fd0078378b32ba2 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Thu, 14 Nov 2019 17:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E6=A8=A1=E5=9D=97=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=89=80=E5=B1=9E=E7=9B=AE=E5=BD=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/boards/BoardsListItem.js | 41 ++++++++++++------- .../modules/courses/boards/boardsListItem.css | 9 ++++ .../react/src/modules/courses/boards/index.js | 6 +-- 3 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 public/react/src/modules/courses/boards/boardsListItem.css diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 2b9c05126..0df7675a3 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -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{ ) : "" } + +
+ {(isAdmin || discussMessage.author.login == current_user.login) && + { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } + + { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> + { discussMessage.sticky ? '取消置顶' : '置顶' } } +

@@ -88,20 +99,20 @@ class BoardsListItem extends Component{ {moment(discussMessage.created_on).fromNow()}

-
- {(isAdmin || discussMessage.author.login == current_user.login) && - { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } - - { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> - { discussMessage.sticky ? '取消置顶' : '置顶' } } -
- - - - - + { + discussMessage.category_name && +
+ + {
+ 所属目录:{discussMessage.category_name} +
+ } +
+
+ } + {/* { (isAdmin || discussMessage.author.login == current_user.login) &&