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

SSDM-11664 : NG UI & ELN : common table widget - replace hardcoded messages...

SSDM-11664 : NG UI & ELN : common table widget - replace hardcoded messages with proper messages entries
parent 5dda6896
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ const keys = {
AUTHENTICATION_SERVICE_OPENBIS: 'AUTHENTICATION_SERVICE_OPENBIS',
AUTHENTICATION_SERVICE_SWITCH_AAI: 'AUTHENTICATION_SERVICE_SWITCH_AAI',
CANCEL: 'CANCEL',
CLEAR_SELECTION: 'CLEAR_SELECTION',
CLOSE: 'CLOSE',
CODE: 'CODE',
COLLECTION_TYPE: 'COLLECTION_TYPE',
......@@ -105,6 +106,7 @@ const keys = {
NEW_VOCABULARY_TYPE: 'NEW_VOCABULARY_TYPE',
NEXT_PAGE: 'NEXT_PAGE',
NO_RESULTS_FOUND: 'NO_RESULTS_FOUND',
NUMBER_OF_SELECTED_ROWS: 'NUMBER_OF_SELECTED_ROWS',
OBJECT_DOES_NOT_EXIST: 'OBJECT_DOES_NOT_EXIST',
OBJECT_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING: 'OBJECT_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING',
OBJECT_TYPE: 'OBJECT_TYPE',
......@@ -161,6 +163,7 @@ const keys = {
SECTION: 'SECTION',
SECTION_IS_NOT_USED: 'SECTION_IS_NOT_USED',
SECTION_IS_USED: 'SECTION_IS_USED',
SELECTED_ROWS_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING: 'SELECTED_ROWS_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING',
SHOW: 'SHOW',
SHOW_CONTAINER: 'SHOW_CONTAINER',
SHOW_PARENTS: 'SHOW_PARENTS',
......@@ -214,6 +217,7 @@ const messages_en = {
[keys.AUTHENTICATION_SERVICE_OPENBIS]: 'Default Login Service',
[keys.AUTHENTICATION_SERVICE_SWITCH_AAI]: 'SWITCHaai Single Sign On Login Service',
[keys.CANCEL]: 'Cancel',
[keys.CLEAR_SELECTION]: 'Clear selection',
[keys.CLOSE]: 'Close',
[keys.CODE]: 'Code',
[keys.COLLECTION_TYPES]: 'Collection Types',
......@@ -305,6 +309,7 @@ const messages_en = {
[keys.NEW_VOCABULARY_TYPE]: 'New Vocabulary Type',
[keys.NEXT_PAGE]: 'Next Page',
[keys.NO_RESULTS_FOUND]: 'No results found',
[keys.NUMBER_OF_SELECTED_ROWS]: '${0} selected row(s)',
[keys.OBJECT_DOES_NOT_EXIST]: 'Object does not exist',
[keys.OBJECT_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING]: 'The selected object is currently not visible in the list due to the chosen filtering and paging.',
[keys.OBJECT_TYPES]: 'Object Types',
......@@ -361,6 +366,7 @@ const messages_en = {
[keys.SECTION]: 'Section',
[keys.SECTION_IS_NOT_USED]: 'This section contains only property assignments which are not yet used by any entities of "${0}" type.',
[keys.SECTION_IS_USED]: 'This section contains property assignments which are already used by existing entities of "${0}" type. Removing it is also going to remove ${1} existing property value(s) - data will be lost! Are you sure you want to proceed?',
[keys.SELECTED_ROWS_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING]: 'Some selected rows are not visible due to the chosen filtering and paging.',
[keys.SHOW]: 'show',
[keys.SHOW_CONTAINER]: 'Show Container',
[keys.SHOW_PARENTS]: 'Show Parents',
......
......@@ -4,6 +4,7 @@ import TableRow from '@material-ui/core/TableRow'
import TableCell from '@material-ui/core/TableCell'
import Message from '@src/js/components/common/form/Message.jsx'
import Link from '@src/js/components/common/form/Link.jsx'
import messages from '@src/js/common/messages.js'
import logger from '@src/js/common/logger.js'
const styles = theme => ({
......@@ -69,17 +70,23 @@ class GridMultiselectionRow extends React.PureComponent {
<div className={classes.messages}>
<div className={classes.message}>
<Message type='info'>
{numberOfSelectedRows} selected row(s)
{messages.get(
messages.NUMBER_OF_SELECTED_ROWS,
numberOfSelectedRows
)}
</Message>
</div>
<div className={classes.message}>
<Link onClick={onMultiselectionClear}>(clear selection)</Link>
<Link onClick={onMultiselectionClear}>
({messages.get(messages.CLEAR_SELECTION)})
</Link>
</div>
{numberOfSelectedRowsNotVisible > 0 && (
<div className={classes.message}>
<Message type='warning'>
Some selected rows are not visible due to the chosen filtering
and paging.
{messages.get(
messages.SELECTED_ROWS_NOT_VISIBLE_DUE_TO_FILTERING_AND_PAGING
)}
</Message>
</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