Skip to content

Commit fc0ca88

Browse files
[DURACOM-507] remove cris layout references, rename crisRef into dynamicRef, fix layout loader names and imports
1 parent b41723c commit fc0ca88

23 files changed

Lines changed: 66 additions & 66 deletions

config/config.example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ accessibility:
707707
cookieExpirationDuration: 7
708708

709709
# Configuration for layout customization of metadata rendering in Item page
710-
# Currently only the authority reference config is available, more will follow with the integration of the so called CRIS layout.
710+
# Currently only the authority reference config is available, more will follow with the integration of the so called Dynamic layout.
711711
layout:
712712
# Configuration of icons and styles to be used for each authority controlled link
713713
authorityRef:

src/app/core/layout/models/section.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ export interface TopSectionColumn {
106106
* Represents the type of template to use for the section
107107
*/
108108
export enum TopSectionTemplateType {
109-
DEFAULT = 'default', // CRIS default template
109+
DEFAULT = 'default', // default template
110110
}

src/app/core/layout/tab-data.service.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ describe('TabDataService', () => {
231231
{
232232
metadata: 'person.affiliation.name',
233233
label: 'Main Affiliation',
234-
rendering: 'crisref',
234+
rendering: 'dynamicref',
235235
fieldType: 'METADATA',
236236
styleLabel: 'fw-bold col-3',
237237
styleValue: null,
@@ -241,7 +241,7 @@ describe('TabDataService', () => {
241241
{
242242
metadata: 'crisrp.workgroup',
243243
label: null,
244-
rendering: 'crisref',
244+
rendering: 'dynamicref',
245245
fieldType: 'METADATA',
246246
styleLabel: 'fw-bold col-3',
247247
styleValue: null,
@@ -261,7 +261,7 @@ describe('TabDataService', () => {
261261
{
262262
metadata: 'person.email',
263263
label: 'Email',
264-
rendering: 'crisref.email',
264+
rendering: 'dynamicref.email',
265265
fieldType: 'METADATA',
266266
styleLabel: 'fw-bold col-3',
267267
styleValue: null,
@@ -470,7 +470,7 @@ describe('TabDataService', () => {
470470
{
471471
metadata: 'person.affiliation.name',
472472
label: 'Main Affiliation',
473-
rendering: 'crisref',
473+
rendering: 'dynamicref',
474474
fieldType: 'METADATA',
475475
styleLabel: 'fw-bold col-3',
476476
styleValue: null,
@@ -480,7 +480,7 @@ describe('TabDataService', () => {
480480
{
481481
metadata: 'crisrp.workgroup',
482482
label: null,
483-
rendering: 'crisref',
483+
rendering: 'dynamicref',
484484
fieldType: 'METADATA',
485485
styleLabel: 'fw-bold col-3',
486486
styleValue: null,
@@ -500,7 +500,7 @@ describe('TabDataService', () => {
500500
{
501501
metadata: 'person.email',
502502
label: 'Email',
503-
rendering: 'crisref.email',
503+
rendering: 'dynamicref.email',
504504
fieldType: 'METADATA',
505505
styleLabel: 'fw-bold col-3',
506506
styleValue: null,

src/app/core/testing/box-configurations.mock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const metadataBoxConfigurationMock: MetadataBoxConfiguration = {
146146
{
147147
'metadata': 'oairecerif.person.affiliation',
148148
'label': 'Organisation',
149-
'rendering': 'crisref',
149+
'rendering': 'dynamicref',
150150
'fieldType': 'METADATA',
151151
'style': 'row',
152152
'styleLabel': 'col',
@@ -206,7 +206,7 @@ export const metadataBoxConfigurationMock: MetadataBoxConfiguration = {
206206
{
207207
'metadata': 'crisrp.education',
208208
'label': 'Organisation',
209-
'rendering': 'crisref',
209+
'rendering': 'dynamicref',
210210
'fieldType': 'METADATA',
211211
'style': 'row',
212212
'styleLabel': 'col',

src/app/dynamic-item-page/dynamic-item-page.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('DynamicItemPageComponent', () => {
103103
fixture.detectChanges();
104104
});
105105

106-
it('should display the cris layout component', () => {
106+
it('should display the dynamic layout component', () => {
107107
const layout = fixture.debugElement.query(By.css('ds-dynamic-layout'));
108108
expect(layout.nativeElement).toBeDefined();
109109
});
@@ -117,7 +117,7 @@ describe('DynamicItemPageComponent', () => {
117117
fixture.detectChanges();
118118
});
119119

120-
it('should not display the cris layout component', () => {
120+
it('should not display the dynamic layout component', () => {
121121
const layout = fixture.debugElement.query(By.css('ds-dynamic-layout'));
122122
expect(layout).toBeNull();
123123
});

src/app/dynamic-layout/decorators/dynamic-layout-box.decorator.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ import { DynamicLayoutMetadataBoxComponent } from '../dynamic-layout-matrix/dyna
88
import { DynamicLayoutRelationBoxComponent } from '../dynamic-layout-matrix/dynamic-layout-box-container/boxes/relation/dynamic-layout-relation-box.component';
99
import { LayoutBox } from '../enums/layout-box.enum';
1010

11-
export interface CrisLayoutBoxRenderOptions {
11+
export interface DynamicLayoutBoxRenderOptions {
1212
componentRef: GenericConstructor<Component>;
1313
hasOwnContainer: boolean;
1414
}
1515

16-
const layoutBoxesMap = new Map<LayoutBox, CrisLayoutBoxRenderOptions>([
17-
[ LayoutBox.COLLECTIONS, { componentRef: DynamicLayoutCollectionBoxComponent, hasOwnContainer: false } as CrisLayoutBoxRenderOptions ],
18-
[ LayoutBox.IIIFVIEWER, { componentRef: DynamicLayoutIiifViewerBoxComponent, hasOwnContainer: false } as CrisLayoutBoxRenderOptions ],
19-
[ LayoutBox.METADATA, { componentRef: DynamicLayoutMetadataBoxComponent, hasOwnContainer: false } as CrisLayoutBoxRenderOptions ],
20-
[ LayoutBox.RELATION, { componentRef: DynamicLayoutRelationBoxComponent, hasOwnContainer: false } as CrisLayoutBoxRenderOptions ],
21-
[ LayoutBox.VERSIONING, { componentRef: ItemVersionsComponent, hasOwnContainer: false } as CrisLayoutBoxRenderOptions ],
16+
const layoutBoxesMap = new Map<LayoutBox, DynamicLayoutBoxRenderOptions>([
17+
[ LayoutBox.COLLECTIONS, { componentRef: DynamicLayoutCollectionBoxComponent, hasOwnContainer: false } as DynamicLayoutBoxRenderOptions ],
18+
[ LayoutBox.IIIFVIEWER, { componentRef: DynamicLayoutIiifViewerBoxComponent, hasOwnContainer: false } as DynamicLayoutBoxRenderOptions ],
19+
[ LayoutBox.METADATA, { componentRef: DynamicLayoutMetadataBoxComponent, hasOwnContainer: false } as DynamicLayoutBoxRenderOptions ],
20+
[ LayoutBox.RELATION, { componentRef: DynamicLayoutRelationBoxComponent, hasOwnContainer: false } as DynamicLayoutBoxRenderOptions ],
21+
[ LayoutBox.VERSIONING, { componentRef: ItemVersionsComponent, hasOwnContainer: false } as DynamicLayoutBoxRenderOptions ],
2222
]);
2323

24-
export function getCrisLayoutBox(boxType: LayoutBox): CrisLayoutBoxRenderOptions {
24+
export function getDynamicLayoutBox(boxType: LayoutBox): DynamicLayoutBoxRenderOptions {
2525
return layoutBoxesMap.get(boxType);
2626
}

src/app/dynamic-layout/dynamic-layout-loader/shared/sidebar-item/dynamic-layout-sidebar-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { slide } from '../../../../shared/animations/slide';
1919
/**
2020
* This component defines the default layout for all tabs of DSpace Items.
2121
* This component can be overwritten for a specific Item type using
22-
* CrisLayoutTabModelComponent decorator
22+
* DynamicLayoutTabModelComponent decorator
2323
*/
2424
@Component({
2525
selector: 'ds-dynamic-layout-sidebar-item',

src/app/dynamic-layout/dynamic-layout-matrix/dynamic-layout-box-container/boxes/metadata/dynamic-layout-metadata-box.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { RowComponent } from './row/row.component';
3030
],
3131
})
3232
/**
33-
* For overwrite this component create a new one that extends CrisLayoutBoxObj and
33+
* For overwrite this component create a new one that extends DynamicLayoutBoxObj and
3434
* add the DynamicLayoutBoxModelComponent decorator indicating the type of box to overwrite
3535
*/
3636
export class DynamicLayoutMetadataBoxComponent extends DynamicLayoutBoxModelComponent implements OnInit, OnDestroy {
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<ng-template #attachmentValue dsCrisLayoutLoader></ng-template>
1+
<ng-template #attachmentValue dsDynamicLayoutLoader></ng-template>

src/app/dynamic-layout/dynamic-layout-matrix/dynamic-layout-box-container/boxes/metadata/rendering-types/crisref/crisref.component.html renamed to src/app/dynamic-layout/dynamic-layout-matrix/dynamic-layout-box-container/boxes/metadata/rendering-types/dynamicref/dynamicref.component.html

File renamed without changes.

0 commit comments

Comments
 (0)