diff --git a/client/src/components/ReadOnlyField.js b/client/src/components/ReadOnlyField.js new file mode 100644 index 0000000..f2bc282 --- /dev/null +++ b/client/src/components/ReadOnlyField.js @@ -0,0 +1,31 @@ +// @flow + +import React from 'react'; + +type Props = { + label?: string, + value: string +}; + +const ReadOnlyField = (props: Props) => ( +
+ { props.label && ( + + )} +
+ { props.value } +
+
+); + +export default ReadOnlyField; diff --git a/client/src/i18n/en.json b/client/src/i18n/en.json index 96a73a5..618101b 100644 --- a/client/src/i18n/en.json +++ b/client/src/i18n/en.json @@ -108,7 +108,8 @@ "exif": "View Info" }, "labels": { - "content": "Content" + "content": "Content", + "uuid": "Unique identifier" } }, "ResourceExifModal": { diff --git a/client/src/pages/Project.js b/client/src/pages/Project.js index f275e29..118da87 100644 --- a/client/src/pages/Project.js +++ b/client/src/pages/Project.js @@ -10,6 +10,7 @@ import AuthenticationService from '../services/Authentication'; import Organization from '../transforms/Organization'; import OrganizationsService from '../services/Organizations'; import ProjectsService from '../services/Projects'; +import ReadOnlyField from '../components/ReadOnlyField'; import SimpleEditPage from '../components/SimpleEditPage'; import withEditPage from '../hooks/EditPage'; @@ -97,22 +98,10 @@ const ProjectForm = withTranslation()((props) => { required={props.isRequired('description')} value={props.item.description} /> -
- -
- { props.item.uuid } -
-
+ { required={props.isRequired('name')} value={props.item.name} /> + = () => { preview={resource.content_thumbnail_url} /> )} - renderMeta={() => ''} + renderMeta={(resource) => resource.uuid} saved={location.state && location.state.saved} sort={[{ key: 'name',