diff --git a/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.html b/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.html index 761572398..70faf0bb1 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.html +++ b/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.html @@ -23,8 +23,8 @@
  • + href="/{{ viewcode }}/{{ getContributorLinkType(contribution.agent.type) }}/{{ contribution.agent.pid }}" + [innerHTML]="contribution | contributionFormat"> ;
  • diff --git a/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.ts b/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.ts index 6b454a1e0..50801c4be 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.ts +++ b/projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component.ts @@ -53,6 +53,19 @@ export class PatronProfileDocumentComponent implements OnInit { ).filter(Boolean).join(' | '); } + /** + * Translate contribution type to parameter + * @param type - contribution type + * @returns string, contribution parameter + */ + getContributorLinkType(type: string): string { + switch (type) { + case 'bf:Person': return 'persons'; + case 'bf:Organisation': return 'corporate-bodies'; + default: return type; + } + } + // CONSTRUCTOR & HOOKS ====================================================== /** * Constructor