From dc75605e463f064fce07a1a7bf23b16f66742cbb Mon Sep 17 00:00:00 2001
From: Maximilian Hils <git@maximilianhils.com>
Date: Wed, 23 Nov 2016 01:26:47 +0100
Subject: minor fixes

---
 web/src/js/components/ContentView/ContentViewOptions.jsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'web/src/js/components/ContentView/ContentViewOptions.jsx')

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}/>
             &nbsp;
             <DownloadContentButton flow={flow} message={message}/>
             &nbsp;
-            <UploadContentButton uploadContent={uploadContent}/>
+            {!readonly && <UploadContentButton uploadContent={uploadContent}/> }
             &nbsp;
             <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)
-- 
cgit v1.2.3

