[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:
parent
ef8c330f7c
commit
3e3379d038
|
@ -7,6 +7,7 @@ import {Injectable} from '@angular/core';
|
||||||
})
|
})
|
||||||
export class ParsingFunctions {
|
export class ParsingFunctions {
|
||||||
public notebookInSubjects: boolean = false;
|
public notebookInSubjects: boolean = false;
|
||||||
|
private notebookKeyword: string = "eosc jupyter notebook";
|
||||||
|
|
||||||
public open = 'assets/common-assets/unlock.svg';
|
public open = 'assets/common-assets/unlock.svg';
|
||||||
public closed = 'assets/common-assets/lock.svg';
|
public closed = 'assets/common-assets/lock.svg';
|
||||||
|
@ -534,7 +535,12 @@ export class ParsingFunctions {
|
||||||
}
|
}
|
||||||
|
|
||||||
let content: string = subject.content;
|
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;
|
this.notebookInSubjects = true;
|
||||||
}
|
}
|
||||||
subjects.push(content);
|
subjects.push(content);
|
||||||
|
@ -548,8 +554,13 @@ export class ParsingFunctions {
|
||||||
}
|
}
|
||||||
let content: string = subject.content;
|
let content: string = subject.content;
|
||||||
let classname: string = subject.classname;
|
let classname: string = subject.classname;
|
||||||
if( (content && content.toLowerCase().includes("notebook") ||
|
console.log("other subject: "+classname + ": " +content);
|
||||||
(classname && classname.toLowerCase().includes("notebook")))) {
|
|
||||||
|
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;
|
this.notebookInSubjects = true;
|
||||||
}
|
}
|
||||||
otherSubjects.get(classname).push(content);
|
otherSubjects.get(classname).push(content);
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
<li *ngIf="resultLandingInfo.showEgiNotebookButton && properties.adminToolsPortalType == 'explore'
|
<li *ngIf="resultLandingInfo.showEgiNotebookButton && properties.adminToolsPortalType == 'explore'
|
||||||
&& (properties.environment == 'beta' || properties.environment == 'development')">
|
&& (properties.environment == 'beta' || properties.environment == 'development')">
|
||||||
<a class="uk-link-text uk-text-bold uk-text-uppercase"
|
<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">
|
<span class="uk-icon-button notebook-button uk-icon">
|
||||||
<img src="assets/common-assets/egi-fed.notebook.png"
|
<img src="assets/common-assets/egi-fed.notebook.png"
|
||||||
loading="lazy" alt="egi_notebook" style="width:30px; height:21px">
|
loading="lazy" alt="egi_notebook" style="width:30px; height:21px">
|
||||||
|
|
|
@ -135,4 +135,5 @@ export interface EnvProperties {
|
||||||
notificationsAPIURL?: string;
|
notificationsAPIURL?: string;
|
||||||
myOrcidLinksPage?: string;
|
myOrcidLinksPage?: string;
|
||||||
footerGrantText?: string;
|
footerGrantText?: string;
|
||||||
|
egiNotebookLink?: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue