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

SSDM-12150 : XLS Import usable from the New Admin UI - nicer labels in the nav...

SSDM-12150 : XLS Import usable from the New Admin UI - nicer labels in the nav browser and in the tabs
parent c2b1561f
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@ const keys = {
DATA_TYPE_NOT_SUPPORTED: 'DATA_TYPE_NOT_SUPPORTED',
DATE: 'DATE',
DEACTIVATE_USER: 'DEACTIVATE_USER',
DELETION: 'DELETION',
DELETIONS: 'DELETIONS',
DESCRIPTION: 'DESCRIPTION',
DISALLOW_DELETION: 'DISALLOW_DELETION',
......@@ -77,6 +78,7 @@ const keys = {
FIRST_PAGE: 'FIRST_PAGE',
FORM_PREVIEW: 'FORM_PREVIEW',
FREEZES: 'FREEZES',
FREEZING: 'FREEZING',
GENERATED_CODE_PREFIX: 'GENERATED_CODE_PREFIX',
GENERATE_CODES: 'GENERATE_CODES',
GLOBAL_FILTER: 'GLOBAL_FILTER',
......@@ -268,6 +270,7 @@ const messages_en = {
[keys.DATA_TYPE_NOT_SUPPORTED]: 'The selected data type is not supported yet.',
[keys.DATE]: 'Date',
[keys.DEACTIVATE_USER]: 'Deactivate user',
[keys.DELETION]: 'Deletion',
[keys.DELETIONS]: 'Deletions',
[keys.DESCRIPTION]: 'Description',
[keys.DISALLOW_DELETION]: 'Disallow Deletion',
......@@ -300,6 +303,7 @@ const messages_en = {
[keys.FIRST_PAGE]: 'First Page',
[keys.FORM_PREVIEW]: 'Form Preview',
[keys.FREEZES]: 'Freezes',
[keys.FREEZING]: 'Freezing',
[keys.GENERATED_CODE_PREFIX]: 'Generated code prefix',
[keys.GENERATE_CODES]: 'Generate Codes',
[keys.GLOBAL_FILTER]: 'Global Filter',
......
......@@ -11,6 +11,8 @@ import PluginForm from '@src/js/components/tools/form/plugin/PluginForm.jsx'
import QueryForm from '@src/js/components/tools/form/query/QueryForm.jsx'
import HistoryForm from '@src/js/components/tools/form/history/HistoryForm.jsx'
import ImportForm from '@src/js/components/tools/form/import/ImportForm.jsx'
import ImportType from '@src/js/components/tools/form/import/ImportType.js'
import openbis from '@src/js/services/openbis.js'
import messages from '@src/js/common/messages.js'
const styles = () => ({
......@@ -96,7 +98,22 @@ class Tools extends React.Component {
[objectType.IMPORT]: messages.get(messages.IMPORT) + ': ',
[objectType.SEARCH]: messages.get(messages.SEARCH) + ': '
}
label = prefixes[object.type] + object.id
let suffix = object.id
if (object.type === objectType.HISTORY) {
if (object.id === openbis.EventType.DELETION) {
suffix = messages.get(messages.DELETION)
} else if (object.id === openbis.EventType.FREEZING) {
suffix = messages.get(messages.FREEZING)
}
} else if (object.type === objectType.IMPORT) {
if (object.id === ImportType.ALL) {
suffix = messages.get(messages.ALL)
}
}
label = prefixes[object.type] + suffix
}
return <ContentTab label={label} changed={changed} />
......
......@@ -75,7 +75,7 @@ export default class ToolBrowserController extends BrowserController {
const historyNodes = [
{
id: `history/deletion`,
text: openbis.EventType.DELETION,
text: messages.get(messages.DELETION),
object: {
type: objectType.HISTORY,
id: openbis.EventType.DELETION
......@@ -85,7 +85,7 @@ export default class ToolBrowserController extends BrowserController {
},
{
id: `history/freeze`,
text: openbis.EventType.FREEZING,
text: messages.get(messages.FREEZING),
object: {
type: objectType.HISTORY,
id: openbis.EventType.FREEZING
......@@ -98,7 +98,7 @@ export default class ToolBrowserController extends BrowserController {
const importNodes = [
{
id: `import/all`,
text: ImportType.ALL,
text: messages.get(messages.ALL),
object: {
type: objectType.IMPORT,
id: ImportType.ALL
......
......@@ -64,10 +64,10 @@ async function testFilter() {
{ level: 0, text: 'Queries' },
{ level: 1, text: testQuery.name },
{ level: 0, text: 'History' },
{ level: 1, text: openbis.EventType.DELETION },
{ level: 1, text: openbis.EventType.FREEZING },
{ level: 1, text: 'Deletion' },
{ level: 1, text: 'Freezing' },
{ level: 0, text: 'Import' },
{ level: 1, text: ImportType.ALL }
{ level: 1, text: 'All' }
]
})
}
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