mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
64574: View-more/less for related-items + refactoring item pages
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { MetadataRepresentation } from '../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
@@ -22,26 +21,7 @@ export class ProjectComponent extends ItemComponent implements OnInit {
|
||||
*/
|
||||
contributors$: Observable<RemoteData<PaginatedList<MetadataRepresentation>>>;
|
||||
|
||||
/**
|
||||
* The people related to this project
|
||||
*/
|
||||
people$: Observable<RemoteData<PaginatedList<Item>>>;
|
||||
|
||||
/**
|
||||
* The publications related to this project
|
||||
*/
|
||||
publications$: Observable<RemoteData<PaginatedList<Item>>>;
|
||||
|
||||
/**
|
||||
* The organisation units related to this project
|
||||
*/
|
||||
orgUnits$: Observable<RemoteData<PaginatedList<Item>>>;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.contributors$ = this.buildRepresentations('OrgUnit', 'project.contributor.other', 'isOrgUnitOfProject');
|
||||
|
||||
this.people$ = this.relationshipService.getRelatedItemsByLabel(this.item, 'isPersonOfProject');
|
||||
this.publications$ = this.relationshipService.getRelatedItemsByLabel(this.item, 'isPublicationOfProject');
|
||||
this.orgUnits$ = this.relationshipService.getRelatedItemsByLabel(this.item, 'isOrgUnitOfProject');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user