[Trunk | Explore]: 1. parsingFunctions.class.ts: created field "notebookKeyword" to be compared with subjects. 2. resultLanding.component.html: Property "egiNotebookLink" is used for Notebook button on top right section. 3. env-properties.ts: Added property "egiNotebookLink". 4. environment.beta.ts & environment.ts: Added property "egiNotebookLink".

This commit is contained in:
Konstantina Galouni 2021-09-27 12:14:17 +03:00
parent ef8c330f7c
commit 3e3379d038
3 changed files with 16 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import {Injectable} from '@angular/core';
})
export class ParsingFunctions {
public notebookInSubjects: boolean = false;
private notebookKeyword: string = "eosc jupyter notebook";
public open = 'assets/common-assets/unlock.svg';
public closed = 'assets/common-assets/lock.svg';
@ -534,7 +535,12 @@ export class ParsingFunctions {
}
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;
}
subjects.push(content);
@ -548,8 +554,13 @@ export class ParsingFunctions {
}
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;
}
otherSubjects.get(classname).push(content);

View File

@ -125,7 +125,7 @@
<li *ngIf="resultLandingInfo.showEgiNotebookButton && properties.adminToolsPortalType == 'explore'
&& (properties.environment == 'beta' || properties.environment == 'development')">
<a class="uk-link-text uk-text-bold uk-text-uppercase"
target="_blank" href="https://marketplace.eosc-portal.eu/services/egi-notebooks?q=EGI+Notebook">
target="_blank" [href]="properties.egiNotebookLink">
<span class="uk-icon-button notebook-button uk-icon">
<img src="assets/common-assets/egi-fed.notebook.png"
loading="lazy" alt="egi_notebook" style="width:30px; height:21px">

View File

@ -135,4 +135,5 @@ export interface EnvProperties {
notificationsAPIURL?: string;
myOrcidLinksPage?: string;
footerGrantText?: string;
egiNotebookLink?: string;
}