2021-04-01 16:25:15 +02:00
|
|
|
import {Component, OnInit} from '@angular/core';
|
2020-08-13 13:16:44 +02:00
|
|
|
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
|
|
|
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
2020-11-30 18:04:05 +01:00
|
|
|
import {properties} from "../../../environments/environment";
|
2020-08-13 13:16:44 +02:00
|
|
|
|
2021-04-01 16:25:15 +02:00
|
|
|
@Component({
|
|
|
|
selector: 'openaire-advanced-search-projects',
|
|
|
|
template: `
|
2023-07-13 10:48:23 +02:00
|
|
|
<search-projects [simpleView]="false" [customFilter]=customFilter [hasPrefix]="false"
|
2022-07-21 09:46:39 +02:00
|
|
|
[showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
|
2021-04-01 16:25:15 +02:00
|
|
|
</search-projects>
|
|
|
|
|
|
|
|
`
|
|
|
|
})
|
2020-08-13 13:16:44 +02:00
|
|
|
|
2021-04-01 16:25:15 +02:00
|
|
|
export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
|
|
|
|
communityId: string;
|
2020-08-13 13:16:44 +02:00
|
|
|
customFilter: SearchCustomFilter = null;
|
2021-04-01 16:25:15 +02:00
|
|
|
|
|
|
|
constructor() {
|
2020-11-12 16:59:26 +01:00
|
|
|
}
|
2021-04-01 16:25:15 +02:00
|
|
|
|
2020-08-13 13:16:44 +02:00
|
|
|
ngOnInit() {
|
2021-04-01 16:25:15 +02:00
|
|
|
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
|
|
|
if (communityId) {
|
|
|
|
this.communityId = communityId;
|
|
|
|
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
|
|
|
this.customFilter.isHiddenFilter = false;
|
|
|
|
}
|
2020-08-13 13:16:44 +02:00
|
|
|
}
|
|
|
|
}
|