1 |
56645
|
k.triantaf
|
import {Component} from '@angular/core';
|
2 |
54949
|
argiro.kok
|
import {ActivatedRoute} from '@angular/router';
|
3 |
52831
|
sofia.balt
|
import {PiwikHelper} from '../../utils/piwikHelper';
|
4 |
|
|
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
5 |
|
|
|
6 |
|
|
@Component({
|
7 |
|
|
selector: 'openaire-orp',
|
8 |
56970
|
konstantin
|
template: `
|
9 |
|
|
<result-landing type="orp" [piwikSiteId]="piwikSiteId" [communityId]="communityId" [activeTab]="'References'"></result-landing>
|
10 |
|
|
`,
|
11 |
52831
|
sofia.balt
|
})
|
12 |
|
|
|
13 |
|
|
export class OpenaireOrpComponent {
|
14 |
|
|
piwikSiteId = null;
|
15 |
56645
|
k.triantaf
|
communityId = null;
|
16 |
54949
|
argiro.kok
|
constructor (private route: ActivatedRoute ) {
|
17 |
|
|
this.route.data
|
18 |
|
|
.subscribe((data: { envSpecific: any }) => {
|
19 |
56841
|
konstantin
|
this.route.queryParams.subscribe(params => {
|
20 |
|
|
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
21 |
|
|
if (!this.communityId) {
|
22 |
|
|
this.communityId = params['communityId'];
|
23 |
|
|
}
|
24 |
|
|
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId, data.envSpecific.environment);
|
25 |
|
|
});
|
26 |
54949
|
argiro.kok
|
});
|
27 |
52831
|
sofia.balt
|
}
|
28 |
|
|
|
29 |
54949
|
argiro.kok
|
|
30 |
52831
|
sofia.balt
|
ngOnInit() {
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
}
|