mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Empty communities and collections items count are now shown. Show communities items count at the home page.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<a [routerLink]="node.route" class="lead">
|
||||
{{node.name}}
|
||||
</a>
|
||||
<span *ngIf="node.payload.archivedItemsCount" class="archived-items-lead">[{{node.payload.archivedItemsCount}}]</span>
|
||||
<span *ngIf="node.payload.archivedItemsCount >= 0" class="archived-items-lead">[{{node.payload.archivedItemsCount}}]</span>
|
||||
</h5>
|
||||
</div>
|
||||
<ds-truncatable [id]="node.id">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<span *ngIf="linkType == linkTypes.None" class="lead">
|
||||
{{object.name}}
|
||||
</span>
|
||||
<span *ngIf="object.archivedItemsCount" class="archived-items-lead">[{{object.archivedItemsCount}}]<span>
|
||||
<span *ngIf="object.archivedItemsCount >= 0" class="lead archived-items-lead">[{{object.archivedItemsCount}}]</span>
|
||||
<div *ngIf="object.shortDescription" class="text-muted abstract-text">
|
||||
{{object.shortDescription}}
|
||||
</div>
|
||||
|
@@ -18,7 +18,7 @@ const mockCollectionWithArchivedItems: Collection = Object.assign(new Collection
|
||||
}, archivedItemsCount: 1
|
||||
});
|
||||
|
||||
const mockCollectionWithoutArchivedItems: Collection = Object.assign(new Collection(), {
|
||||
const mockCollectionWithArchivedItemsDisabledAtBackend: Collection = Object.assign(new Collection(), {
|
||||
metadata: {
|
||||
'dc.title': [
|
||||
{
|
||||
@@ -26,7 +26,7 @@ const mockCollectionWithoutArchivedItems: Collection = Object.assign(new Collect
|
||||
value: 'Test title'
|
||||
}
|
||||
]
|
||||
}, archivedItemsCount: 0
|
||||
}, archivedItemsCount: -1
|
||||
});
|
||||
|
||||
|
||||
@@ -108,9 +108,9 @@ describe('CollectionListElementComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('When the collection has no archived items', () => {
|
||||
describe('When the collection archived items are disabled at backend', () => {
|
||||
beforeEach(() => {
|
||||
collectionListElementComponent.object = mockCollectionWithoutArchivedItems;
|
||||
collectionListElementComponent.object = mockCollectionWithArchivedItemsDisabledAtBackend;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
<span *ngIf="linkType == linkTypes.None" class="lead">
|
||||
{{object.name}}
|
||||
</span>
|
||||
<span *ngIf="object.archivedItemsCount >= 0" class="lead archived-items-lead">[{{object.archivedItemsCount}}]</span>
|
||||
<div *ngIf="object.shortDescription" class="text-muted abstract-text">
|
||||
{{object.shortDescription}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user