diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 186e5ace..abcea652 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -13,7 +13,7 @@ declare var UIkit;
+ uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)"> @@ -52,7 +52,7 @@ declare var UIkit;
+ uk-tooltip [title]="getAccessLabel(instance.accessRight)">
@@ -130,4 +130,11 @@ export class AvailableOnComponent { this.availableListFsModal.okButton = false; this.availableListFsModal.open(); } + + public getAccessLabel(accessRight) : string { + if(accessRight) { + return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access")); + } + return "Not available access"; + } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index cb7e2e7b..07f1535b 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -490,7 +490,7 @@ class="uk-margin-small-bottom uk-flex uk-flex-middle" [ngClass]="(resultLandingInfo.hostedBy_collectedFrom[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"> - {{(resultLandingInfo.hostedBy_collectedFrom[0].accessRight ? resultLandingInfo.hostedBy_collectedFrom[0].accessRight : 'Not available') + ' access'}} + {{getAccessLabel(resultLandingInfo.hostedBy_collectedFrom[0].accessRight)}}
+ uk-tooltip [title]="getAccessLabel(result.hostedBy_collectedFrom[0].accessRight)">
diff --git a/utils/result-preview/result-preview.component.ts b/utils/result-preview/result-preview.component.ts index d6a88335..6e253824 100644 --- a/utils/result-preview/result-preview.component.ts +++ b/utils/result-preview/result-preview.component.ts @@ -219,4 +219,11 @@ export class ResultPreviewComponent implements OnInit, OnChanges { let formatted = NumberUtils.roundNumber(+num); return formatted.number + formatted.size; } + + public getAccessLabel(accessRight) : string { + if(accessRight) { + return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access")); + } + return "Not available access"; + } }