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">
|
<a [routerLink]="node.route" class="lead">
|
||||||
{{node.name}}
|
{{node.name}}
|
||||||
</a>
|
</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>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<ds-truncatable [id]="node.id">
|
<ds-truncatable [id]="node.id">
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<span *ngIf="linkType == linkTypes.None" class="lead">
|
<span *ngIf="linkType == linkTypes.None" class="lead">
|
||||||
{{object.name}}
|
{{object.name}}
|
||||||
</span>
|
</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">
|
<div *ngIf="object.shortDescription" class="text-muted abstract-text">
|
||||||
{{object.shortDescription}}
|
{{object.shortDescription}}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -18,7 +18,7 @@ const mockCollectionWithArchivedItems: Collection = Object.assign(new Collection
|
|||||||
}, archivedItemsCount: 1
|
}, archivedItemsCount: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
const mockCollectionWithoutArchivedItems: Collection = Object.assign(new Collection(), {
|
const mockCollectionWithArchivedItemsDisabledAtBackend: Collection = Object.assign(new Collection(), {
|
||||||
metadata: {
|
metadata: {
|
||||||
'dc.title': [
|
'dc.title': [
|
||||||
{
|
{
|
||||||
@@ -26,7 +26,7 @@ const mockCollectionWithoutArchivedItems: Collection = Object.assign(new Collect
|
|||||||
value: 'Test title'
|
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(() => {
|
beforeEach(() => {
|
||||||
collectionListElementComponent.object = mockCollectionWithoutArchivedItems;
|
collectionListElementComponent.object = mockCollectionWithArchivedItemsDisabledAtBackend;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
<span *ngIf="linkType == linkTypes.None" class="lead">
|
<span *ngIf="linkType == linkTypes.None" class="lead">
|
||||||
{{object.name}}
|
{{object.name}}
|
||||||
</span>
|
</span>
|
||||||
|
<span *ngIf="object.archivedItemsCount >= 0" class="lead archived-items-lead">[{{object.archivedItemsCount}}]</span>
|
||||||
<div *ngIf="object.shortDescription" class="text-muted abstract-text">
|
<div *ngIf="object.shortDescription" class="text-muted abstract-text">
|
||||||
{{object.shortDescription}}
|
{{object.shortDescription}}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user