Skip to content

Commit f5553ef

Browse files
aliaksandr.kryvasheyeuAndrea Barbasso
authored andcommitted
Merged in DSC-1299-cannot-hide-thumbnails-on-top-components (pull request DSpace#928)
[DSC-1299] fix showThumbnails Approved-by: Andrea Barbasso
2 parents 30543a4 + 01b122b commit f5553ef

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface TopSection extends SectionComponent {
5959
titleKey: string;
6060
componentType: 'top';
6161
numberOfItems: number;
62+
showThumbnails: boolean;
6263
}
6364

6465
export interface SearchSection extends SectionComponent {

src/app/shared/explore/section-component/top-section/top-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div *ngIf="topSection.titleKey" class="card-header">{{ 'explore.index.' + topSection.titleKey | translate }}</div>
44
<div *ngIf="!topSection.titleKey" class="card-header">{{ 'explore.index.' + topSection.sortField | translate }}</div>
55
<div class="card-body p-0">
6-
<ds-themed-browse-most-elements [context]="context" [paginatedSearchOptions]="paginatedSearchOptions"></ds-themed-browse-most-elements>
6+
<ds-themed-browse-most-elements [context]="context" [paginatedSearchOptions]="paginatedSearchOptions" [showThumbnails]="showThumbnails"></ds-themed-browse-most-elements>
77
</div>
88
</div>
99
</div>

src/app/shared/explore/section-component/top-section/top-section.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export class TopSectionComponent implements OnInit {
2626

2727
paginatedSearchOptions: PaginatedSearchOptions;
2828

29+
showThumbnails: boolean;
30+
2931
ngOnInit() {
3032
const order = this.topSection.order;
3133
const numberOfItems = this.topSection.numberOfItems;
@@ -41,6 +43,8 @@ export class TopSectionComponent implements OnInit {
4143
pagination: pagination,
4244
sort: new SortOptions(this.topSection.sortField, sortDirection)
4345
});
46+
47+
this.showThumbnails = this.topSection.showThumbnails;
4448
}
4549

4650
}

0 commit comments

Comments
 (0)