Skip to content

Commit

Permalink
directly link to funding call with id, if funder is research academy …
Browse files Browse the repository at this point in the history
…of finland
  • Loading branch information
konolak committed Dec 19, 2024
1 parent a04c247 commit c79b91b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ <h2 class="col-12 col-sm-4 col-lg-3 th">
<!-- Normal funding -->
<ng-container *ngIf="!item.euFunding; else euCallProgramme">
<div class="col-12 col-sm-8 col-lg-9 td">
<a [routerLink]="item.funder.callProgrammeId ? '/results/funding-call/' + item.funder.callProgrammeId : '/results/funding-calls/' + item.funder.callProgrammeName">{{ item.funder.callProgrammeName }}</a>
<!-- If funder is Academy of Finland, directly link to single funding call with id, otherwise link to search page -->
<a [routerLink]="item.funder.callProgrammeId && item.funder.funderOrganizationId === '02458939' ? '/results/funding-call/' + item.funder.callProgrammeId : '/results/funding-calls/' + item.funder.callProgrammeName">{{ item.funder.callProgrammeName }}</a>
</div>
</ng-container>

Expand Down
4 changes: 3 additions & 1 deletion src/app/portal/models/funding/funder.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class Funder {
constructor(
public name: string,
public nameUnd: string,
public funderOrganizationId: string,
public typeOfFundingId: string,
public typeOfFundingName: string,
public callProgrammeName: string,
Expand Down Expand Up @@ -45,7 +46,8 @@ export class FunderAdapter implements Adapter<Funder> {

return new Funder(
this.utils.checkTranslation('funderName', item),
item.funderNameUnd,
item.funderNameUnd,
item.funderOrganizationId,
item.typeOfFundingId,
this.utils.checkTranslation('typeOfFundingName', item)?.trim().length > 0
? this.utils.checkTranslation('typeOfFundingName', item)
Expand Down

0 comments on commit c79b91b

Please sign in to comment.