From 370b1ee2343cbd8f5679cd7bffb3aa18b7717891 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 10:35:34 +0800 Subject: [PATCH 1/8] css --- .../src/modules/courses/boards/TopicDetail.js | 37 +++++++++++++------ .../modules/courses/common/courseMessage.css | 2 +- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 1ef880c9f..5d4a434a5 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -227,15 +227,30 @@ class TopicDetail extends Component { // filesize = bytesToSize(item.filesize) } attachments.push( -
-
-
- {fileName &&
{this.isEdit ? "编辑" : "新建"}试卷
this.props.history.goBack()}>
+ onClick={() => this.props.history.length == 1 ? this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`): this.props.history.goBack()}>
返回
+
{this.isEdit ? "编辑" : "新建"}帖子
this.props.history.goBack()}>
diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js
index 607a2dc82..eefbc1f0b 100644
--- a/public/react/src/modules/courses/busyWork/NewWork.js
+++ b/public/react/src/modules/courses/busyWork/NewWork.js
@@ -373,7 +373,7 @@ class NewWork extends Component{
{ name: `${ this.isEdit ? '编辑' : '新建'}` }
]}>
-
+
{this.isEdit ?"编辑":"新建"}{ moduleName }
{/* history.goBack()
this.props.toListPage(this.props.match.params, category.category_id)}
diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js
index b17e8288c..8bc7ed6ae 100644
--- a/public/react/src/modules/courses/exercise/ExerciseNew.js
+++ b/public/react/src/modules/courses/exercise/ExerciseNew.js
@@ -405,7 +405,7 @@ class ExerciceNew extends Component{
{ name: this.isEdit ? '编辑试卷' : '新建试卷'}
]}>
-
+
{this.isEdit ? "编辑" : "新建"}试卷
this.props.history.length == 1 ? this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`): this.props.history.goBack()}>
From 6995de1523182422013b2c58bca9cb223619458e Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 21 Jun 2019 15:08:09 +0800
Subject: [PATCH 4/8] cs
---
.../modules/courses/boards/BoardsListItem.js | 42 ++++++++++---------
.../courses/busyWork/CommonWorkItem.js | 10 ++++-
2 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js
index c25c541e8..2a6aaae2f 100644
--- a/public/react/src/modules/courses/boards/BoardsListItem.js
+++ b/public/react/src/modules/courses/boards/BoardsListItem.js
@@ -1,7 +1,7 @@
import React,{ Component } from "react";
import {Tooltip} from 'antd'
import moment from 'moment'
-import { getUrl } from 'educoder'
+import { getUrl, WordsBtn } from 'educoder'
class BoardsListItem extends Component{
constructor(props){
super(props);
@@ -61,34 +61,37 @@ class BoardsListItem extends Component{
-
+
- {discussMessage.author.name}
+ {discussMessage.author.name}
- { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 }
- { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 }
- { discussMessage.visits != 0 && {discussMessage.visits} 浏览 }
+ { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 }
+ { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 }
+ { discussMessage.visits != 0 && {discussMessage.visits} 浏览 }
- {moment(discussMessage.created_on).fromNow()}
+ {moment(discussMessage.created_on).fromNow()}
- {/* 最后回复社区导师10个月前 */}
- 82
- 1
- 4
-
{item.commit_count===undefined?"":{item.commit_count} 已交}
@@ -184,6 +184,12 @@ class CommonWorkItem extends Component{
{item.status_time}
}
+
+ {this.props.isAdmin &&
- {/*