Use display name in CM

Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
soupette 2021-10-21 12:23:46 +02:00
parent dbea85a09e
commit 972f4fbb41
4 changed files with 11 additions and 11 deletions

View File

@ -401,7 +401,7 @@ const addressCT = {
isDisplayed: true,
apiID: 'address',
kind: 'collectionType',
info: { name: 'address', description: '', label: 'Addresses' },
info: { displayName: 'addresse', name: 'address', description: '', label: 'Addresses' },
options: {
draftAndPublish: true,
increments: true,

View File

@ -33,7 +33,7 @@ const generateLinks = (links, type, configurations = []) => {
permissions,
search,
kind: link.kind,
title: link.info.label,
title: link.info.displayName,
to: `/content-manager/${link.kind}/${link.uid}`,
uid: link.uid,
// Used for the list item key in the helper plugin

View File

@ -23,7 +23,7 @@ describe('ADMIN | LeftMenu | utils', () => {
kind: 'collectionType',
uid: 'api::address.address',
info: {
label: 'Addresses',
displayName: 'Addresses',
},
},
{
@ -31,7 +31,7 @@ describe('ADMIN | LeftMenu | utils', () => {
kind: 'collectionType',
uid: 'api::test.test',
info: {
label: 'Test',
displayName: 'Test',
},
},
{
@ -39,7 +39,7 @@ describe('ADMIN | LeftMenu | utils', () => {
kind: 'singleType',
uid: 'api::test1.test1',
info: {
label: 'Test 1',
displayName: 'Test 1',
},
},
];
@ -97,7 +97,7 @@ describe('ADMIN | LeftMenu | utils', () => {
kind: 'collectionType',
uid: 'api::address.address',
info: {
label: 'Addresses',
displayName: 'Addresses',
},
},
{
@ -105,7 +105,7 @@ describe('ADMIN | LeftMenu | utils', () => {
kind: 'collectionType',
uid: 'api::test.test',
info: {
label: 'Test',
displayName: 'Test',
},
},
{
@ -113,7 +113,7 @@ describe('ADMIN | LeftMenu | utils', () => {
kind: 'singleType',
uid: 'api::test1.test1',
info: {
label: 'Test 1',
displayName: 'Test 1',
},
},
];

View File

@ -223,8 +223,8 @@ function ListView({
defaultMessage: 'Content',
});
const headerLayoutTitle = formatMessage({
id: contentType.info.label,
defaultMessage: contentType.info.label || defaultHeaderLayoutTitle,
id: contentType.info.displayName,
defaultMessage: contentType.info.displayName || defaultHeaderLayoutTitle,
});
const subtitle = canRead
@ -324,7 +324,7 @@ ListView.propTypes = {
contentType: PropTypes.shape({
attributes: PropTypes.object.isRequired,
metadatas: PropTypes.object.isRequired,
info: PropTypes.shape({ label: PropTypes.string.isRequired }).isRequired,
info: PropTypes.shape({ displayName: PropTypes.string.isRequired }).isRequired,
layouts: PropTypes.shape({
list: PropTypes.array.isRequired,
editRelations: PropTypes.array,