1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-01 20:39:57 +01:00

other_data : delete without cascade and show acl

This commit is contained in:
diminator 2015-06-30 17:12:51 +02:00
parent 5ecd1368f0
commit c6528d8999
2 changed files with 49 additions and 42 deletions

View File

@ -345,10 +345,10 @@ var ReactS3FineUploader = React.createClass({
let newState = React.addons.update(this.state, {filesToUpload: {$set: updatedFilesToUpload}});
this.setState(newState);
} else {
let notification = new GlobalNotificationModel('Could not load attached files (Further data)', 'danger', 10000);
GlobalNotificationActions.appendGlobalNotification(notification);
throw new Error('The session request failed', response);
//let notification = new GlobalNotificationModel('Could not load attached files (Further data)', 'danger', 10000);
//GlobalNotificationActions.appendGlobalNotification(notification);
//
//throw new Error('The session request failed', response);
}
},

View File

@ -120,7 +120,9 @@ let Edition = React.createClass({
<CollapsibleParagraph
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
handleSuccess={this.props.loadEdition}
edition={this.props.edition}/>
@ -493,16 +495,12 @@ let EditionFurtherDetails = React.createClass({
handleSuccess={this.showNotification}
editable={editable}
edition={this.props.edition} />
<Property
label="Additional files"
editable={editable}>
<FileUploader
submitKey={this.submitKey}
setIsUploadReady={this.setIsUploadReady}
isReadyForFormSubmission={this.isReadyForFormSubmission}
editable={editable}
edition={this.props.edition}/>
</Property>
</Col>
</Row>
);
@ -518,7 +516,13 @@ let FileUploader = React.createClass({
},
render() {
if (!this.props.editable && this.props.edition.other_data === null){
return null;
}
return (
<Form>
<Property
label="Additional files">
<ReactS3FineUploader
keyRoutine={{
url: AppConstants.serverUrl + 's3/key/',
@ -546,6 +550,9 @@ let FileUploader = React.createClass({
}
}}
areAssetsDownloadable={true}/>
</Property>
<hr />
</Form>
);
}
});