Revision 59090
Added by Konstantinos Triantafyllou almost 4 years ago
availableOn.component.ts | ||
---|---|---|
2 | 2 |
import {HelperFunctions} from "../../utils/HelperFunctions.class"; |
3 | 3 |
import {EnvProperties} from "../../utils/properties/env-properties"; |
4 | 4 |
import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview"; |
5 |
import {properties} from "../../../../environments/environment"; |
|
5 | 6 |
|
6 | 7 |
@Component({ |
7 | 8 |
selector: 'availableOn', |
... | ... | |
36 | 37 |
</div> |
37 | 38 |
<div *ngIf="available.collectedName" class="provider"> |
38 | 39 |
<span>Provider: </span> |
39 |
<a *ngIf="available.collectedId" routerLink="/search/dataprovider" [queryParams]="{datasourceId: available.collectedId}">
|
|
40 |
<a *ngIf="available.collectedId" [routerLink]="dataProviderUrl" [queryParams]="{datasourceId: available.collectedId}">
|
|
40 | 41 |
{{available.collectedName}} |
41 | 42 |
</a> |
42 | 43 |
<span *ngIf="!available.collectedId"> |
... | ... | |
68 | 69 |
// "accessMode": string[], "bestAccessMode": string, |
69 | 70 |
// "type": string, "year": string, icon: string |
70 | 71 |
// }[]; |
71 |
@Input() properties: EnvProperties; |
|
72 | 72 |
// public open = 'assets/common-assets/unlock.svg'; |
73 | 73 |
// public closed = 'assets/common-assets/lock.svg'; |
74 | 74 |
// public unknown = 'assets/common-assets/question.svg'; |
75 | 75 |
public threshold: number = 4; |
76 | 76 |
public showNum: number = 4; |
77 |
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0]; |
|
77 | 78 |
|
78 | 79 |
constructor() { |
79 | 80 |
} |
... | ... | |
96 | 97 |
} |
97 | 98 |
|
98 | 99 |
public removeUnknown(value: string): string { |
99 |
if(this.properties.environment === 'production') {
|
|
100 |
if(properties.environment === 'production') { |
|
100 | 101 |
if (value.toLowerCase() === 'unknown') { |
101 | 102 |
return null; |
102 | 103 |
} |
Also available in: Unified diff
[Library | Trunk]: Replace static links with property url