diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index cf833781..c5df0b83 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -68,8 +68,8 @@ export class DataProviderComponent { // Statistics tab variables public statsClicked: boolean = false; - @ViewChild('statisticsModal') statisticsModal; - @ViewChild('relatedDatasourcesModal') relatedDatasourcesModal; + // @ViewChild('statisticsModal') statisticsModal; + // @ViewChild('relatedDatasourcesModal') relatedDatasourcesModal; @ViewChild('addThisModal') addThisModal // Variables for publications, research data, projects, datasources, related datasources tabs @@ -672,21 +672,21 @@ export class DataProviderComponent { return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0; } - public openStatistics() { - this.statsClicked = true; - this.statisticsModal.cancelButton = false; - this.statisticsModal.okButton = false; - this.statisticsModal.alertTitle = "Statistics of"; - this.statisticsModal.open(); - } - - public openRelatedDatasources() { - this.searchRelatedDatasources(1, 0); - this.relatedDatasourcesModal.cancelButton = false; - this.relatedDatasourcesModal.okButton = false; - this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of"; - this.relatedDatasourcesModal.open(); - } + // public openStatistics() { + // this.statsClicked = true; + // this.statisticsModal.cancelButton = false; + // this.statisticsModal.okButton = false; + // this.statisticsModal.alertTitle = "Statistics of"; + // this.statisticsModal.open(); + // } + // + // public openRelatedDatasources() { + // this.searchRelatedDatasources(1, 0); + // this.relatedDatasourcesModal.cancelButton = false; + // this.relatedDatasourcesModal.okButton = false; + // this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of"; + // this.relatedDatasourcesModal.open(); + // } public openAddThisModal() { this.addThisModal.cancelButton = false; diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index f1c8598a..8973f7da 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -6,7 +6,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; import {map} from "rxjs/operators"; import {ParsingFunctions} from "../landing-utils/parsingFunctions.class"; import {OpenaireEntities} from "../../utils/properties/searchFields"; -import {Identifier} from "../../utils/string-utils.class"; +import {Identifier, StringUtils} from "../../utils/string-utils.class"; import {properties} from "../../../../environments/environment"; @@ -138,8 +138,14 @@ export class DataProviderService { this.dataProviderInfo.relcanId = ParsingFunctions.parseRelCanonicalId(this.dataProviderInfo.record, "datasource"); if(data[0] != null) { - this.dataProviderInfo.title = {"name": (data[0].englishname)?data[0].englishname: data[0].officialname, "url": data[0].websiteurl}; - this.dataProviderInfo.officialName = data[0].officialname; + this.dataProviderInfo.title = {"name": "", "url": data[0].websiteurl}; + if(data[0].officialname) { + this.dataProviderInfo.title.name = StringUtils.HTMLToString(String(data[0].officialname)); + this.dataProviderInfo.officialName = StringUtils.HTMLToString(String(data[0].officialname)); + } + if(data[0].englishname) { + this.dataProviderInfo.title.name = StringUtils.HTMLToString(String(data[0].englishname)); + } var pattern = /.{12}::.+/; var originalIds =(data[0].originalId)?data[0].originalId:""; diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 5b423b10..23592e3f 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -802,7 +802,7 @@ export class ParsingFunctions { if(stripHTML) { return abstracts.join(' '); } else { - return abstracts.length > 0 ? ('
' + abstracts.join('
') + '
') : abstracts.join(' '); + return abstracts.length > 0 ? ('' + abstracts.join('
') + '
') : abstracts.join(' '); } } } diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 62edddb3..60a148d0 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -70,8 +70,8 @@ export class OrganizationComponent { public activeTab: string = ""; @ViewChild('downloadReportsModal') downloadReportsModal; - @ViewChild('downloadReportModal') downloadReportModal; - @ViewChild('downloadFunderReportModal') downloadFunderReportModal; + // @ViewChild('downloadReportModal') downloadReportModal; + // @ViewChild('downloadFunderReportModal') downloadFunderReportModal; @ViewChild('addThisModal') addThisModal; @ViewChild(ModalLoading) loading: ModalLoading; @@ -118,7 +118,7 @@ export class OrganizationComponent { public feedbackFields: string [] = ['Name', 'Country', 'Other']; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; - @ViewChild('projectsModal') projectsModal; + // @ViewChild('projectsModal') projectsModal; public deleteByInferenceOpened: boolean = false; diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index a7da88da..56622846 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -80,8 +80,8 @@ export class ProjectComponent { // Active tab variable for responsiveness public activeTab: string = ""; - @ViewChild('statisticsModal') statisticsModal; - @ViewChild('linkProjectModal') linkProjectModal; + // @ViewChild('statisticsModal') statisticsModal; + // @ViewChild('linkProjectModal') linkProjectModal; @ViewChild('embedResultsModal') embedResultsModal; @ViewChild('downloadReportModal') downloadReportModal; @ViewChild('addThisModal') addThisModal diff --git a/landingPages/project/project.service.ts b/landingPages/project/project.service.ts index dbafa780..17084a51 100644 --- a/landingPages/project/project.service.ts +++ b/landingPages/project/project.service.ts @@ -9,6 +9,7 @@ import{EnvProperties} from '../../utils/properties/env-properties'; import { ParsingFunctions } from '../landing-utils/parsingFunctions.class'; import {map} from "rxjs/operators"; +import {StringUtils} from "../../utils/string-utils.class"; @Injectable() export class ProjectService { @@ -123,7 +124,11 @@ export class ProjectService { // ['result']['metadata']['oaf:entity']['oaf:project'] if(data[0] != null) { this.projectInfo.acronym = data[0].acronym; - this.projectInfo.title = Array.isArray(data[0]['title']) ? data[0].title[0] : data[0].title; + if(data[0]['title']) { + this.projectInfo.title = Array.isArray(data[0]['title']) ? StringUtils.HTMLToString(String(data[0].title[0])) : StringUtils.HTMLToString(String(data[0].title)); + } else { + this.projectInfo.title = ""; + } this.projectInfo.funding.code = data[0].code; if(data[0].startdate) { let date: number = Date.parse(data[0].startdate); diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 401261b1..61ce733b 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -37,11 +37,11 @@ export class ResultLandingComponent { @Input() piwikSiteId = properties.piwikSiteId; @Input() communityId = null; enermapsId; - @ViewChild('linkModal') linkModal; + // @ViewChild('linkModal') linkModal; @ViewChild('citeModal') citeModal; @ViewChild('addThisModal') addThisModal; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; - @ViewChild('relationModal') relationModal; + // @ViewChild('relationModal') relationModal; public deleteByInferenceOpened: boolean = false; @Input() public resultFromInput: boolean = false; @Input() public resultLandingInfo: ResultLandingInfo; @@ -118,7 +118,7 @@ export class ResultLandingComponent { public isLoggedIn: boolean = false; public pid: string; - @ViewChild("annotation") annotation: AnnotationComponent; + // @ViewChild("annotation") annotation: AnnotationComponent; public contextsWithLink: any; public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}]; @@ -743,12 +743,12 @@ export class ResultLandingComponent { } } - public openLinkModal() { - this.linkModal.cancelButton = false; - this.linkModal.okButton = false; - this.linkModal.alertTitle = "Link this " + this.getTypeName() + " to"; - this.linkModal.open(); - } + // public openLinkModal() { + // this.linkModal.cancelButton = false; + // this.linkModal.okButton = false; + // this.linkModal.alertTitle = "Link this " + this.getTypeName() + " to"; + // this.linkModal.open(); + // } public openCiteModal() { this.citeThisClicked = true; @@ -804,7 +804,7 @@ export class ResultLandingComponent { let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"]; allow = allow && !( (this.hasKeyword(resultLandingInfo.title,title_authors_words) || (resultLandingInfo.authors && this.hasKeyword(resultLandingInfo.authors.map(o => o.fullName).join(" "),title_authors_words)) - || (resultLandingInfo.description && resultLandingInfo.description[0] && this.hasKeyword(resultLandingInfo.description[0],abstract_words)) + || (resultLandingInfo.description && this.hasKeyword(resultLandingInfo.description,abstract_words)) ) && ((resultLandingInfo.publisher && resultLandingInfo.publisher.toLowerCase() == "zenodo") || (resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.filter(value => { @@ -816,7 +816,7 @@ export class ResultLandingComponent { let common_abstract = ["international audience","n/a","peer reviewed","national audience","info:eu-repo/semantics/published","-",".","graphical abstract","met lit. opg","international audience; no abstract",'