eosc-explore/src/app/utils/aggregators.ts

66 lines
2.5 KiB
TypeScript
Raw Normal View History

import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {Portal} from "../openaireLibrary/utils/entities/adminTool/portal";
export class AggregatorInfo {
menuId: string;
title: string;
logoUrl: string;
fieldName: string; //Country
queryFieldName: string; //country
valueId: string; //gr
valueName: string; // Greece
graphSectionTitle: string;
graphSectionText: string;
2022-02-18 15:58:47 +01:00
enableLogin: boolean;
customCss:string;
showHeaderAlways:boolean;
constructor(menuId: string, title: string, logoUrl: string, fieldName: string, queryFieldName: string, valueId: string,
valueName: string, graphSectionTitle: string = null, graphSectionText:string = null, enableLogin:boolean = true, showHeaderAlways:boolean = true, customCss:string = "" ) {
this.menuId = menuId;
this.title = title;
this.logoUrl = logoUrl;
this.fieldName = fieldName;
this.queryFieldName = queryFieldName;
this.valueId = valueId;
this.valueName = valueName;
this.graphSectionTitle = graphSectionTitle;
this.graphSectionText = graphSectionText;
2022-02-18 15:58:47 +01:00
this.enableLogin = enableLogin;
this.showHeaderAlways = showHeaderAlways;
this.customCss = customCss;
}
}
export class PortalAggregators {
static eoscInfo: AggregatorInfo =
[Library | EOSC Explore]: Updated styles | Updated link to Marketplace for EOSC::RO-crate | Bug fix in description of results versions | Removed timeout from reports.service.ts. 1. home.component.html: Added blue banner, white logo, aligned search form to the center and updated fonts according the new EOSC Marketplace. 2. parsingFunctions.class.ts: Updated link to Marketplace for eosc subject EOSC::RO-crate. 3. resultLanding.component.html: Updated how links to Compatible EOSC Services are displayed. 4. searchAll.component.html: Updated paddings and margins in search form of Search all page. 5. navigationBar.component.html: Set burger menu icon to light color if dark background. 6. advancedSearchDataProviders.component.ts & advancedSearchOrganizations.component.ts & advancedSearchProjects.component.ts & advancedSearchServices.component.ts & searchResearchResults.component.ts & searchDataproviders.component.ts & searchOrganizations.component.ts & searchProjects.component.ts & searchResearchResults.component.ts & searchServices.component.ts & search.component.ts: Set in searchForm, dark=true. 7. aggregators.ts: In eoscInfo, updated logoUrl and removed customCss of AggregatorInfo. 8. app.component.ts: Set header.darkBg: true. 9. Added eosc-custom.less file. 10. styles.less: import eosc-custom less file, instead of portal-custom.css. 11. deletedByInference.service.ts & result-preview.ts: [Bug fix] Parse description of versions properly. 12. reports.service.ts: Copy fix from angular-14 branch - do not timeout to 10000.
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",
null, null, null, null,null,null ,false,false,
`
`);
static disabled = {
pages: ["/participate/deposit/search", "/participate/deposit/learn-how","/participate/claim", "/participate/direct-claim", "/myclaims","/claims", "/develop",
"/search/find/datasources"],
entities: ["datasource"]
};
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;
}
public static getCommunityInfo(): any {
return Portal.getMockCommunityInfo(PortalAggregators.eoscInfo.menuId, PortalAggregators.eoscInfo.title, PortalAggregators.disabled.entities,PortalAggregators.disabled.pages);
}
}