- {
- projectDetail && projectDetail.forked_from_project_id ?
-
-
-
- : ""
- }
{projectDetail && projectDetail.author && projectDetail.author.name}
/
@@ -312,6 +305,9 @@ class Detail extends Component{
{
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
+
+
+
forked from
{projectDetail.fork_info.fork_project_user_name}
@@ -327,7 +323,9 @@ class Detail extends Component{
- - -1 || urlFlag) ? "active" : ""}>
代码库
+ - -1 || urlFlag) ? "active" : ""}>
+
代码库
+
- -1 && !(url.indexOf("Milepost")>0 || url.indexOf("meilpost")>0 || url.indexOf("tags")>0))? "active" : ""}>
任务{projectDetail&&projectDetail.issues_count===0?"":projectDetail&&projectDetail.issues_count===0?projectDetail.issues_count:""}
- -1 ? "active" : ""}>
合并请求{projectDetail&&projectDetail.pull_requests_count===0?"":projectDetail&&projectDetail.pull_requests_count===0?projectDetail.pull_requests_count:""}
- -1 ? "active" : ""}>
版本发布
diff --git a/src/forge/Main/list.css b/src/forge/Main/list.css
index 747648ed0..14998df94 100644
--- a/src/forge/Main/list.css
+++ b/src/forge/Main/list.css
@@ -492,14 +492,16 @@ body,#root{
margin-top: 25px;
}
.commonBox .commonBox-title{
- padding:10px 15px;
+ padding:3px 15px;
box-sizing: border-box;
- font-size: 18px;
+ font-size: 15px;
background: #f0f0f0;
+ font-weight: bold;
}
.commonBox .commonBox-info{
padding:20px 15px;
}
+.commonBox-title-read{vertical-align: middle;}
@media screen and (max-width: 370px){
.p-r-tags,.p-r-btn{
diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index a0942179f..f1367f941 100644
--- a/src/forge/Merge/MessageCount.js
+++ b/src/forge/Merge/MessageCount.js
@@ -5,12 +5,12 @@ import axios from 'axios';
import Nav from '../Order/Nav';
import UploadComponent from '../Upload/Index';
import { getImageUrl } from 'educoder';
-import {Modal, Form, Input, Tooltip, Popconfirm, Pagination , Spin,Dropdown,Icon,Menu} from 'antd'
+import {Modal, Form, Input, Tooltip, Popconfirm, Pagination, Spin, Dropdown, Icon, Menu, Select} from 'antd'
import Attachments from '../Upload/attachment'
import './merge.css';
import QuillForEditor from '../quillForEditor';
import MergeSubmit from './MergeSubmit';
-
+const Option = Select.Option;
const TextArea = Input.TextArea;
const options = [
@@ -49,7 +49,12 @@ class MessageCount extends Component{
body:'',
commentsContent:undefined,
quillFlag:false,
- SpinFlag:true
+ SpinFlag:true,
+ editMerge: false,
+ issue_tag_ids: undefined,
+ issue_chosen: undefined,
+ fixed_version_id: undefined,
+ assigned_to_id: undefined
}
}
@@ -318,6 +323,52 @@ class MessageCount extends Component{
}
}
+ handleSubmit=()=>{
+ const { fileList } = this.state;
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if(!err){
+ const { projectsId , mergeId } = this.props.match.params;
+ const url = `/projects/${projectsId}/pull_requests/${mergeId}/simple_update.json`;
+
+ if(values.issue_tag_ids===''){
+ values.issue_tag_ids = []
+ }else{
+
+ }
+
+ if(values.assigned_to_id===0){
+ values.assigned_to_id = ""
+ }
+ axios.post(url,{
+ ...values
+ }).then(result=>{
+ if(result){
+ this.setState({
+ editMerge:false
+ })
+ this.props.showNotification(result.data.message);
+ }
+
+ }).catch(error=>{
+ console.log(error);
+ })
+
+ }
+ })
+ }
+
+ renderSelect=(list)=>{
+ if(list && list.length >0){
+ return(
+ list.map((item,key)=>{
+ return(
+
+ )
+ })
+ )
+ }
+ }
+
// 翻页
ChangePage=(page)=>{
@@ -329,12 +380,25 @@ class MessageCount extends Component{
this.getjournalslist(page,limit);
}
getOption=(e)=>{
- this.setState({
- mergename:e.item.props.value,
- mergekey:e.key,
- title:'',
- body:''
- })
+ if(e.key === "rebase"){
+ this.setState({
+ mergename:e.item.props.value,
+ mergekey:e.key,
+ title:'',
+ body:'',
+ buttonshow:'block'
+ })
+ }else{
+ this.setState({
+ mergename:e.item.props.value,
+ mergekey:e.key,
+ title:'',
+ body:'',
+ ismesrge:'block',
+ buttonshow:'block'
+ })
+ }
+
}
changeComments=(value)=>{
@@ -347,6 +411,29 @@ class MessageCount extends Component{
})
}
}
+ cancelSubmit=()=>{
+ this.setState({
+ editMerge: false
+ })
+ }
+
+ change_to_edit=()=>{
+ const { projectsId , mergeId} = this.props.match.params;
+ const url = `/projects/${projectsId}/pull_requests/${mergeId}/edit.json`;
+ axios.get(url).then((result)=>{
+ if(result){
+ this.setState({
+ issue_chosen:result.data.issue.issue_chosen,
+ issue_tag_ids: result.data.issue.issue_tags && result.data.issue.issue_tags[0].id,
+ fixed_version_id: result.data.issue.fixed_version_id,
+ assigned_to_id: result.data.issue.assigned_to_id,
+ editMerge: true
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
stringJson=(value) =>{
let _value = null;
@@ -378,12 +465,65 @@ class MessageCount extends Component{
render(){
const { projectsId,mergeId } = this.props.match.params;
- const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , commentsContent , quillFlag } = this.state;
+ const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , commentsContent , quillFlag, editMerge, issue_tag_ids, issue_chosen,fixed_version_id,assigned_to_id } = this.state;
const { getFieldDecorator } = this.props.form;
const { current_user } = this.props;
const url = this.props.history.location.pathname;
+ const editMergeForm =()=>{
+ return(
+
+
+ {getFieldDecorator('issue_tag_ids', {
+ initialValue: issue_tag_ids ? [issue_tag_ids] : '',
+ rules: [],
+ })(
+
+ )}
+
+
+ {getFieldDecorator('fixed_version_id', {
+ initialValue: fixed_version_id ? fixed_version_id : "",
+ rules: [],
+ })(
+
+ )}
+
+
+
+ {getFieldDecorator('assigned_to_id', {
+ initialValue: assigned_to_id ? assigned_to_id : "",
+ })(
+
+ )}
+
+
+ 保存
+ 取消
+
+
+
+ )
+ }
+
+
const menu = (