diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index 3882851f..7446a6c7 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -240,7 +240,7 @@ export class DataProviderService { for(let i=0; i(); diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 77a87a55..1c9b1da0 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -7,6 +7,9 @@ import {Injectable} from '@angular/core'; }) export class ParsingFunctions { public notebookInSubjects: boolean = false; + private notebookKeyword: string = "eosc jupyter notebook"; + private notebook_label: string = "EOSC"; + private notebook_value: string = "EOSC Jupyter Notebook"; public open = 'assets/common-assets/unlock.svg'; public closed = 'assets/common-assets/lock.svg'; @@ -529,30 +532,56 @@ export class ParsingFunctions { classifiedSubjects.get(subject.classname).push(subject.content); } else { if (subject.classid == "keyword") { - if (subjects == undefined) { - subjects = new Array(); - } - let content: string = subject.content; - if(content && content.toLowerCase().includes("notebook")) { + console.log("keyword subject: "+content); + + if(content && content.toLowerCase().includes(this.notebookKeyword)) { + // console.log("included in keyword subject: "+content); + console.log("included"); this.notebookInSubjects = true; + + if (classifiedSubjects == undefined) { + classifiedSubjects = new Map(); + } + if (!classifiedSubjects.has(subject.classname)) { + classifiedSubjects.set(this.notebook_label, new Array()); + } + classifiedSubjects.get(this.notebook_label).push(this.notebook_value); + } else { + if (subjects == undefined) { + subjects = new Array(); + } + subjects.push(content); } - subjects.push(content); } else { - if (otherSubjects == undefined) { - otherSubjects = new Map(); - } - - if (!otherSubjects.has(subject.classname)) { - otherSubjects.set(subject.classname, new Array()); - } let content: string = subject.content; let classname: string = subject.classname; - if( (content && content.toLowerCase().includes("notebook") || - (classname && classname.toLowerCase().includes("notebook")))) { + console.log("other subject: "+classname + ": " +content); + + if( (content && content.toLowerCase().includes(this.notebookKeyword) || + (classname && classname.toLowerCase().includes(this.notebookKeyword)))) { + // console.log("included in other subject: "+classname + ": "+content); + console.log("included"); + this.notebookInSubjects = true; + + if (classifiedSubjects == undefined) { + classifiedSubjects = new Map(); + } + if (!classifiedSubjects.has(subject.classname)) { + classifiedSubjects.set(this.notebook_label, new Array()); + } + classifiedSubjects.get(this.notebook_label).push(this.notebook_value); + } else { + if (otherSubjects == undefined) { + otherSubjects = new Map(); + } + + if (!otherSubjects.has(subject.classname)) { + otherSubjects.set(subject.classname, new Array()); + } + otherSubjects.get(classname).push(content); } - otherSubjects.get(classname).push(content); } } } diff --git a/landingPages/project/project.service.ts b/landingPages/project/project.service.ts index ae4c65d6..b74a1d37 100644 --- a/landingPages/project/project.service.ts +++ b/landingPages/project/project.service.ts @@ -174,7 +174,7 @@ export class ProjectService { this.projectInfo.organizations = [];//new Map(); if(!Array.isArray(data[2])) { - if(data[2].hasOwnProperty("to") && data[2]['to'].class == "hasParticipant") { + if(data[2].hasOwnProperty("to") && data[2]['to'].class && data[2]['to'].class.toLowerCase() == "hasparticipant") { let acronym: string = ""; let name: string = ""; let id: string = ""; @@ -200,7 +200,7 @@ export class ProjectService { let acronym: string = ""; let name: string = ""; let id: string = ""; - if(data[2][i].hasOwnProperty("to") && data[2][i]['to'].class == "hasParticipant") { + if(data[2][i].hasOwnProperty("to") && data[2][i]['to'].class && data[2][i]['to'].class.toLowerCase() == "hasparticipant") { if(data[2][i].hasOwnProperty("legalshortname")) { acronym = data[2][i].legalshortname; } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b254baa6..ca909b46 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -125,12 +125,12 @@
  • - - egi_notebook + target="_blank" [href]="properties.egiNotebookLink"> + + eosc_logo - EGI Notebook + EOSC SERVICE: EGI NOTEBOOK
  • diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index fe218259..fe70d83f 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -27,10 +27,6 @@ import {$e} from "codelyzer/angular/styles/chars"; @Component({ - styles: [ - '.notebook-button { background-color: #f2f2f2; border: 1px solid #f2f2f2; } ' + - '.notebook-button:hover { background-color: #e5e5e5; border-color: #e5e5e5; } ' - ], selector: 'result-landing', templateUrl: 'resultLanding.component.html', }) diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index c4e029f6..6d0a2ee8 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -185,22 +185,22 @@ export class ResultLandingService { for(let i=0; i(); diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 92b0a2d8..1877c7a9 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -305,7 +305,7 @@ export class SearchResearchResultsService { let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel']; if (relation.hasOwnProperty("to")) { - if (relation['to'].class == "isProducedBy") { + if (relation['to'].class && relation['to'].class.toLowerCase() == "isproducedby") { result['projects'] = this.parseProjects(result['projects'], relation); } } diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index 3bcc7b59..6f87114f 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -135,4 +135,5 @@ export interface EnvProperties { notificationsAPIURL?: string; myOrcidLinksPage?: string; footerGrantText?: string; + egiNotebookLink?: string; }