64574: View more/less for metadata-representations + refactoring item pages

This commit is contained in:
Kristof De Langhe
2019-08-27 15:58:23 +02:00
parent 4afb35c53e
commit a641b20db7
8 changed files with 139 additions and 111 deletions

View File

@@ -1,10 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { MetadataRepresentation } from '../../../../core/shared/metadata-representation/metadata-representation.model';
import { Component } from '@angular/core';
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
import { RemoteData } from '../../../../core/data/remote-data';
import { PaginatedList } from '../../../../core/data/paginated-list';
@rendersItemType('Project', ItemViewMode.Full)
@Component({
@@ -15,13 +11,5 @@ import { PaginatedList } from '../../../../core/data/paginated-list';
/**
* The component for displaying metadata and relations of an item of the type Project
*/
export class ProjectComponent extends ItemComponent implements OnInit {
/**
* The contributors related to this project
*/
contributors$: Observable<RemoteData<PaginatedList<MetadataRepresentation>>>;
ngOnInit(): void {
this.contributors$ = this.buildRepresentations('OrgUnit', 'project.contributor.other', 'isOrgUnitOfProject');
}
export class ProjectComponent extends ItemComponent {
}