diff options
Diffstat (limited to 'web/src/js/components/ContentView/ContentViewOptions.jsx')
-rw-r--r-- | web/src/js/components/ContentView/ContentViewOptions.jsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/src/js/components/ContentView/ContentViewOptions.jsx b/web/src/js/components/ContentView/ContentViewOptions.jsx index fed3a088..6bc66db2 100644 --- a/web/src/js/components/ContentView/ContentViewOptions.jsx +++ b/web/src/js/components/ContentView/ContentViewOptions.jsx @@ -9,15 +9,14 @@ ContentViewOptions.propTypes = { message: React.PropTypes.object.isRequired, } -function ContentViewOptions(props) { - const { flow, message, uploadContent, readonly, contentViewDescription } = props +function ContentViewOptions({ flow, message, uploadContent, readonly, contentViewDescription }) { return ( <div className="view-options"> <ViewSelector message={message}/> <DownloadContentButton flow={flow} message={message}/> - <UploadContentButton uploadContent={uploadContent}/> + {!readonly && <UploadContentButton uploadContent={uploadContent}/> } <span>{contentViewDescription}</span> </div> @@ -26,6 +25,7 @@ function ContentViewOptions(props) { export default connect( state => ({ - contentViewDescription: state.ui.flow.viewDescription + contentViewDescription: state.ui.flow.viewDescription, + readonly: !state.ui.flow.modifiedFlow, }) )(ContentViewOptions) |