Skip to content

Commit

Permalink
Merge pull request #226 from CSCfi/CSCFC4EMSCR-606_Enable-toggle-for-…
Browse files Browse the repository at this point in the history
…old-mapping-titles

CSCFC4EMSCR-606 Enable checkbox for showing old mapping titles (mapping list)
  • Loading branch information
masillan authored Oct 31, 2024
2 parents ce6cb78 + a66b452 commit 1452000
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion mscr-ui/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
},
"crosswalk-editor": {
"search-from-source-schema": "Search from source schema",
"search-from-target-schema": "Search from target schema"
"search-from-target-schema": "Search from target schema",
"show-node-titles": "Show simple node titles"
},
"crosswalk-form": {
"all": "All",
Expand Down
3 changes: 2 additions & 1 deletion mscr-ui/public/locales/fi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
},
"crosswalk-editor": {
"search-from-source-schema": "",
"search-from-target-schema": ""
"search-from-target-schema": "",
"show-node-titles": ""
},
"crosswalk-form": {
"all": "",
Expand Down
3 changes: 2 additions & 1 deletion mscr-ui/public/locales/sv/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
},
"crosswalk-editor": {
"search-from-source-schema": "",
"search-from-target-schema": ""
"search-from-target-schema": "",
"show-node-titles": ""
},
"crosswalk-form": {
"all": "",
Expand Down
19 changes: 10 additions & 9 deletions mscr-ui/src/modules/crosswalk-editor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { Button as Sbutton } from 'suomifi-ui-components';
import { Button as Sbutton, Checkbox } from 'suomifi-ui-components';
import MappingsAccordion, {
highlightOperation,
} from '@app/modules/crosswalk-editor/mappings-accordion';
Expand Down Expand Up @@ -549,14 +549,15 @@ export default function CrosswalkEditor({
<div className="col-12 mt-4">
<div className="d-flex justify-content-between">
<div className="align-self-end pe-1">
{/* // TODO: this can be shown when attribute qnames are available for accordion. Those are temporarily replaced with attribute ids.
<Checkbox
checked={showAttributeNames}
onClick={(newState) => {
setShowAttributeNames(newState.checkboxState);
}}
>Show node titles
</Checkbox>*/}
{/*TODO: Checkbox can be removed as deprecated when all new style titles work*/}
<Checkbox
checked={showAttributeNames}
onClick={(newState) => {
setShowAttributeNames(newState.checkboxState);
}}
>
{t('crosswalk-editor.show-node-titles')}
</Checkbox>
</div>
</div>

Expand Down

0 comments on commit 1452000

Please sign in to comment.