Skip to content
Permalink
Browse files

Merge pull request #122 from dew326/content-type-translate-udw

EZP-29965: Search in UDW does not show translated Content Type name
  • Loading branch information...
dew326 committed Dec 21, 2018
2 parents d134076 + 92f8b53 commit 2980bae8618e207e2248f9c8c0a4068e965d68cf

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -19,8 +19,9 @@ const ContentTableItemComponent = (props) => {
} = props;
const notAvailableLabel = Translator.trans(/*@Desc("N/A")*/ 'content_table.not_available.label', {}, 'universal_discovery_widget');
const item = data.ContentInfo.Content;
const contentType = contentTypesMap ? contentTypesMap[item.ContentType._href] : false;
const contentTypeName = contentType ? contentType.names.value[0]['#text'] : notAvailableLabel;
const contentType = contentTypesMap ? contentTypesMap[item.ContentType._href] : null;
const contentTypeIdentifier = contentType ? contentType.identifier : null;
const contentTypeName = contentTypeIdentifier ? window.eZ.adminUiConfig.contentTypeNames[contentTypeIdentifier] : notAvailableLabel;
const onClick = !!onItemClick ? onItemClick.bind(null, data) : null;
const isSelectedContent = selectedContent.find((content) => content.id === data.id);
const iconId = isSelectedContent ? 'checkmark' : 'create';

0 comments on commit 2980bae

Please sign in to comment.
You can’t perform that action at this time.