2019-06-13 14:40:03 +02:00
|
|
|
import {Component} from '@angular/core';
|
2019-05-24 15:54:22 +02:00
|
|
|
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
2020-12-15 13:48:37 +01:00
|
|
|
import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
|
2020-11-23 13:28:46 +01:00
|
|
|
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
|
|
|
import {properties} from "../../../environments/environment";
|
2022-05-18 14:13:42 +02:00
|
|
|
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
|
2019-05-23 15:38:44 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'openaire-search-find',
|
|
|
|
template: `
|
2022-05-18 14:13:42 +02:00
|
|
|
<search-all logoURL = "/assets/common-assets/logo-small-aggregator.png" name="OpenAIRE" [customFilter]="customFilter" [piwikSiteId]="piwikSiteId"
|
|
|
|
[searchForm]="searchForm"></search-all>
|
2019-05-23 15:38:44 +02:00
|
|
|
`,
|
|
|
|
})
|
|
|
|
export class OpenaireSearchComponent{
|
2019-06-13 14:40:03 +02:00
|
|
|
customFilter:SearchCustomFilter= null;
|
2021-11-09 11:31:44 +01:00
|
|
|
piwikSiteId = properties.piwikSiteId;
|
2022-08-08 16:20:28 +02:00
|
|
|
public searchForm: SearchForm = {class: 'search-form', dark: true};
|
2020-11-26 16:03:13 +01:00
|
|
|
constructor ( ) {}
|
2019-05-23 15:38:44 +02:00
|
|
|
ngOnInit() {
|
2020-11-23 13:28:46 +01:00
|
|
|
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
|
2020-12-15 13:48:37 +01:00
|
|
|
let agg:AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
|
2019-06-13 14:40:03 +02:00
|
|
|
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
|
2019-05-24 15:54:22 +02:00
|
|
|
|
2019-05-23 15:38:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|