Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/shared/object-list/object-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
(prev)="goPrev()"
(next)="goNext()">
<ul *ngIf="objects?.hasSucceeded" class="list-unstyled" [ngClass]="{'ml-4': selectable}">
<div *ngIf="context === 'search'">
<div *ngIf="showClarinViewBox()">
<ds-clarin-item-box-view
*ngFor="let object of objects?.payload?.page; let i = index; let last = last"
[object]="object"
[isSearchResult]="true">
</ds-clarin-item-box-view>
</div>
<div *ngIf="context !== 'search'">
<div *ngIf="!showClarinViewBox()">
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4 d-flex" [class.border-bottom]="hasBorder && !last" [attr.data-test]="'list-object' | dsBrowserOnly">
<ds-selectable-list-item-control *ngIf="selectable" [index]="i"
[object]="object"
Expand Down
11 changes: 11 additions & 0 deletions src/app/shared/object-list/object-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import { CollectionElementLinkType } from '../object-collection/collection-eleme
animations: [fadeIn]
})
export class ObjectListComponent {
/**
* The id of the list used for bulk access
*/
BULK_ACCESS_LIST_ID = 'bulk-access-list';

/**
* The view mode of the this component
*/
Expand Down Expand Up @@ -227,4 +232,10 @@ export class ObjectListComponent {
this.next.emit(true);
}

/**
* Show the search results in the Clarin view box or use the default view
*/
showClarinViewBox(): boolean {
return this.context === 'search' && this.selectionConfig?.listId !== this.BULK_ACCESS_LIST_ID;
}
}