mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
turn contributors on project pages in to metadatarepresentations
This commit is contained in:
@@ -10,10 +10,10 @@
|
|||||||
[fields]="['project.identifier.status']"
|
[fields]="['project.identifier.status']"
|
||||||
[label]="'project.page.status'">
|
[label]="'project.page.status'">
|
||||||
</ds-generic-item-page-field>
|
</ds-generic-item-page-field>
|
||||||
<ds-generic-item-page-field [item]="item"
|
<ds-metadata-representation-list
|
||||||
[fields]="['project.contributor.other']"
|
[label]="'project.page.contributor' | translate"
|
||||||
[label]="'project.page.contributor'">
|
[representations]="contributors$ | async">
|
||||||
</ds-generic-item-page-field>
|
</ds-metadata-representation-list>
|
||||||
<ds-generic-item-page-field [item]="item"
|
<ds-generic-item-page-field [item]="item"
|
||||||
[fields]="['project.identifier.funder']"
|
[fields]="['project.identifier.funder']"
|
||||||
[label]="'project.page.funder'">
|
[label]="'project.page.funder'">
|
||||||
|
@@ -2,6 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { ItemDataService } from '../../../../core/data/item-data.service';
|
import { ItemDataService } from '../../../../core/data/item-data.service';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
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 { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||||
@@ -18,6 +19,11 @@ import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-rel
|
|||||||
* The component for displaying metadata and relations of an item of the type Project
|
* The component for displaying metadata and relations of an item of the type Project
|
||||||
*/
|
*/
|
||||||
export class ProjectComponent extends ItemComponent implements OnInit {
|
export class ProjectComponent extends ItemComponent implements OnInit {
|
||||||
|
/**
|
||||||
|
* The contributors related to this project
|
||||||
|
*/
|
||||||
|
contributors$: Observable<MetadataRepresentation[]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The people related to this project
|
* The people related to this project
|
||||||
*/
|
*/
|
||||||
@@ -44,6 +50,8 @@ export class ProjectComponent extends ItemComponent implements OnInit {
|
|||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
|
|
||||||
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
if (isNotEmpty(this.resolvedRelsAndTypes$)) {
|
||||||
|
this.contributors$ = this.buildRepresentations('OrgUnit', 'project.contributor.other', this.ids);
|
||||||
|
|
||||||
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
this.people$ = this.resolvedRelsAndTypes$.pipe(
|
||||||
filterRelationsByTypeLabel('isPersonOfProject'),
|
filterRelationsByTypeLabel('isPersonOfProject'),
|
||||||
relationsToItems(this.item.id, this.ids)
|
relationsToItems(this.item.id, this.ids)
|
||||||
|
Reference in New Issue
Block a user