2019-06-13 14:40:03 +02:00
import { SearchCustomFilter } from "../openaireLibrary/searchPages/searchUtils/searchUtils.class" ;
2020-11-25 18:39:05 +01:00
import { Portal } from "../openaireLibrary/utils/entities/adminTool/portal" ;
2019-06-13 14:40:03 +02:00
2020-12-15 13:48:37 +01:00
export class AggregatorInfo {
2019-06-13 14:40:03 +02:00
menuId : string ;
title : string ;
logoUrl : string ;
fieldName : string ; //Country
queryFieldName : string ; //country
valueId : string ; //gr
valueName : string ; // Greece
2021-01-28 10:45:22 +01:00
graphSectionTitle : string ;
graphSectionText : string ;
2022-02-18 15:58:47 +01:00
enableLogin : boolean ;
2022-05-03 15:53:37 +02:00
customCss :string ;
showHeaderAlways :boolean ;
2019-06-13 14:40:03 +02:00
2021-01-28 10:45:22 +01:00
constructor ( menuId : string , title : string , logoUrl : string , fieldName : string , queryFieldName : string , valueId : string ,
2022-05-03 15:53:37 +02:00
valueName : string , graphSectionTitle : string = null , graphSectionText :string = null , enableLogin :boolean = true , showHeaderAlways :boolean = true , customCss :string = "" ) {
2019-06-13 14:40:03 +02:00
this . menuId = menuId ;
this . title = title ;
this . logoUrl = logoUrl ;
this . fieldName = fieldName ;
this . queryFieldName = queryFieldName ;
this . valueId = valueId ;
this . valueName = valueName ;
2021-01-28 10:45:22 +01:00
this . graphSectionTitle = graphSectionTitle ;
this . graphSectionText = graphSectionText ;
2022-02-18 15:58:47 +01:00
this . enableLogin = enableLogin ;
2022-05-03 15:53:37 +02:00
this . showHeaderAlways = showHeaderAlways ;
this . customCss = customCss ;
2019-06-13 14:40:03 +02:00
}
}
export class PortalAggregators {
2022-08-08 16:49:07 +02:00
static eoscInfo : AggregatorInfo =
2022-11-28 13:37:37 +01:00
new AggregatorInfo ( "eosc" , "Eosc Explore" , "https://marketplace.eosc-portal.eu/packs/media/images/eosc-logo-mono-65a4962b88cf1caa9e35838e33022ca8.png" ,
2022-05-03 15:53:37 +02:00
null , null , null , null , null , null , false , false ,
`
2022-08-08 16:49:07 +02:00
` );
2020-11-25 18:39:05 +01:00
static disabled = {
2022-08-08 16:49:07 +02:00
pages : [ "/participate/deposit/search" , "/participate/deposit/learn-how" , "/participate/claim" , "/participate/direct-claim" , "/myclaims" , "/claims" , "/develop" ,
"/search/find/datasources" ] ,
entities : [ "datasource" ]
2020-11-25 18:39:05 +01:00
} ;
2019-06-13 14:40:03 +02:00
2022-08-08 16:49:07 +02:00
public static getSearchCustomFilterByAggregator ( ) : SearchCustomFilter {
// let filter:SearchCustomFilter = new SearchCustomFilter(PortalAggregators.eoscInfo.fieldName, PortalAggregators.eoscInfo.queryFieldName, PortalAggregators.eoscInfo.valueId, PortalAggregators.eoscInfo.valueName);
// filter.promptToAddFilter = false;
// filter.isHiddenFilter = true;
// console.log(PortalAggregators.eoscInfo.fieldName);
// console.log(filter);
// return filter;
return null ;
2019-06-13 14:40:03 +02:00
}
2020-11-25 18:39:05 +01:00
2022-08-08 16:49:07 +02:00
public static getCommunityInfo ( ) : any {
2023-08-04 14:29:02 +02:00
return Portal . getMockCommunityInfo ( PortalAggregators . eoscInfo . menuId , PortalAggregators . eoscInfo . title , PortalAggregators . disabled . entities , PortalAggregators . disabled . pages ) ;
2020-11-25 18:39:05 +01:00
}
2019-06-13 14:40:03 +02:00
}