diff --git a/src/app/breadcrumbs/breadcrumb/truncate-breadcrumb-item-characters.pipe.ts b/src/app/breadcrumbs/breadcrumb/truncate-breadcrumb-item-characters.pipe.ts index edd6bcdb4d5..ebfade6f89f 100644 --- a/src/app/breadcrumbs/breadcrumb/truncate-breadcrumb-item-characters.pipe.ts +++ b/src/app/breadcrumbs/breadcrumb/truncate-breadcrumb-item-characters.pipe.ts @@ -10,7 +10,7 @@ export class TruncateBreadcrumbItemCharactersPipe implements PipeTransform { * The maximum number of characters to display in a breadcrumb item * @type {number} */ - readonly charLimit: number = environment.breadcrumbCharLimit; + readonly charLimit: number = environment.layout.breadcrumbs.charLimit; /** * Truncates the text based on the configured char number allowed per breadcrumb element. diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index c4a65f1bb3e..bb4f5740a74 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -511,23 +511,23 @@ export class DefaultAppConfig implements AppConfig { urn: [ { name: 'doi', - baseUrl: 'https://doi.org/' + baseUrl: 'https://doi.org/', }, { name: 'hdl', - baseUrl: 'https://hdl.handle.net/' + baseUrl: 'https://hdl.handle.net/', }, { name: 'scopus', - baseUrl: 'https://www.scopus.com/authid/detail.uri?authorId=' + baseUrl: 'https://www.scopus.com/authid/detail.uri?authorId=', }, { name: 'researcherid', - baseUrl: 'http://www.researcherid.com/rid/' + baseUrl: 'http://www.researcherid.com/rid/', }, { name: 'mailto', - baseUrl: 'mailto:' + baseUrl: 'mailto:', } ], crisRef: [ @@ -536,7 +536,7 @@ export class DefaultAppConfig implements AppConfig { entityStyle: { default: { icon: 'fa fa-info', - style: 'text-info' + style: 'text-info', } } }, @@ -545,7 +545,7 @@ export class DefaultAppConfig implements AppConfig { entityStyle: { default: { icon: 'fa fa-user', - style: 'text-info' + style: 'text-info', } } }, @@ -554,7 +554,7 @@ export class DefaultAppConfig implements AppConfig { entityStyle: { default: { icon: 'fa fa-university', - style: 'text-info' + style: 'text-info', } } }, @@ -563,7 +563,7 @@ export class DefaultAppConfig implements AppConfig { entityStyle: { default: { icon: 'fas fa-project-diagram', - style: 'text-info' + style: 'text-info', } } } @@ -573,18 +573,18 @@ export class DefaultAppConfig implements AppConfig { }, itemPage: { OrgUnit: { - orientation: 'vertical' + orientation: 'vertical', }, Project: { - orientation: 'vertical' + orientation: 'vertical', }, default: { - orientation: 'horizontal' + orientation: 'horizontal', }, }, metadataBox: { defaultMetadataLabelColStyle: 'col-3', - defaultMetadataValueColStyle: 'col-9' + defaultMetadataValueColStyle: 'col-9', }, collectionsBox: { defaultCollectionsLabelColStyle: 'col-3 font-weight-bold', @@ -597,6 +597,9 @@ export class DefaultAppConfig implements AppConfig { navbar: { // If true, show the "Community and Collections" link in the navbar; otherwise, show it in the admin sidebar showCommunityCollection: true, + }, + breadcrumbs: { + charLimit: 10, } }; @@ -605,17 +608,17 @@ export class DefaultAppConfig implements AppConfig { { value: 0, icon: 'fa fa-globe', - color: 'green' + color: 'green', }, { value: 1, icon: 'fa fa-key', - color: 'orange' + color: 'orange', }, { value: 2, icon: 'fa fa-lock', - color: 'red' + color: 'red', } ] }; @@ -730,11 +733,12 @@ export class DefaultAppConfig implements AppConfig { name: 'checksum', type: AdvancedAttachmentElementType.Attribute, } - ] + ], }; searchResult: SearchResultConfig = { additionalMetadataFields: [], authorMetadata: ['dc.contributor.author', 'dc.creator', 'dc.contributor.*'], }; + } diff --git a/src/config/layout-config.interfaces.ts b/src/config/layout-config.interfaces.ts index b5f293800c1..88e52ac54fd 100644 --- a/src/config/layout-config.interfaces.ts +++ b/src/config/layout-config.interfaces.ts @@ -38,6 +38,10 @@ export interface NavbarConfig extends Config { showCommunityCollection: boolean; } +export interface BreadcrumbsConfig extends Config { + charLimit: number; +} + export interface CrisItemPageConfig extends Config { [entity: string]: CrisLayoutTypeConfig; default: CrisLayoutTypeConfig; @@ -59,6 +63,7 @@ export interface CrisLayoutConfig extends Config { export interface LayoutConfig extends Config { navbar: NavbarConfig; + breadcrumbs: BreadcrumbsConfig; } export interface SuggestionConfig extends Config { diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 7e5f5c280f6..ee4912c49a0 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -421,7 +421,10 @@ export const environment: BuildConfig = { navbar: { // If true, show the "Community and Collections" link in the navbar; otherwise, show it in the admin sidebar showCommunityCollection: true, - } + }, + breadcrumbs: { + charLimit: 10, + }, }, security: { levels: [ @@ -553,4 +556,5 @@ export const environment: BuildConfig = { ], authorMetadata: ['dc.contributor.author', 'dc.contributor.editor', 'dc.contributor.contributor', 'dc.creator'], }, + };