1
|
import {Component, OnInit} from '@angular/core';
|
2
|
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
3
|
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
4
|
import {PiwikHelper} from "../../utils/piwikHelper";
|
5
|
import {properties} from "../../../environments/environment";
|
6
|
|
7
|
@Component({
|
8
|
selector: 'openaire-advanced-search-projects',
|
9
|
template: `
|
10
|
<search-projects [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"
|
11
|
[showBreadcrumb]="true" [showSwitchSearchLink]="false">
|
12
|
</search-projects>
|
13
|
|
14
|
`
|
15
|
})
|
16
|
|
17
|
export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
|
18
|
communityId: string;
|
19
|
piwikSiteId;
|
20
|
customFilter: SearchCustomFilter = null;
|
21
|
|
22
|
constructor() {
|
23
|
}
|
24
|
|
25
|
ngOnInit() {
|
26
|
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
27
|
if (communityId) {
|
28
|
this.communityId = communityId;
|
29
|
this.piwikSiteId = PiwikHelper.getSiteId(communityId, properties.environment);
|
30
|
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
31
|
this.customFilter.isHiddenFilter = false;
|
32
|
}
|
33
|
}
|
34
|
}
|