Skip to content
Snippets Groups Projects
Commit 2b368da5 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

NG_UI : type browser - show an empty page when a view of an existing...

NG_UI : type browser - show an empty page when a view of an existing vocabulary is requested or a creation of a new vocabulary is started
parent 4f0f2f88
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,34 @@ const routes = { ...@@ -168,6 +168,34 @@ const routes = {
}) })
} }
}, },
NEW_VOCABULARY_TYPE: {
format: params => {
return doFormat(params, '/new-vocabulary-type/:id', {
page: pages.TYPES,
type: objectTypes.NEW_VOCABULARY_TYPE
})
},
parse: path => {
return doParse(path, '/new-vocabulary-type/:id', {
page: pages.TYPES,
type: objectTypes.NEW_VOCABULARY_TYPE
})
}
},
VOCABULARY_TYPE: {
format: params => {
return doFormat(params, '/vocabulary-type/:id', {
page: pages.TYPES,
type: objectTypes.VOCABULARY_TYPE
})
},
parse: path => {
return doParse(path, '/vocabulary-type/:id', {
page: pages.TYPES,
type: objectTypes.VOCABULARY_TYPE
})
}
},
USERS: { USERS: {
format: params => { format: params => {
return doFormat(params, '/users', { return doFormat(params, '/users', {
......
...@@ -10,6 +10,7 @@ import ContentTab from '@src/js/components/common/content/ContentTab.jsx' ...@@ -10,6 +10,7 @@ import ContentTab from '@src/js/components/common/content/ContentTab.jsx'
import TypeBrowser from './browser/TypeBrowser.jsx' import TypeBrowser from './browser/TypeBrowser.jsx'
import TypeSearch from './search/TypeSearch.jsx' import TypeSearch from './search/TypeSearch.jsx'
import TypeForm from './form/TypeForm.jsx' import TypeForm from './form/TypeForm.jsx'
import VocabularyForm from './form/VocabularyForm.jsx'
const styles = () => ({ const styles = () => ({
container: { container: {
...@@ -40,6 +41,11 @@ class Types extends React.Component { ...@@ -40,6 +41,11 @@ class Types extends React.Component {
const { object } = tab const { object } = tab
if (object.type === objectType.SEARCH) { if (object.type === objectType.SEARCH) {
return <TypeSearch objectId={object.id} /> return <TypeSearch objectId={object.id} />
} else if (
object.type === objectType.VOCABULARY_TYPE ||
object.type === objectType.NEW_VOCABULARY_TYPE
) {
return <VocabularyForm object={object} />
} else { } else {
return <TypeForm object={object} /> return <TypeForm object={object} />
} }
...@@ -53,6 +59,7 @@ class Types extends React.Component { ...@@ -53,6 +59,7 @@ class Types extends React.Component {
[objectType.NEW_COLLECTION_TYPE]: 'New Collection Type ', [objectType.NEW_COLLECTION_TYPE]: 'New Collection Type ',
[objectType.NEW_DATA_SET_TYPE]: 'New Data Set Type ', [objectType.NEW_DATA_SET_TYPE]: 'New Data Set Type ',
[objectType.NEW_MATERIAL_TYPE]: 'New Material Type ', [objectType.NEW_MATERIAL_TYPE]: 'New Material Type ',
[objectType.NEW_VOCABULARY_TYPE]: 'New Vocabulary Type ',
[objectType.SEARCH]: 'search: ' [objectType.SEARCH]: 'search: '
} }
......
import React from 'react'
export default class VocabularyForm extends React.PureComponent {
render() {
const { object } = this.props
return <div>Vocabulary Form {object.id}</div>
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment