[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 {
|
||||
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);
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -135,4 +135,5 @@ export interface EnvProperties {
|
|||
notificationsAPIURL?: string;
|
||||
myOrcidLinksPage?: string;
|
||||
footerGrantText?: string;
|
||||
egiNotebookLink?: string;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue