dev_aliyun2
杨树明 5 years ago committed by harry
parent 869f5bdced
commit e054e2dfb4

@ -368,9 +368,9 @@ class Repository extends Component {
{/* })}*/}
{/*</div>*/}
{/*{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?*/}
{/* <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}><Icon type="delete" /></Button>:""}*/}
{/*<div className={"both"}></div>*/}
{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
<Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}>删除</Button>:""}
<div className={"both"}></div>
<style>
{
@ -385,11 +385,11 @@ class Repository extends Component {
<DirectoryTree
className={"reposanttreeswitcher"}
// multiple
multiple
defaultExpandAll
// checkable
checkable={ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?true:false}
onSelect={this.onSelectDirectoryTree}
// onCheck={this.onCheck}
onCheck={this.onCheck}
>
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
return (

@ -76,6 +76,24 @@ class RepositoryAddFile extends Component {
}
componentDidMount(){
if(this.props.newathArray){
if(this.props.newathArray.length>0){
let newfilspath="";
let list=this.props.newathArray;
list.map((item,key)=>{
if(key===0){
newfilspath=item;
}else{
newfilspath=newfilspath+'/'+item;
}
})
this.props.form.setFieldsValue({
path:newfilspath,
});
}
}
let cmOptions = createCMOptions(this.props.mirror_name)
const extend_editor = window.CodeMirror.fromTextArea(window.$('#codemirror-file-edit')[0]
, cmOptions);

@ -117,8 +117,8 @@ class RepositoryDirectories extends Component {
}
})
}
{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
<Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}>删除</Button>:""}
{/*{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?*/}
{/* <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}>删除</Button>:""}*/}
<div className={"both"}></div>
</div> }

Loading…
Cancel
Save