[Aggregator | Trunk]

- Rename FilterInfo to Aggregator Info
- add colors and background
- customize colors and background base on the aggregator choices
- Home:
	- numbers visualization when a number is hidden
	- add links to search
	- enable quick filter for search all page




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-aggregator-portal/trunk@60133 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-12-15 12:48:37 +00:00
parent b4e6e6d9e8
commit 38ca2dea7b
18 changed files with 155 additions and 108 deletions

View File

@ -1,9 +1,8 @@
import {Component} from '@angular/core'; import {Component, Inject, RendererFactory2, ViewEncapsulation} from '@angular/core';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu'; import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service'; import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
import {FilterInfo, PortalAggregators} from "./utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "./utils/aggregators";
import {UserManagementService} from "./openaireLibrary/services/user-management.service"; import {UserManagementService} from "./openaireLibrary/services/user-management.service";
import {User} from "./openaireLibrary/login/utils/helper.class"; import {User} from "./openaireLibrary/login/utils/helper.class";
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component"; import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
@ -12,6 +11,7 @@ import {properties} from "../environments/environment";
import {ConnectHelper} from "./openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "./openaireLibrary/connect/connectHelper";
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service"; import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {DOCUMENT} from "@angular/common";
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -52,12 +52,13 @@ export class AppComponent {
loginCheck: boolean = false; loginCheck: boolean = false;
footer = portalProperties.sectionFooter; footer = portalProperties.sectionFooter;
header: Header; header: Header;
agg: FilterInfo = null; agg: AggregatorInfo = null;
subscriptions = []; subscriptions = [];
constructor(private propertiesService: EnvironmentSpecificService, constructor(private propertiesService: EnvironmentSpecificService,
private userManagementService: UserManagementService, private configurationService: ConfigurationService) { private userManagementService: UserManagementService, private configurationService: ConfigurationService, @Inject(DOCUMENT) private document, private rendererFactory: RendererFactory2) {
this.id = ConnectHelper.getCommunityFromDomain(this.properties.domain); this.id = ConnectHelper.getCommunityFromDomain(this.properties.domain);
this.agg = PortalAggregators.getFilterInfoByMenuId(this.id); this.agg = PortalAggregators.getFilterInfoByMenuId(this.id);
this.setStyles();
this.configurationService.initStaticCommunityInformation(PortalAggregators.getCommunityInfoByMenuId(this.id)); this.configurationService.initStaticCommunityInformation(PortalAggregators.getCommunityInfoByMenuId(this.id));
} }
ngOnDestroy() { ngOnDestroy() {
@ -92,7 +93,8 @@ export class AppComponent {
this.loginCheck = true; this.loginCheck = true;
this.userMenuItems = []; this.userMenuItems = [];
if (this.user) { if (this.user) {
this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {})); this.userMenuItems.push(new MenuItem("", "My links", "", "/myclaims", false, [], [], {}));
// this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {}));
} }
})); }));
} }
@ -122,4 +124,47 @@ export class AppComponent {
this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/search/find/organizations", false, ["organization"], ["/search/find/organizations"], params)); this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/search/find/organizations", false, ["organization"], ["/search/find/organizations"], params));
} }
setStyles(){
let css:string =':root {\n';
if(this.agg.mainColor){
css = css.concat('--portal-main-color: ' + this.agg.mainColor + ';\n');
}
if(this.agg.darkColor){
css = css.concat('--portal-dark-color: ' + this.agg.darkColor + ';\n');
}
if(this.agg.darkColor){
css = css.concat("--graph-background: url('" + this.agg.background + "\') no-repeat bottom;\n");
}
css = css.concat('}');
try {
if( this.document.getElementById('customStyle')){
try {
this.document.getElementById('customStyle').append(css);
}catch(e){
console.log("error with append style")
}
}else {
const renderer = this.rendererFactory.createRenderer(this.document, {
id: '-1',
encapsulation: ViewEncapsulation.None,
styles: [],
data: {}
});
const head = this.document.head;
if (head === null) {
throw new Error('<head> not found within DOCUMENT.');
}
const style = renderer.createElement('style');
renderer.setAttribute(style, "id", "customStyle");
let CSSElement = renderer.createText(css);
renderer.appendChild(head, style);
renderer.appendChild(style, CSSElement);
}
} catch (e) {
console.error('Renderrer Error to append style ', e);
}
}
} }

View File

@ -174,22 +174,26 @@
Our growing <span class="uk-text-bold">Community</span> Our growing <span class="uk-text-bold">Community</span>
</h3> </h3>
<div class="uk-margin-large-top uk-container uk-margin-bottom uk-text-center"> <div class="uk-margin-large-top uk-container uk-margin-bottom uk-text-center">
<div class="uk-grid uk-child-width-1-3@m"> <div class="uk-grid uk-flex uk-flex-center">
<div *ngIf="fundersSize"> <div *ngIf="fundersSize" class="uk-width-1-3@m">
<h3 class="portal-color"> <h3 class="portal-color">
<span class="uk-text-bold number"> {{fundersSize.number|number}}</span>{{fundersSize.size}} <a [routerLink]="properties.searchLinkToProjects" class="uk-text-bold number">
{{fundersSize.number|number}}</a>{{fundersSize.size}}
</h3> </h3>
<span class="uk-text-uppercase uk-text-large">Funders</span> <span class="uk-text-uppercase uk-text-large">Funders</span>
</div> </div>
<div *ngIf="datasourcesSize"> <div *ngIf="datasourcesSize" class="uk-width-1-3@m">
<h3 class="portal-color"> <h3 class="portal-color">
<span class="uk-text-bold number"> {{datasourcesSize.number|number}}</span>{{datasourcesSize.size}} <a [routerLink]="properties.searchLinkToDataProviders" class="uk-text-bold number">
{{datasourcesSize.number|number}}</a>{{datasourcesSize.size}}
</h3> </h3>
<span class="uk-text-uppercase uk-text-large">Content providers</span> <span class="uk-text-uppercase uk-text-large">Content providers</span>
</div> </div>
<div *ngIf="projectsSize"> <div *ngIf="projectsSize" class="uk-width-1-3@m">
<h3 class="portal-color"> <h3 class="portal-color">
<span class="uk-text-bold number"> {{projectsSize.number|number}}</span>{{projectsSize.size}} <a [routerLink]="properties.searchLinkToProjects" class="uk-text-bold number">
{{projectsSize.number|number}}</a>{{projectsSize.size}}
</h3> </h3>
<span class="uk-text-uppercase uk-text-large">Projects</span> <span class="uk-text-uppercase uk-text-large">Projects</span>
</div> </div>
@ -201,69 +205,51 @@
</div> </div>
<div class="numbers-background uk-section"> <div class="numbers-background uk-section">
<div class="uk-container"> <div class="uk-container">
<div class="uk-grid uk-margin-auto-left uk-margin-auto-right uk-grid-large uk-child-width-1-2@m" uk-grid> <div class="uk-grid uk-margin-auto-left uk-margin-auto-right uk-grid-large uk-flex uk-flex-center " uk-grid>
<div *ngIf="publicationsSize || softwareSize || datasetsSize" <div *ngIf="publicationsSize" class="uk-width-1-2@m uk-flex uk-flex-center">
class="uk-margin-medium-bottom uk-flex uk-flex-center">
<div> <div>
<div *ngIf="publicationsSize"> <a class="number uk-text-bold uk-margin-bottom" [routerLink]="properties.searchLinkToResults"
<div class="number uk-text-bold uk-margin-bottom">{{publicationsSize.count|number}} </div> [queryParams]="{type: 'publications', qf: false}">
<div class="uk-text-uppercase uk-flex uk-flex-middle"> {{publicationsSize.count|number}} </a>
<icon name="book" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon> <div class="uk-text-uppercase uk-flex uk-flex-middle">
<span>publications</span> <icon name="book" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon>
</div> <span>publications</span>
</div>
<div *ngIf="softwareSize" class="uk-visible@m">
<div
class="number uk-text-bold uk-margin-medium-top uk-margin-bottom">{{softwareSize.count|number}} </div>
<div class="uk-text-uppercase uk-flex uk-flex-middle">
<icon name="cog" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon>
<span>software</span>
</div>
</div>
<div *ngIf="otherSize && !softwareSize" class="uk-visible@m">
<div class="number uk-text-bold uk-margin-medium-top uk-margin-bottom">{{otherSize.count|number}} </div>
<div class="uk-text-uppercase uk-flex uk-flex-middle">
<icon name="earth" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon>
<span class="uk-hidden@m">other research<br>products</span>
<span class="uk-visible@m">other research products</span>
</div>
</div>
<div *ngIf="datasetsSize" class="uk-hidden@m">
<div
class="number uk-text-bold uk-margin-medium-top uk-margin-bottom">{{datasetsSize.count|number}} </div>
<div class="uk-text-uppercase uk-flex uk-flex-middle">
<icon name="database" ratio="1.5" [flex]="true" class="uk-margin-right"
customClass="portal-color"></icon>
<span>research data</span>
</div>
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="softwareSize || datasetsSize || otherSize" <div *ngIf="datasetsSize" class="uk-width-1-2@m uk-flex uk-flex-center">
class="uk-margin-medium-bottom uk-flex uk-flex-center">
<div> <div>
<div *ngIf="softwareSize" class="uk-hidden@m"> <a class="number uk-text-bold uk-margin-bottom"
<div class="number uk-text-bold uk-margin-bottom">{{softwareSize.count|number}} </div> [routerLink]="properties.searchLinkToResults"
<div class="uk-text-uppercase uk-flex uk-flex-middle"> [queryParams]="{type: 'datasets', qf: false}">{{datasetsSize.count|number}} </a>
<icon name="cog" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon>
<span>software</span> <div class="uk-text-uppercase uk-flex uk-flex-middle">
</div> <icon name="database" ratio="1.5" [flex]="true" class="uk-margin-right"
customClass="portal-color"></icon>
<span>research data</span>
</div> </div>
<div *ngIf="datasetsSize" class="uk-visible@m"> </div>
<div class="number uk-text-bold uk-margin-bottom">{{datasetsSize.count|number}} </div> </div>
<div class="uk-text-uppercase uk-flex uk-flex-middle"> <div *ngIf="softwareSize" class="uk-width-1-2@m uk-flex uk-flex-center">
<icon name="database" ratio="1.5" [flex]="true" class="uk-margin-right" <div>
customClass="portal-color"></icon> <a
<span>research data</span> class="number uk-text-bold uk-margin-bottom" [routerLink]="properties.searchLinkToResults"
</div> [queryParams]="{type: 'software', qf: false}">
{{softwareSize.count|number}} </a>
<div class="uk-text-uppercase uk-flex uk-flex-middle">
<icon name="cog" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon>
<span>software</span>
</div> </div>
<div *ngIf="otherSize" [class.uk-hidden@m]="!softwareSize"> </div>
<div class="number uk-text-bold uk-margin-medium-top uk-margin-bottom">{{otherSize.count|number}} </div> </div>
<div class="uk-text-uppercase uk-flex uk-flex-middle"> <div *ngIf="otherSize" class="uk-width-1-2@m uk-flex uk-flex-center">
<icon name="earth" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon> <div>
<span class="uk-hidden@m">other research<br>products</span> <a class="number uk-text-bold uk-margin-bottom" [routerLink]="properties.searchLinkToResults"
<span class="uk-visible@m">other research products</span> [queryParams]="{type: 'other', qf: false}">{{otherSize.count|number}} </a>
</div> <div class="uk-text-uppercase uk-flex uk-flex-middle">
<icon name="earth" ratio="1.5" [flex]="true" class="uk-margin-right" customClass="portal-color"></icon>
<span class="uk-hidden@m">other research<br>products</span>
<span class="uk-visible@m">other research products</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -20,7 +20,7 @@ import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service'
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service"; import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class"; import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
import {FilterInfo, PortalAggregators} from "../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../utils/aggregators";
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {portalProperties} from "../../environments/environment-aggregator"; import {portalProperties} from "../../environments/environment-aggregator";
@ -75,7 +75,7 @@ export class HomeComponent {
public pageContents = null; public pageContents = null;
customFilter:SearchCustomFilter= null; customFilter:SearchCustomFilter= null;
aggregatorId; aggregatorId;
aggregator:FilterInfo; aggregator:AggregatorInfo;
constructor ( constructor (
private route: ActivatedRoute, private route: ActivatedRoute,
private _router: Router, private _router: Router,
@ -325,6 +325,11 @@ export class HomeComponent {
parameterValues.push("" + this.resultsQuickFilter.selected); parameterValues.push("" + this.resultsQuickFilter.selected);
} }
} }
}else if(this.selectedEntity == "all"){
if (this.resultsQuickFilter) {
parameterNames.push("qf");
parameterValues.push("true");
}
} }
if(this.keyword.length > 0) { if(this.keyword.length > 0) {
parameterNames.push("fv0"); parameterNames.push("fv0");

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -23,7 +23,7 @@ export class OpenaireAdvancedSearchDataProvidersComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -23,7 +23,7 @@ export class OpenaireAdvancedSearchOrganizationsComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -22,7 +22,7 @@ export class OpenaireAdvancedSearchProjectsComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,5 +1,5 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@ -20,7 +20,7 @@ export class OpenaireSearchResearchResultsComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@ -15,7 +15,7 @@ export class OpenaireSearchComponent{
constructor ( ) {} constructor ( ) {}
ngOnInit() { ngOnInit() {
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg:AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -21,7 +21,7 @@ export class OpenaireSearchDataprovidersComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -22,7 +22,7 @@ export class OpenaireSearchOrganizationsComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg:AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,6 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -21,7 +21,7 @@ export class OpenaireSearchProjectsComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -20,7 +20,7 @@ export class OpenaireSearchResearchResultsComponent {
ngOnInit() { ngOnInit() {
this.properties = properties; this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain); let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); let agg:AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
} }
} }

View File

@ -1,7 +1,7 @@
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {Portal} from "../openaireLibrary/utils/entities/adminTool/portal"; import {Portal} from "../openaireLibrary/utils/entities/adminTool/portal";
export class FilterInfo { export class AggregatorInfo {
menuId: string; menuId: string;
title: string; title: string;
logoUrl: string; logoUrl: string;
@ -9,8 +9,11 @@ export class FilterInfo {
queryFieldName: string; //country queryFieldName: string; //country
valueId: string; //gr valueId: string; //gr
valueName: string; // Greece valueName: string; // Greece
mainColor:string;
darkColor:string;
background:string;
constructor(menuId: string, title: string, logoUrl: string, fieldName: string, queryFieldName: string, valueId: string, valueName: string) { constructor(menuId: string, title: string, logoUrl: string, fieldName: string, queryFieldName: string, valueId: string, valueName: string, mainColor:string=null, darkColor:string=null, background:string=null) {
this.menuId = menuId; this.menuId = menuId;
this.title = title; this.title = title;
this.logoUrl = logoUrl; this.logoUrl = logoUrl;
@ -18,28 +21,31 @@ export class FilterInfo {
this.queryFieldName = queryFieldName; this.queryFieldName = queryFieldName;
this.valueId = valueId; this.valueId = valueId;
this.valueName = valueName; this.valueName = valueName;
this.mainColor = mainColor;
this.darkColor = darkColor;
this.background = background;
} }
} }
export class PortalAggregators { export class PortalAggregators {
static list: FilterInfo[] = [ static list: AggregatorInfo[] = [
new FilterInfo("canada", "Canadian Aggregator", "assets/canada-logo.png", "Country", "country", "CA", "Canada"), new AggregatorInfo("canada", "Canadian Aggregator", "assets/canada-logo.png", "Country", "country", "CA", "Canada","#E80000","#ad0000", "/assets/canada-background.svg" ),
new FilterInfo("italy", "Italian Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"), new AggregatorInfo("italy", "Italian Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"),
new FilterInfo("greece", "Greek Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece"), new AggregatorInfo("greece", "Greek Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece"),
]; ];
static disabled = { static disabled = {
"canada": {pages: [], entities: ["software"]}, "canada": {pages: [], entities: []},
"italy": {pages: [], entities: []}, "italy": {pages: [], entities: []},
"greece": {pages: [], entities: []} "greece": {pages: [], entities: ["dataset"]}
}; };
static defaultAggregator: FilterInfo = PortalAggregators.list[0]; static defaultAggregator: AggregatorInfo = PortalAggregators.list[0];
public static getList(): FilterInfo[] { public static getList(): AggregatorInfo[] {
return PortalAggregators.list; return PortalAggregators.list;
} }
public static getFilterInfoByMenuId(menuId: string): FilterInfo { public static getFilterInfoByMenuId(menuId: string): AggregatorInfo {
for (let agg of this.getList()) { for (let agg of this.getList()) {
if (agg.menuId == menuId) { if (agg.menuId == menuId) {
return agg; return agg;
@ -48,7 +54,7 @@ export class PortalAggregators {
return PortalAggregators.defaultAggregator; return PortalAggregators.defaultAggregator;
} }
public static getSearchCustomFilterByAggregator(agg: FilterInfo): SearchCustomFilter { public static getSearchCustomFilterByAggregator(agg: AggregatorInfo): SearchCustomFilter {
let filter:SearchCustomFilter = null; let filter:SearchCustomFilter = null;
if(agg) { if(agg) {
filter = new SearchCustomFilter(agg.fieldName, agg.queryFieldName, agg.valueId, agg.valueName); filter = new SearchCustomFilter(agg.fieldName, agg.queryFieldName, agg.valueId, agg.valueName);

View File

@ -1,14 +1,16 @@
:root { :root {
--portal-main-color: #E80000; --portal-main-color: #2d72d6;
--portal-main-contrast: white; --portal-main-contrast: white;
--portal-dark-color: #ad0000; --portal-dark-color: #313179;
--openaire-main-color: #313179; --openaire-main-color: #313179;
--graph-background: no-repeat bottom;;
} }
.graph-background { .graph-background {
background-size: cover !important; background-size: cover !important;
padding-bottom: 100px; padding-bottom: 100px;
background: #FAFAFA url('/assets/canada-background.svg') no-repeat bottom; background-color: #FAFAFA !important;
background: var(--graph-background);
} }
.mainPageSearchForm{ .mainPageSearchForm{
background-color: white !important; background-color: white !important;
@ -46,3 +48,6 @@
.numbers-background { .numbers-background {
background: transparent url('numbers_background_pattern.svg') 0 0 repeat-x padding-box; background: transparent url('numbers_background_pattern.svg') 0 0 repeat-x padding-box;
} }
.number {
color: #1d1d1d;
}

View File

@ -4,7 +4,7 @@ export let properties: EnvProperties = {
environment: "beta", environment: "beta",
adminToolsPortalType: "aggregator", adminToolsPortalType: "aggregator",
dashboard: "explore", dashboard: "explore",
enablePiwikTrack: true, enablePiwikTrack: false,
useCache: false, useCache: false,
useLongCache: true, useLongCache: true,
showAddThis: true, showAddThis: true,

View File

@ -39,7 +39,7 @@
<meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<link id="customCss" rel="stylesheet" href="">
<title>Search OpenAIRE</title> <title>Search OpenAIRE</title>
</head> </head>

View File

@ -39,7 +39,7 @@
<meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<link id="customCss" rel="stylesheet" href="">
<title>Search OpenAIRE</title> <title>Search OpenAIRE</title>
</head> </head>

View File

@ -39,7 +39,7 @@
<meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
<link id="customCss" rel="stylesheet" href="">
<title>Search OpenAIRE</title> <title>Search OpenAIRE</title>
</head> </head>