[Aggregator| Trunk]

- update aggregator custom filter
- add link to explore for search pages
- remove aggregator parameters from menu links



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-aggregator-portal/trunk@59973 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-11-26 15:03:13 +00:00
parent fcf246099e
commit 570ce5e570
11 changed files with 48 additions and 62 deletions

View File

@ -115,13 +115,11 @@ export class AppComponent {
}
];
let params = {};
params[this.agg.queryFieldName] = this.agg.valueId;
this.menuItems[1].items.push(new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], params))
this.menuItems[1].items.push(new MenuItem("", "Projects", "", "/search/find/projects", false, ["project"], ["/search/find/projects"],
{cf: true}));
this.menuItems[1].items.push(new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], params))
this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/search/find/organizations", false, ["organization"], ["/search/find/organizations"], params))
// params[this.agg.queryFieldName] = this.agg.valueId;
this.menuItems[1].items.push(new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], params));
this.menuItems[1].items.push(new MenuItem("", "Projects", "", "/search/find/projects", false, ["project"], ["/search/find/projects"], params));
this.menuItems[1].items.push(new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], params));
this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/search/find/organizations", false, ["organization"], ["/search/find/organizations"], params));
}
}

View File

@ -1,15 +1,15 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-advanced-search-dataprovider',
template: `
<search-dataproviders [customFilter]="customFilter" [simpleView]="false">
<search-dataproviders [customFilter]="customFilter" [simpleView]="false" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/advanced/dataproviders'">
</search-dataproviders>
`
@ -18,12 +18,10 @@ import {properties} from "../../../environments/environment";
export class OpenaireAdvancedSearchDataProvidersComponent {
customFilter: SearchCustomFilter = null;
constructor(private route: ActivatedRoute) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,15 +1,15 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-advanced-search-organizations',
template: `
<search-organizations [customFilter]="customFilter" [simpleView]="false">
<search-organizations [customFilter]="customFilter" [simpleView]="false" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/advanced/organizations'">
</search-organizations>
`
@ -18,11 +18,10 @@ import {properties} from "../../../environments/environment";
export class OpenaireAdvancedSearchOrganizationsComponent {
customFilter:SearchCustomFilter= null;
constructor(private route: ActivatedRoute) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,14 +1,14 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-advanced-search-projects',
template: `
<search-projects [customFilter]="customFilter" [simpleView]="false">
<search-projects [customFilter]="customFilter" [simpleView]="false" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/advanced/projects'">
</search-projects>
`
@ -17,11 +17,10 @@ import {properties} from "../../../environments/environment";
export class OpenaireAdvancedSearchProjectsComponent {
customFilter:SearchCustomFilter= null;
constructor(private route: ActivatedRoute) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,23 +1,24 @@
import {Component, Input} from '@angular/core';
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" [simpleView]="false" [customFilter]="customFilter"></search-research-results>
<search-research-results resultType="result" [simpleView]="false" [customFilter]="customFilter" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/advanced/research-outcomes'"></search-research-results>
`
})
export class OpenaireSearchResearchResultsComponent {
@Input() searchLink: string = "/search/advanced/research-results";
customFilter:SearchCustomFilter= null;
constructor(private route: ActivatedRoute) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,6 +1,5 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
@ -13,11 +12,7 @@ import {properties} from "../../../environments/environment";
})
export class OpenaireSearchComponent{
customFilter:SearchCustomFilter= null;
constructor ( private route: ActivatedRoute ) {
}
constructor ( ) {}
ngOnInit() {
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);

View File

@ -1,27 +1,25 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-search-dataproviders',
template: `
<search-dataproviders [customFilter]="customFilter">
<search-dataproviders [customFilter]="customFilter" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/find/dataproviders'">
</search-dataproviders>
`
})
export class OpenaireSearchDataprovidersComponent {
customFilter: SearchCustomFilter = null;
constructor(private route: ActivatedRoute) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,15 +1,15 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-search-organizations',
template: `
<search-organizations [customFilter]="customFilter">
<search-organizations [customFilter]="customFilter" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/find/organizations'">
</search-organizations>
`
@ -17,10 +17,10 @@ import {properties} from "../../../environments/environment";
})
export class OpenaireSearchOrganizationsComponent {
customFilter:SearchCustomFilter= null;
constructor ( private route: ActivatedRoute ) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,27 +1,25 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-search-projects',
template: `
<search-projects [customFilter]="customFilter">
<search-projects [customFilter]="customFilter" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/find/projects'">
</search-projects>
`
})
export class OpenaireSearchProjectsComponent {
customFilter: SearchCustomFilter = null;
constructor(private route: ActivatedRoute) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -1,24 +1,24 @@
import {Component, Input} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@Component({
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" [stickyForm]="false" [customFilter]="customFilter"></search-research-results>
<search-research-results resultType="result" [stickyForm]="false" [customFilter]="customFilter" [openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/find/research-outcomes'" ></search-research-results>
`
})
export class OpenaireSearchResearchResultsComponent {
@Input() searchLink: string = "/search/research-results";
customFilter:SearchCustomFilter= null;
constructor ( private route: ActivatedRoute ) {
}
properties: EnvProperties;
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);

View File

@ -52,8 +52,8 @@ export class PortalAggregators {
let filter:SearchCustomFilter = null;
if(agg) {
filter = new SearchCustomFilter(agg.fieldName, agg.queryFieldName, agg.valueId, agg.valueName);
filter.promptToAddFilter = true;
filter.isHiddenFilter = false;
filter.promptToAddFilter = false;
filter.isHiddenFilter = true;
}
return filter;
}