Skip to content

Commit

Permalink
Merge branch 'minor-themed-component-fixes_contribute-7.6' into minor…
Browse files Browse the repository at this point in the history
…-themed-component-fixes_contribute-main

# Conflicts:
#	src/themes/custom/lazy-theme.module.ts
  • Loading branch information
alexandrevryghem committed Jan 19, 2024
2 parents 477ea93 + f73944d commit bb2448e
Show file tree
Hide file tree
Showing 37 changed files with 156 additions and 122 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
[attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="lead item-list-title dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="lead item-list-title dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('JournalIssueSearchResultListElementComponent', () => {
});

it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -187,7 +187,7 @@ describe('JournalIssueSearchResultListElementComponent', () => {
});

it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeFalsy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
[attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="lead item-list-title dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="lead item-list-title dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('JournalVolumeSearchResultListElementComponent', () => {
});

it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('JournalVolumeSearchResultListElementComponent', () => {
});

it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeFalsy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<div *ngIf="showThumbnails" class="col-3 col-md-2">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" [attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="lead item-list-title dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="lead item-list-title dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('JournalSearchResultListElementComponent', () => {
});

it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('JournalSearchResultListElementComponent', () => {
});

it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeFalsy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
[attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/orgunit-placeholder.svg'"
[alt]="'thumbnail.orgunit.alt'"
[placeholder]="'thumbnail.orgunit.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/orgunit-placeholder.svg'"
[alt]="'thumbnail.orgunit.alt'"
[placeholder]="'thumbnail.orgunit.placeholder'">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/orgunit-placeholder.svg'"
[alt]="'thumbnail.orgunit.alt'"
[placeholder]="'thumbnail.orgunit.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/orgunit-placeholder.svg'"
[alt]="'thumbnail.orgunit.alt'"
[placeholder]="'thumbnail.orgunit.placeholder'">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('OrgUnitSearchResultListElementComponent', () => {
});

it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('OrgUnitSearchResultListElementComponent', () => {
});

it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeNull();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
[attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9 col-md-10' : 'col-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('PersonSearchResultListElementComponent', () => {
});

it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('PersonSearchResultListElementComponent', () => {
});

it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeFalsy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
[attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/project-placeholder.svg'"
[alt]="'thumbnail.project.alt'"
[placeholder]="'thumbnail.project.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/project-placeholder.svg'"
[alt]="'thumbnail.project.alt'"
[placeholder]="'thumbnail.project.placeholder'">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/project-placeholder.svg'"
[alt]="'thumbnail.project.alt'"
[placeholder]="'thumbnail.project.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/project-placeholder.svg'"
[alt]="'thumbnail.project.alt'"
[placeholder]="'thumbnail.project.placeholder'">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('ProjectSearchResultListElementComponent', () => {
});

it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('ProjectSearchResultListElementComponent', () => {
});

it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeFalsy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div *ngIf="showThumbnails" class="col-3 col-md-2">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'"
[attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async"
[defaultImage]="'assets/images/person-placeholder.svg'"
[alt]="'thumbnail.person.alt'"
[placeholder]="'thumbnail.person.placeholder'">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ describe('PersonSearchResultListElementSubmissionComponent', () => {
fixture.detectChanges();
});

it('should add the ds-thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-thumbnail'));
it('should add the thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnail).toBeTruthy();
});
});
Expand Down Expand Up @@ -223,8 +223,8 @@ describe('PersonSearchResultListElementSubmissionComponent', () => {
fixture.detectChanges();
});

it('should not add the ds-thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-thumbnail'));
it('should not add the thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnail).toBeNull();
});
});
Expand Down
6 changes: 3 additions & 3 deletions src/app/item-page/media-viewer/media-viewer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
[image]="(thumbnailsRD$ | async)?.payload?.page[0]?._links.content.href || thumbnailPlaceholder"
[preview]="false"
></ds-themed-media-viewer-image>
<ds-thumbnail *ngIf="!(mediaOptions.image && mediaOptions.video)"
[thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
</ds-thumbnail>
<ds-themed-thumbnail *ngIf="!(mediaOptions.image && mediaOptions.video)"
[thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
</ds-themed-thumbnail>
</ng-template>
</ng-container>
4 changes: 4 additions & 0 deletions src/app/my-dspace-page/my-dspace-search.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const DECLARATIONS = [
ResearchEntitiesModule.withEntryComponents(),
JournalEntitiesModule.withEntryComponents(),
],
exports: [
ItemCollectionComponent,
ItemSubmitterComponent
],
declarations: [
...DECLARATIONS,
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ThemedComcolPageBrowseByComponent extends ThemedComponent<ComcolPag
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../../themes/${themeName}/app/shared/comcol-page-browse-by/comcol-page-browse-by.component`);
return import(`../../../../themes/${themeName}/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component`);
}

protected importUnthemedComponent(): Promise<any> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row">
<div *ngIf="showThumbnails" class="col-3 col-md-2">
<ds-thumbnail [thumbnail]="item?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="item?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
<div *ngIf="item" @fadeInOut>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ describe('ItemListPreviewComponent', () => {
component.item = mockItemWithAuthorAndDate;
fixture.detectChanges();
});
it('should add the ds-thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-thumbnail'));
it('should add the thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnail).toBeTruthy();
});
});
Expand Down Expand Up @@ -223,8 +223,8 @@ describe('ItemListPreviewComponent', () => {
component.item = mockItemWithAuthorAndDate;
fixture.detectChanges();
});
it('should add the ds-thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-thumbnail'));
it('should add the thumbnail element', () => {
const thumbnail = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnail).toBeFalsy();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<div *ngIf="showThumbnails" class="col-3 col-md-2">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" [attr.rel]="(linkType == linkTypes.ExternalLink) ? 'noopener noreferrer' : null"
[routerLink]="[itemPageRoute]" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</a>
<span *ngIf="linkType == linkTypes.None" class="dont-break-out">
<ds-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-thumbnail>
<ds-themed-thumbnail [thumbnail]="dso?.thumbnail | async" [limitWidth]="true">
</ds-themed-thumbnail>
</span>
</div>
<div [ngClass]="showThumbnails ? 'col-9' : 'col-md-12'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ describe('ItemSearchResultListElementComponent', () => {
expect(publicationListElementComponent.showThumbnails).toBeTrue();
});

it('should add ds-thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
it('should add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeTruthy();
});
});
Expand Down Expand Up @@ -395,8 +395,8 @@ describe('ItemSearchResultListElementComponent', () => {
fixture.detectChanges();
});

it('should not add ds-thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-thumbnail'));
it('should not add thumbnail element', () => {
const thumbnailElement = fixture.debugElement.query(By.css('ds-themed-thumbnail'));
expect(thumbnailElement).toBeFalsy();
});
});
Expand Down
Loading

0 comments on commit bb2448e

Please sign in to comment.