mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 13:03:04 +00:00
[CST-9636] revert changes to object-list.component
This commit is contained in:
@@ -34,16 +34,30 @@
|
||||
{{'admin.access-control.bulk-access-browse.selected.header' | translate: {number: ((objectsSelected$ | async)?.payload?.totalElements) ? (objectsSelected$ | async)?.payload?.totalElements : '0'} }}
|
||||
</a>
|
||||
<ng-template ngbNavContent>
|
||||
<ds-themed-object-list [config]="paginationOptions$ | async"
|
||||
[hideGear]="true"
|
||||
[listToPaginate]="true"
|
||||
[objects]="objectsSelected$ | async"
|
||||
[selectable]="true"
|
||||
[selectionConfig]="{ repeatable: true, listId: listId }"
|
||||
[showThumbnails]="false"
|
||||
[showPaginator]="false"
|
||||
(next)="pageNext()"
|
||||
(prev)="pagePrev()"></ds-themed-object-list>
|
||||
<ds-pagination
|
||||
[paginationOptions]="(paginationOptions$ | async)"
|
||||
[pageInfoState]="(objectsSelected$|async)?.payload.pageInfo"
|
||||
[collectionSize]="(objectsSelected$|async)?.payload?.totalElements"
|
||||
[objects]="(objectsSelected$|async)"
|
||||
[showPaginator]="false"
|
||||
(prev)="pagePrev()"
|
||||
(next)="pageNext()">
|
||||
<ul *ngIf="(objectsSelected$|async)?.hasSucceeded" class="list-unstyled ml-4">
|
||||
<li *ngFor='let object of (objectsSelected$|async)?.payload?.page | paginate: { itemsPerPage: (paginationOptions$ | async).pageSize,
|
||||
currentPage: (paginationOptions$ | async).currentPage, totalItems: (objectsSelected$|async)?.payload?.page.length }; let i = index; let last = last '
|
||||
class="mt-4 mb-4 d-flex"
|
||||
[attr.data-test]="'list-object' | dsBrowserOnly">
|
||||
<ds-selectable-list-item-control [index]="i"
|
||||
[object]="object"
|
||||
[selectionConfig]="{ repeatable: true, listId: listId }"></ds-selectable-list-item-control>
|
||||
<ds-listable-object-component-loader [listID]="listId"
|
||||
[index]="i"
|
||||
[object]="object"
|
||||
[showThumbnails]="false"
|
||||
[viewMode]="'list'"></ds-listable-object-component-loader>
|
||||
</li>
|
||||
</ul>
|
||||
</ds-pagination>
|
||||
</ng-template>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -16,46 +16,22 @@
|
||||
(prev)="goPrev()"
|
||||
(next)="goNext()">
|
||||
<ul *ngIf="objects?.hasSucceeded" class="list-unstyled" [ngClass]="{'ml-4': selectable}">
|
||||
<ng-container *ngIf="listToPaginate">
|
||||
<li *ngFor='let object of objects?.payload?.page | paginate: { itemsPerPage: config.pageSize,
|
||||
currentPage: config.currentPage, totalItems: objects?.payload?.page.length }; 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"
|
||||
[selectionConfig]="selectionConfig"
|
||||
(deselectObject)="deselectObject.emit($event)"
|
||||
(selectObject)="selectObject.emit($event)"></ds-selectable-list-item-control>
|
||||
<ds-importable-list-item-control *ngIf="importable" [object]="object"
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="importObject.emit($event)"></ds-importable-list-item-control>
|
||||
<ds-listable-object-component-loader [context]="context"
|
||||
[linkType]="linkType"
|
||||
[listID]="selectionConfig?.listId"
|
||||
[index]="i"
|
||||
[object]="object"
|
||||
[showThumbnails]="showThumbnails"
|
||||
[viewMode]="viewMode"
|
||||
(contentChange)="contentChange.emit($event)"></ds-listable-object-component-loader>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!listToPaginate">
|
||||
<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"
|
||||
[selectionConfig]="selectionConfig"
|
||||
(deselectObject)="deselectObject.emit($event)"
|
||||
(selectObject)="selectObject.emit($event)"></ds-selectable-list-item-control>
|
||||
<ds-importable-list-item-control *ngIf="importable" [object]="object"
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="importObject.emit($event)"></ds-importable-list-item-control>
|
||||
<ds-listable-object-component-loader [context]="context"
|
||||
[linkType]="linkType"
|
||||
[listID]="selectionConfig?.listId"
|
||||
[index]="i"
|
||||
[object]="object"
|
||||
[showThumbnails]="showThumbnails"
|
||||
[viewMode]="viewMode"
|
||||
(contentChange)="contentChange.emit($event)"></ds-listable-object-component-loader>
|
||||
</li>
|
||||
</ng-container>
|
||||
<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"
|
||||
[selectionConfig]="selectionConfig"
|
||||
(deselectObject)="deselectObject.emit($event)"
|
||||
(selectObject)="selectObject.emit($event)"></ds-selectable-list-item-control>
|
||||
<ds-importable-list-item-control *ngIf="importable" [object]="object"
|
||||
[importConfig]="importConfig"
|
||||
(importObject)="importObject.emit($event)"></ds-importable-list-item-control>
|
||||
<ds-listable-object-component-loader [object]="object"
|
||||
[viewMode]="viewMode"
|
||||
[index]="i"
|
||||
[context]="context"
|
||||
[linkType]="linkType"
|
||||
[listID]="selectionConfig?.listId"
|
||||
(contentChange)="contentChange.emit($event)"></ds-listable-object-component-loader>
|
||||
</li>
|
||||
</ul>
|
||||
</ds-pagination>
|
||||
|
@@ -76,11 +76,6 @@ export class ObjectListComponent {
|
||||
*/
|
||||
@Input() importConfig: { buttonLabel: string };
|
||||
|
||||
/**
|
||||
* If true the object list provided needs to be paginated using the `paginate` pipe
|
||||
*/
|
||||
@Input() listToPaginate = false;
|
||||
|
||||
/**
|
||||
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
|
||||
*/
|
||||
|
@@ -44,11 +44,6 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
|
||||
*/
|
||||
@Input() hidePagerWhenSinglePage: boolean;
|
||||
|
||||
/**
|
||||
* If true the object list provided needs to be paginated using the `paginate` pipe
|
||||
*/
|
||||
@Input() listToPaginate: boolean;
|
||||
|
||||
@Input() selectable: boolean;
|
||||
|
||||
@Input() selectionConfig: { repeatable: boolean, listId: string };
|
||||
@@ -165,7 +160,6 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
|
||||
'hidePaginationDetail',
|
||||
'importable',
|
||||
'importConfig',
|
||||
'listToPaginate',
|
||||
'showPaginator',
|
||||
'showThumbnails',
|
||||
'contentChange',
|
||||
|
Reference in New Issue
Block a user