From c6528d8999a52af7f71f3f08fd25847e9d9bb66b Mon Sep 17 00:00:00 2001 From: diminator Date: Tue, 30 Jun 2015 17:12:51 +0200 Subject: [PATCH] other_data : delete without cascade and show acl --- .../react_s3_fine_uploader.js | 8 +- js/components/edition.js | 83 ++++++++++--------- 2 files changed, 49 insertions(+), 42 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 8e720f02..6514a588 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -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); } }, diff --git a/js/components/edition.js b/js/components/edition.js index 6bd096a4..ba6014ce 100644 --- a/js/components/edition.js +++ b/js/components/edition.js @@ -120,7 +120,9 @@ let Edition = React.createClass({ -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}> @@ -493,16 +495,12 @@ let EditionFurtherDetails = React.createClass({ handleSuccess={this.showNotification} editable={editable} edition={this.props.edition} /> - - - - + ); @@ -518,34 +516,43 @@ let FileUploader = React.createClass({ }, render() { + if (!this.props.editable && this.props.edition.other_data === null){ + return null; + } return ( - +
+ + + +
+
); } });