mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
other_data : delete without cascade and show acl
This commit is contained in:
parent
5ecd1368f0
commit
c6528d8999
@ -345,10 +345,10 @@ var ReactS3FineUploader = React.createClass({
|
|||||||
let newState = React.addons.update(this.state, {filesToUpload: {$set: updatedFilesToUpload}});
|
let newState = React.addons.update(this.state, {filesToUpload: {$set: updatedFilesToUpload}});
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
} else {
|
} else {
|
||||||
let notification = new GlobalNotificationModel('Could not load attached files (Further data)', 'danger', 10000);
|
//let notification = new GlobalNotificationModel('Could not load attached files (Further data)', 'danger', 10000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
//GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
|
//
|
||||||
throw new Error('The session request failed', response);
|
//throw new Error('The session request failed', response);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -120,7 +120,9 @@ let Edition = React.createClass({
|
|||||||
|
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title="Further Details"
|
title="Further Details"
|
||||||
show={this.props.edition.acl.indexOf('edit') > -1 || Object.keys(this.props.edition.extra_data).length > 0}>
|
show={this.props.edition.acl.indexOf('edit') > -1
|
||||||
|
|| Object.keys(this.props.edition.extra_data).length > 0
|
||||||
|
|| this.props.edition.other_data !== null}>
|
||||||
<EditionFurtherDetails
|
<EditionFurtherDetails
|
||||||
handleSuccess={this.props.loadEdition}
|
handleSuccess={this.props.loadEdition}
|
||||||
edition={this.props.edition}/>
|
edition={this.props.edition}/>
|
||||||
@ -493,16 +495,12 @@ let EditionFurtherDetails = React.createClass({
|
|||||||
handleSuccess={this.showNotification}
|
handleSuccess={this.showNotification}
|
||||||
editable={editable}
|
editable={editable}
|
||||||
edition={this.props.edition} />
|
edition={this.props.edition} />
|
||||||
<Property
|
|
||||||
label="Additional files"
|
|
||||||
editable={editable}>
|
|
||||||
<FileUploader
|
<FileUploader
|
||||||
submitKey={this.submitKey}
|
submitKey={this.submitKey}
|
||||||
setIsUploadReady={this.setIsUploadReady}
|
setIsUploadReady={this.setIsUploadReady}
|
||||||
isReadyForFormSubmission={this.isReadyForFormSubmission}
|
isReadyForFormSubmission={this.isReadyForFormSubmission}
|
||||||
|
editable={editable}
|
||||||
edition={this.props.edition}/>
|
edition={this.props.edition}/>
|
||||||
</Property>
|
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
@ -518,7 +516,13 @@ let FileUploader = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
if (!this.props.editable && this.props.edition.other_data === null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
|
<Form>
|
||||||
|
<Property
|
||||||
|
label="Additional files">
|
||||||
<ReactS3FineUploader
|
<ReactS3FineUploader
|
||||||
keyRoutine={{
|
keyRoutine={{
|
||||||
url: AppConstants.serverUrl + 's3/key/',
|
url: AppConstants.serverUrl + 's3/key/',
|
||||||
@ -546,6 +550,9 @@ let FileUploader = React.createClass({
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
areAssetsDownloadable={true}/>
|
areAssetsDownloadable={true}/>
|
||||||
|
</Property>
|
||||||
|
<hr />
|
||||||
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user