From a0dff0966645ba52a1a1b4a6566b5e4a23f4a205 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Wed, 19 May 2021 07:42:56 +0000 Subject: [PATCH] [Explore|Trunk] - Remove qf=true from home page and menu items --> use resultbestaccessright="Open%2520Access" instead - initialize rel next/prev with empty values git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@61020 d315682c-612b-4755-9ff5-7f18f6832af3 --- explore/src/app/app.component.ts | 7 +++++-- explore/src/app/home/home.component.ts | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index b13cd031..5905d423 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -14,6 +14,7 @@ import {Subscriber} from "rxjs"; import {Meta} from "@angular/platform-browser"; import {properties} from "../environments/environment"; import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll"; +import {SEOService} from "./openaireLibrary/sharedComponents/SEO/SEO.service"; @Component({ //changeDetection: ChangeDetectionStrategy.Default, @@ -59,7 +60,7 @@ export class AppComponent { constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, private router: Router, private userManagementService: UserManagementService, private smoothScroll: SmoothScroll, - private configurationService: ConfigurationService, private _meta: Meta) { + private configurationService: ConfigurationService, private _meta: Meta, private seoService: SEOService,) { this.userMenuItems.push(new MenuItem("", "My profile", "", "", false, [], [], {})); this.userMenuItems.push(new MenuItem("", "My ORCID links", "", "/my-orcid-links", false, [], [""], {})); this.userMenuItems.push(new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], {})); @@ -80,6 +81,8 @@ export class AppComponent { if (this.properties.environment == "production" || this.properties.environment == "development") { this.subscriptions.push(this.route.queryParams.subscribe(data => { this._meta.updateTag({content: 'all', name: 'robots'}); + this.seoService.removeLinkForPrevURL(); + this.seoService.removeLinkForNextURL(); })); } this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { @@ -114,7 +117,7 @@ export class AppComponent { { rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {qf: true}), items: [ - new MenuItem("", "Research Outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {qf: true}), + new MenuItem("", "Research Outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], {resultbestaccessright: '"' + encodeURIComponent("Open Access") + '"'}), new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}), new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}), new MenuItem("", "Organizations", "", "/search/find/organizations/", false, ["organization"], ["/search/find/organizations"], {}) diff --git a/explore/src/app/home/home.component.ts b/explore/src/app/home/home.component.ts index 7477d332..8c650a65 100644 --- a/explore/src/app/home/home.component.ts +++ b/explore/src/app/home/home.component.ts @@ -268,15 +268,15 @@ export class HomeComponent { parameterNames.push("type"); parameterValues.push(values.join(",")); } - if (this.resultsQuickFilter) { - parameterNames.push("qf"); - parameterValues.push("" + this.resultsQuickFilter.selected); + if (this.resultsQuickFilter && this.resultsQuickFilter.selected) { + parameterNames.push(this.resultsQuickFilter.filterId); + parameterValues.push('"'+ encodeURIComponent(this.resultsQuickFilter.value)+'"'); } } } else if (this.selectedEntity == "all") { - if (this.resultsQuickFilter) { - parameterNames.push("qf"); - parameterValues.push("true"); + if (this.resultsQuickFilter && this.resultsQuickFilter.selected) { + parameterNames.push(this.resultsQuickFilter.filterId); + parameterValues.push('"'+ encodeURIComponent(this.resultsQuickFilter.value)+'"'); } } if (this.keyword.length > 0) {