Merge origin/master into angular-14 branch

This commit is contained in:
Konstantina Galouni 2022-11-29 14:13:29 +02:00
commit 508dac6c4d
27 changed files with 143 additions and 119 deletions

View File

@ -68,8 +68,8 @@ export class DataProviderComponent {
// Statistics tab variables // Statistics tab variables
public statsClicked: boolean = false; public statsClicked: boolean = false;
@ViewChild('statisticsModal') statisticsModal; // @ViewChild('statisticsModal') statisticsModal;
@ViewChild('relatedDatasourcesModal') relatedDatasourcesModal; // @ViewChild('relatedDatasourcesModal') relatedDatasourcesModal;
@ViewChild('addThisModal') addThisModal @ViewChild('addThisModal') addThisModal
// Variables for publications, research data, projects, datasources, related datasources tabs // 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; return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0;
} }
public openStatistics() { // public openStatistics() {
this.statsClicked = true; // this.statsClicked = true;
this.statisticsModal.cancelButton = false; // this.statisticsModal.cancelButton = false;
this.statisticsModal.okButton = false; // this.statisticsModal.okButton = false;
this.statisticsModal.alertTitle = "Statistics of"; // this.statisticsModal.alertTitle = "Statistics of";
this.statisticsModal.open(); // this.statisticsModal.open();
} // }
//
public openRelatedDatasources() { // public openRelatedDatasources() {
this.searchRelatedDatasources(1, 0); // this.searchRelatedDatasources(1, 0);
this.relatedDatasourcesModal.cancelButton = false; // this.relatedDatasourcesModal.cancelButton = false;
this.relatedDatasourcesModal.okButton = false; // this.relatedDatasourcesModal.okButton = false;
this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of"; // this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of";
this.relatedDatasourcesModal.open(); // this.relatedDatasourcesModal.open();
} // }
public openAddThisModal() { public openAddThisModal() {
this.addThisModal.cancelButton = false; this.addThisModal.cancelButton = false;

View File

@ -6,7 +6,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
import {map} from "rxjs/operators"; import {map} from "rxjs/operators";
import {ParsingFunctions} from "../landing-utils/parsingFunctions.class"; import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
import {OpenaireEntities} from "../../utils/properties/searchFields"; 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"; import {properties} from "../../../../environments/environment";
@ -138,8 +138,14 @@ export class DataProviderService {
this.dataProviderInfo.relcanId = ParsingFunctions.parseRelCanonicalId(this.dataProviderInfo.record, "datasource"); this.dataProviderInfo.relcanId = ParsingFunctions.parseRelCanonicalId(this.dataProviderInfo.record, "datasource");
if(data[0] != null) { if(data[0] != null) {
this.dataProviderInfo.title = {"name": (data[0].englishname)?data[0].englishname: data[0].officialname, "url": data[0].websiteurl}; this.dataProviderInfo.title = {"name": "", "url": data[0].websiteurl};
this.dataProviderInfo.officialName = data[0].officialname; 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 pattern = /.{12}::.+/;
var originalIds =(data[0].originalId)?data[0].originalId:""; var originalIds =(data[0].originalId)?data[0].originalId:"";

View File

@ -10,7 +10,7 @@ import {StringUtils} from "../../utils/string-utils.class";
export class ParsingFunctions { export class ParsingFunctions {
public eoscSubjects = [ public eoscSubjects = [
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AJupyter+Notebook', value: 'Jupyter Notebook'}, {label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AJupyter+Notebook', value: 'Jupyter Notebook'},
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3ARO-crate', value: 'RO-crate'}, {label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/datasources/eosc.psnc.6f0470e3bb9203ec3a7553f3a72a7a1f?q=ROHub', value: 'RO-crate'},
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AGalaxy+Workflow', value: 'Galaxy Workflow'}, {label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AGalaxy+Workflow', value: 'Galaxy Workflow'},
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3ATwitter+Data', value: 'Twitter Data'} {label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3ATwitter+Data', value: 'Twitter Data'}
] ]
@ -802,7 +802,7 @@ export class ParsingFunctions {
if(stripHTML) { if(stripHTML) {
return abstracts.join(' '); return abstracts.join(' ');
} else { } else {
return abstracts.length > 0 ? ('<p>' + abstracts.join('</p><p>') + '</p>') : abstracts.join(' '); return abstracts.length > 0 ? ('<p>' + abstracts.join('</p> <p>') + '</p>') : abstracts.join(' ');
} }
} }
} }

View File

@ -70,8 +70,8 @@ export class OrganizationComponent {
public activeTab: string = ""; public activeTab: string = "";
@ViewChild('downloadReportsModal') downloadReportsModal; @ViewChild('downloadReportsModal') downloadReportsModal;
@ViewChild('downloadReportModal') downloadReportModal; // @ViewChild('downloadReportModal') downloadReportModal;
@ViewChild('downloadFunderReportModal') downloadFunderReportModal; // @ViewChild('downloadFunderReportModal') downloadFunderReportModal;
@ViewChild('addThisModal') addThisModal; @ViewChild('addThisModal') addThisModal;
@ViewChild(ModalLoading) loading: ModalLoading; @ViewChild(ModalLoading) loading: ModalLoading;
@ -118,7 +118,7 @@ export class OrganizationComponent {
public feedbackFields: string [] = ['Name', 'Country', 'Other']; public feedbackFields: string [] = ['Name', 'Country', 'Other'];
@ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference;
@ViewChild('projectsModal') projectsModal; // @ViewChild('projectsModal') projectsModal;
public deleteByInferenceOpened: boolean = false; public deleteByInferenceOpened: boolean = false;

View File

@ -80,8 +80,8 @@ export class ProjectComponent {
// Active tab variable for responsiveness // Active tab variable for responsiveness
public activeTab: string = ""; public activeTab: string = "";
@ViewChild('statisticsModal') statisticsModal; // @ViewChild('statisticsModal') statisticsModal;
@ViewChild('linkProjectModal') linkProjectModal; // @ViewChild('linkProjectModal') linkProjectModal;
@ViewChild('embedResultsModal') embedResultsModal; @ViewChild('embedResultsModal') embedResultsModal;
@ViewChild('downloadReportModal') downloadReportModal; @ViewChild('downloadReportModal') downloadReportModal;
@ViewChild('addThisModal') addThisModal @ViewChild('addThisModal') addThisModal

View File

@ -9,6 +9,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
import { ParsingFunctions } from '../landing-utils/parsingFunctions.class'; import { ParsingFunctions } from '../landing-utils/parsingFunctions.class';
import {map} from "rxjs/operators"; import {map} from "rxjs/operators";
import {StringUtils} from "../../utils/string-utils.class";
@Injectable() @Injectable()
export class ProjectService { export class ProjectService {
@ -123,7 +124,11 @@ export class ProjectService {
// ['result']['metadata']['oaf:entity']['oaf:project'] // ['result']['metadata']['oaf:entity']['oaf:project']
if(data[0] != null) { if(data[0] != null) {
this.projectInfo.acronym = data[0].acronym; 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; this.projectInfo.funding.code = data[0].code;
if(data[0].startdate) { if(data[0].startdate) {
let date: number = Date.parse(data[0].startdate); let date: number = Date.parse(data[0].startdate);

View File

@ -49,7 +49,7 @@ export class DeletedByInferenceService {
result.dateofacceptance = data.dateofacceptance; result.dateofacceptance = data.dateofacceptance;
result.embargoEndDate = data.embargoenddate; result.embargoEndDate = data.embargoenddate;
result.description = this.parsingFunctions.parseDescription(data.description); result.description = this.parsingFunctions.parseDescription(data.description, true);
if(data['bestaccessright'] && data['bestaccessright'].hasOwnProperty("classname")) { if(data['bestaccessright'] && data['bestaccessright'].hasOwnProperty("classname")) {
result.accessMode = data['bestaccessright'].classname; result.accessMode = data['bestaccessright'].classname;

View File

@ -448,32 +448,23 @@
<ng-template #right_column> <ng-template #right_column>
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll"> <div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
<!-- EOSC Services--> <!-- EOSC Services-->
<!-- 1 link --> <div *ngIf="resultLandingInfo.eoscSubjects?.length > 0 && properties.adminToolsPortalType == 'eosc'
<div *ngIf="resultLandingInfo.eoscSubjects?.length == 1 && properties.adminToolsPortalType == 'eosc'
&& (!viewAll || viewAll=='egiNotebook')"> && (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold custom-external" <div class="uk-flex uk-flex-between uk-flex-middle uk-margin-small-bottom">
target="_blank" [href]="resultLandingInfo.eoscSubjects[0].link"> <span class="uk-text-light-grey uk-text-nowrap uk-margin-small-right">Compatible EOSC Services</span>
</div>
<div class="uk-margin-small-bottom uk-flex">
<img src="assets/common-assets/eosc-logo.png" <img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:27px; height:27px"> loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
<span class="uk-margin-small-left uk-text-uppercase"><u>Check compatible EOSC services</u></span> <div class="uk-margin-small-left uk-flex uk-flex-column uk-flex-center">
</a> <div *ngFor="let subject of resultLandingInfo.eoscSubjects; let i=index" class="uk-text-truncate">
</div> <a [href]="subject.link" target="_blank" class="custom-external">{{subject.value}}</a>
<!-- more than 1 links --> </div>
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 1 && properties.adminToolsPortalType == 'eosc' </div>
&& (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold">
<img src="assets/common-assets/eosc-logo.png"
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
<span class="uk-margin-small-left uk-text-uppercase"><u>Check compatible EOSC services</u></span>
</a>
<div class="uk-dropdown" uk-dropdown="pos: bottom-right; offset: 10; delay-hide: 0; mode:click">
<ul class="uk-nav uk-dropdown-nav">
<li *ngFor="let item of resultLandingInfo.eoscSubjects">
<a [href]="item.link" target="_blank" class="custom-external">{{item.value}}</a>
</li>
</ul>
</div> </div>
</div> </div>
<div *ngIf="resultLandingInfo.sdg && resultLandingInfo.sdg.length > 0 && (!viewAll || viewAll=='sdg')"> <div *ngIf="resultLandingInfo.sdg && resultLandingInfo.sdg.length > 0 && (!viewAll || viewAll=='sdg')">
<sdg [subjects]="resultLandingInfo.sdg" (viewAllClicked)="viewAll=$event" (feedbackClicked)="feedbackClicked('Sustainable Development Goals (SDGs)')"></sdg> <sdg [subjects]="resultLandingInfo.sdg" (viewAllClicked)="viewAll=$event" (feedbackClicked)="feedbackClicked('Sustainable Development Goals (SDGs)')"></sdg>
</div> </div>

View File

@ -37,11 +37,11 @@ export class ResultLandingComponent {
@Input() piwikSiteId = properties.piwikSiteId; @Input() piwikSiteId = properties.piwikSiteId;
@Input() communityId = null; @Input() communityId = null;
enermapsId; enermapsId;
@ViewChild('linkModal') linkModal; // @ViewChild('linkModal') linkModal;
@ViewChild('citeModal') citeModal; @ViewChild('citeModal') citeModal;
@ViewChild('addThisModal') addThisModal; @ViewChild('addThisModal') addThisModal;
@ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference;
@ViewChild('relationModal') relationModal; // @ViewChild('relationModal') relationModal;
public deleteByInferenceOpened: boolean = false; public deleteByInferenceOpened: boolean = false;
@Input() public resultFromInput: boolean = false; @Input() public resultFromInput: boolean = false;
@Input() public resultLandingInfo: ResultLandingInfo; @Input() public resultLandingInfo: ResultLandingInfo;
@ -118,7 +118,7 @@ export class ResultLandingComponent {
public isLoggedIn: boolean = false; public isLoggedIn: boolean = false;
public pid: string; public pid: string;
@ViewChild("annotation") annotation: AnnotationComponent; // @ViewChild("annotation") annotation: AnnotationComponent;
public contextsWithLink: any; public contextsWithLink: any;
public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}]; public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}];
@ -743,12 +743,12 @@ export class ResultLandingComponent {
} }
} }
public openLinkModal() { // public openLinkModal() {
this.linkModal.cancelButton = false; // this.linkModal.cancelButton = false;
this.linkModal.okButton = false; // this.linkModal.okButton = false;
this.linkModal.alertTitle = "Link this " + this.getTypeName() + " to"; // this.linkModal.alertTitle = "Link this " + this.getTypeName() + " to";
this.linkModal.open(); // this.linkModal.open();
} // }
public openCiteModal() { public openCiteModal() {
this.citeThisClicked = true; this.citeThisClicked = true;
@ -804,7 +804,7 @@ export class ResultLandingComponent {
let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"]; let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"];
allow = allow && !( allow = allow && !(
(this.hasKeyword(resultLandingInfo.title,title_authors_words) || (resultLandingInfo.authors && this.hasKeyword(resultLandingInfo.authors.map(o => o.fullName).join(" "),title_authors_words)) (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.publisher && resultLandingInfo.publisher.toLowerCase() == "zenodo") ||
(resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.filter(value => { (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",'<jats:p>.</jats:p>',"politics","info:eu-repo/semantics/publishedversion","copia digital. madrid : ministerio de educación, cultura y deporte, 2016",'<jats:p />',"peer-reviewed","copia digital. madrid : ministerio de educación, cultura y deporte. subdirección general de coordinación bibliotecaria, 2015","<jats:p>-</jats:p>","imperial users only","yüksek lisans"]; 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",'<jats:p>.</jats:p>',"politics","info:eu-repo/semantics/publishedversion","copia digital. madrid : ministerio de educación, cultura y deporte, 2016",'<jats:p />',"peer-reviewed","copia digital. madrid : ministerio de educación, cultura y deporte. subdirección general de coordinación bibliotecaria, 2015","<jats:p>-</jats:p>","imperial users only","yüksek lisans"];
let common_authors = ["[s.n.]","null &na;","nn","(:unap)","(:null)","null anonymous","anonymous"]; let common_authors = ["[s.n.]","null &na;","nn","(:unap)","(:null)","null anonymous","anonymous"];
allow = allow && !( allow = allow && !(
this.isKeyword(resultLandingInfo.title,common_titles) || (resultLandingInfo.description && resultLandingInfo.description[0] && this.isKeyword(resultLandingInfo.description[0],common_abstract)) || this.isKeyword(resultLandingInfo.title,common_titles) || (resultLandingInfo.description && this.isKeyword(resultLandingInfo.description,common_abstract)) ||
(resultLandingInfo.authors && this.hasKeyword("_"+resultLandingInfo.authors.map(o => o.fullName).join("_")+"_",common_authors, "_")) (resultLandingInfo.authors && this.hasKeyword("_"+resultLandingInfo.authors.map(o => o.fullName).join("_")+"_",common_authors, "_"))
); );
// console.log("common content " + allow) // console.log("common content " + allow)

View File

@ -153,10 +153,10 @@ export class ResultLandingService {
for(let i=0; i<data[1].length; i++) { for(let i=0; i<data[1].length; i++) {
if(data[1][i] && data[1][i].content) { if(data[1][i] && data[1][i].content) {
if(!this.resultLandingInfo.title || data[1][i].classid == "main title") { if(!this.resultLandingInfo.title || data[1][i].classid == "main title") {
this.resultLandingInfo.title = String(data[1][i].content); this.resultLandingInfo.title = StringUtils.HTMLToString(String(data[1][i].content));
} }
if(!this.resultLandingInfo.subtitle && data[1][i].classid === 'subtitle') { if(!this.resultLandingInfo.subtitle && data[1][i].classid === 'subtitle') {
this.resultLandingInfo.subtitle = String(data[1][i].content); this.resultLandingInfo.subtitle = StringUtils.HTMLToString(String(data[1][i].content));
} }
// if(data[1][i].classid == "main title") { // if(data[1][i].classid == "main title") {
// break; // break;
@ -171,7 +171,7 @@ export class ResultLandingService {
} }
// this.resultLandingInfo.title = (data[1][0] && data[1][0].content) ? String(data[1][0].content) : ""; // this.resultLandingInfo.title = (data[1][0] && data[1][0].content) ? String(data[1][0].content) : "";
} else { } else {
this.resultLandingInfo.title = (data[1] && data[1].content) ? String(data[1].content) : ""; this.resultLandingInfo.title = (data[1] && data[1].content) ? StringUtils.HTMLToString(String(data[1].content)) : "";
} }
} }

View File

@ -302,9 +302,9 @@ export class OrcidWorkComponent {
public subscriptions: Subscription[] = []; public subscriptions: Subscription[] = [];
@ViewChild('workModal') workModal; @ViewChild('workModal') workModal;
@ViewChild('saveWorkModal') saveWorkModal; // @ViewChild('saveWorkModal') saveWorkModal;
@ViewChild('grantModal') grantModal; @ViewChild('grantModal') grantModal;
@ViewChild('messageModal') messageModal; // @ViewChild('messageModal') messageModal;
@ViewChild('propagationModal') propagationModal; @ViewChild('propagationModal') propagationModal;
public requestGrant: boolean = false; public requestGrant: boolean = false;
@ -723,16 +723,16 @@ export class OrcidWorkComponent {
this.workModal.cancel(); this.workModal.cancel();
} }
openMessageModal(title: string) { // openMessageModal(title: string) {
this.messageModal.cancelButton = false; // this.messageModal.cancelButton = false;
this.messageModal.okButton = false; // this.messageModal.okButton = false;
this.messageModal.alertTitle = title; // this.messageModal.alertTitle = title;
this.messageModal.open(); // this.messageModal.open();
} // }
//
closeMessageModal() { // closeMessageModal() {
this.messageModal.cancel(); // this.messageModal.cancel();
} // }
openPropagationModal(title: string) { openPropagationModal(title: string) {
this.propagationModal.cancelButton = true; this.propagationModal.cancelButton = true;

View File

@ -1,5 +1,6 @@
import {ResultLandingInfo} from "../utils/entities/resultLandingInfo"; import {ResultLandingInfo} from "../utils/entities/resultLandingInfo";
import {ResultPreview} from "../utils/result-preview/result-preview"; import {ResultPreview} from "../utils/result-preview/result-preview";
import {StringUtils} from "../utils/string-utils.class";
export class WorkV3_0 { export class WorkV3_0 {
// automatically filled by orcid? // automatically filled by orcid?
@ -107,7 +108,8 @@ export class WorkV3_0 {
} }
if(resultLandingInfo.description && resultLandingInfo.description.length < description_limit) { if(resultLandingInfo.description && resultLandingInfo.description.length < description_limit) {
work['short-description'] = resultLandingInfo.description.length > 0 ? resultLandingInfo.description[0] : ""; resultLandingInfo.description = StringUtils.HTMLToString(resultLandingInfo.description);
work['short-description'] = resultLandingInfo.description.substring(0, description_limit-1);
} }
// citation (Citation, optional), // citation (Citation, optional),

View File

@ -1,4 +1,4 @@
<div class="uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom uk-section uk-section-small" [ngClass]="searchForm.class"> <div class="uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom" [ngClass]="searchForm.class">
<div class="uk-width-1-1"> <div class="uk-width-1-1">
<div *ngIf="breadcrumbs.length > 0" class="uk-container uk-container-large" [class.uk-light]="searchForm.dark"> <div *ngIf="breadcrumbs.length > 0" class="uk-container uk-container-large" [class.uk-light]="searchForm.dark">
<div class="uk-padding-small uk-padding-remove-horizontal uk-padding-remove-bottom"> <div class="uk-padding-small uk-padding-remove-horizontal uk-padding-remove-bottom">
@ -9,7 +9,7 @@
<div class="uk-container uk-container-large uk-section uk-section-small uk-margin-bottom" id="searchForm"> <div class="uk-container uk-container-large uk-section uk-section-small uk-margin-bottom" id="searchForm">
<div class="uk-grid uk-flex uk-flex-middle uk-flex-center" uk-grid> <div class="uk-grid uk-flex uk-flex-middle uk-flex-center" uk-grid>
<div class="uk-width-1-1 uk-width-auto@m"><div id="searchImage"></div></div> <div class="uk-width-1-1 uk-width-auto@m"><div id="searchImage"></div></div>
<advanced-search-form class="uk-width-expand uk-padding uk-padding-remove-vertical" <advanced-search-form class="uk-width-expand uk-padding-remove-vertical"
entityType="all" entityType="all"
(queryChange)="keywordChanged($event)" (queryChange)="keywordChanged($event)"
[isDisabled]="disableForms" [isDisabled]="disableForms"

View File

@ -19,14 +19,14 @@
<button type="submit" class="uk-hidden"></button> <button type="submit" class="uk-hidden"></button>
<div class="uk-grid uk-grid-small uk-grid-divider uk-flex-between" uk-grid> <div class="uk-grid uk-grid-small uk-grid-divider uk-flex-between" uk-grid>
<div class="uk-width-expand"> <div class="uk-width-expand">
<div class="uk-padding-small uk-padding-remove-left uk-overflow-auto" style="height: 200px; overflow-x: hidden; direction: rtl; scrollbar-gutter: stable;"> <div #container class="uk-padding-small uk-padding-remove-left uk-overflow-auto" style="height: 150px; overflow-x: hidden; direction: rtl; scrollbar-gutter: stable;">
<div style="direction: ltr;"> <div style="direction: ltr;">
<table class="uk-table uk-text-small uk-table-responsive uk-table-small uk-margin-remove"> <table class="uk-table uk-text-small uk-table-responsive uk-table-small uk-margin-remove">
<tr> <tr>
<td class="uk-text-bold uk-text-uppercase uk-width-1-3">Searching Fields</td> <td class="uk-text-bold uk-text-uppercase uk-width-1-3">Searching Fields</td>
<td class="uk-text-bold uk-text-uppercase uk-width-2-5">Terms</td> <td class="uk-text-bold uk-text-uppercase uk-width-2-5">Terms</td>
</tr> </tr>
<tr *ngFor="let selectedField of selectedFields; let i = index"> <tr *ngFor="let selectedField of selectedFields; let i = index; trackBy: trackByFn">
<td> <td>
<div class="uk-grid uk-flex-middle uk-child-width-1-2@m uk-child-width-1-1"> <div class="uk-grid uk-flex-middle uk-child-width-1-2@m uk-child-width-1-1">
<div input [(value)]="selectedField.id" inputClass="border-bottom" <div input [(value)]="selectedField.id" inputClass="border-bottom"

View File

@ -7,7 +7,7 @@ import {
OnDestroy, OnDestroy,
OnInit, OnInit,
Output, Output,
SimpleChanges SimpleChanges, ViewChild
} from '@angular/core'; } from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
@ -25,6 +25,7 @@ import {Option} from "../../sharedComponents/input/input.component";
templateUrl: 'advancedSearchForm.component.html' templateUrl: 'advancedSearchForm.component.html'
}) })
export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges { export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges {
@ViewChild("container") container;
@Input() entityType; @Input() entityType;
@Input() fieldIds: string[]; @Input() fieldIds: string[];
@Input() fieldIdsMap; @Input() fieldIdsMap;
@ -158,6 +159,8 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
this.selectedFields.push(new AdvancedField(this.newFieldId, this.fieldIdsMap[this.newFieldId].param, this.fieldIdsMap[this.newFieldId].name, type, "", "and")); this.selectedFields.push(new AdvancedField(this.newFieldId, this.fieldIdsMap[this.newFieldId].param, this.fieldIdsMap[this.newFieldId].name, type, "", "and"));
} }
this.cdr.detectChanges();
this.container.nativeElement.scrollTo({top: this.container.nativeElement.scrollHeight, behavior: 'smooth'});
} }
removeField(index: number) { removeField(index: number) {
@ -210,4 +213,8 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
onlyIncludesSupported(index: number) { onlyIncludesSupported(index: number) {
return (this.selectedFields[index] && this.selectedFields[index].operatorId === 'or') || (this.selectedFields[index+1] && this.selectedFields[index+1].operatorId === 'or') return (this.selectedFields[index] && this.selectedFields[index].operatorId === 'or') || (this.selectedFields[index+1] && this.selectedFields[index+1].operatorId === 'or')
} }
trackByFn(index, item) {
return item.id;
}
} }

View File

@ -121,10 +121,10 @@
[attr.uk-sticky]="(stickyForm?'{animation:false;offset:100;top:90;cls-active:uk-active uk-sticky-below;cls-inactive:uk-sticky '+ [attr.uk-sticky]="(stickyForm?'{animation:false;offset:100;top:90;cls-active:uk-active uk-sticky-below;cls-inactive:uk-sticky '+
(usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId') ? (usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
' uk-position-relative ' :(' uk-section ' ))+'}':null)"> ' uk-position-relative ' :(' uk-section ' ))+'}':null)">
<div class="uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom uk-section uk-section-small" [ngClass]="searchForm.class"> <div class="uk-background-norepeat uk-background-bottom-center" [ngClass]="searchForm.class">
<div class="uk-width-1-1"> <div class="uk-width-1-1">
<div *ngIf="showBreadcrumb" class="uk-container uk-container-large" [class.uk-light]="searchForm.dark"> <div *ngIf="showBreadcrumb" class="uk-container uk-container-large" [class.uk-light]="searchForm.dark">
<div class="uk-padding-small uk-padding-remove-horizontal"> <div class="uk-margin-top">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs> <breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div> </div>
</div> </div>
@ -132,7 +132,7 @@
<div class="uk-container uk-section uk-section-small uk-margin-bottom" id="searchForm"> <div class="uk-container uk-section uk-section-small uk-margin-bottom" id="searchForm">
<div class="uk-grid uk-flex uk-flex-middle uk-flex-center" uk-grid> <div class="uk-grid uk-flex uk-flex-middle uk-flex-center" uk-grid>
<div [class]="'uk-width-1-1'+(simpleView?' uk-width-auto@m' : '')"><div id="searchImage"></div></div> <div [class]="'uk-width-1-1'+(simpleView?' uk-width-auto@m' : '')"><div id="searchImage"></div></div>
<advanced-search-form class="uk-width-expand uk-padding uk-padding-remove-vertical" <advanced-search-form class="uk-width-expand uk-padding-remove-vertical"
[entityType]="entityType" [entityType]="entityType"
[fieldIds]="fieldIds" [fieldIds]="fieldIds"
[fieldIdsMap]="fieldIdsMap" [fieldIdsMap]="fieldIdsMap"
@ -156,13 +156,14 @@
</div> </div>
<schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters <schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters
[searchAction]=false [description]="metaDescription"></schema2jsonld> [searchAction]=false [description]="metaDescription"></schema2jsonld>
<div id="tm-main" [class.uk-margin-medium-top]="!includeOnlyResultsAndFilter" [class.uk-margin-top]="stickyForm"> <div id="tm-main" [class.uk-margin-medium-top]="!includeOnlyResultsAndFilter && properties.adminToolsPortalType != 'eosc'"
[class.uk-margin-top]="stickyForm">
<ng-template #loading> <ng-template #loading>
<loading [ngClass]="'uk-height-medium uk-display-block uk-margin-xlarge-top'"></loading> <loading [ngClass]="'uk-height-medium uk-display-block uk-margin-xlarge-top'"></loading>
</ng-template> </ng-template>
<ng-template [ngIf]="searchUtils.refineStatus != errorCodes.LOADING || existingFiltersWithValues !== 0" [ngIfElse]="loading"> <ng-template [ngIf]="searchUtils.refineStatus != errorCodes.LOADING || existingFiltersWithValues !== 0" [ngIfElse]="loading">
<div class="uk-container uk-container-large"> <div class="uk-container uk-container-large search-results-container">
<div> <div [class.uk-margin-top]="properties.adminToolsPortalType == 'eosc'" >
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper> [texts]="pageContents['top']"></helper>
<div *ngIf="resultTypes" class="uk-flex uk-flex-center uk-padding-small uk-padding-remove-vertical uk-background-muted uk-border-rounded"> <div *ngIf="resultTypes" class="uk-flex uk-flex-center uk-padding-small uk-padding-remove-vertical uk-background-muted uk-border-rounded">
@ -212,7 +213,7 @@
search search
</a> </a>
</div> </div>
<div class="uk-grid uk-margin-large-top uk-margin-large-bottom" uk-grid> <div class="uk-grid uk-margin-medium-top uk-margin-large-bottom" uk-grid>
<div *ngIf="showRefine && (results.length > 0 <div *ngIf="showRefine && (results.length > 0
|| (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING) || (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING)
|| (!hideFilters && || (!hideFilters &&

View File

@ -77,7 +77,7 @@ export class RefineFieldResultsService {
}else if(entityType == "person"){ }else if(entityType == "person"){
suffix="people/"; suffix="people/";
}else if(entityType == "result"){ }else if(entityType == "result"){
suffix="publications/"; suffix="results/";
} }
return suffix; return suffix;
} }

View File

@ -106,8 +106,14 @@ export class SearchDataprovidersService {
result['title'] = {"name": '', "accessMode": ''}; result['title'] = {"name": '', "accessMode": ''};
result['title'].name = resData.officialname; if(resData.officialname) {
result['englishname'] = resData.englishname; result['title'].name = StringUtils.HTMLToString(String(resData.officialname));
}
if(resData.englishname) {
result['englishname'] = StringUtils.HTMLToString(String(resData.englishname));
} else {
result['englishname'] = "";
}
//result['title'].url = OpenaireProperties.getsearchLinkToDataProvider(); //result['title'].url = OpenaireProperties.getsearchLinkToDataProvider();
//result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier']; //result['title'].url += Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
@ -125,9 +131,9 @@ export class SearchDataprovidersService {
let abstracts = this.parsingFunctions.parseDescription(resData.description, true); let abstracts = this.parsingFunctions.parseDescription(resData.description, true);
result.description = abstracts; result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) { // if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; // result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} // }
let typeid: string = resData['datasourcetype'].classid; let typeid: string = resData['datasourcetype'].classid;
if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") { if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") {

View File

@ -94,9 +94,11 @@ export class SearchOrganizationsService {
result['title'] = {"name": '', "accessMode": ''}; result['title'] = {"name": '', "accessMode": ''};
result['title'].name = resData.legalshortname; if(resData.legalshortname) {
result['title'].name = StringUtils.HTMLToString(String(resData.legalshortname));
}
if(!result['title'].name || result['title'].name == '') { if(!result['title'].name || result['title'].name == '') {
result['title'].name = resData.legalname; result['title'].name = StringUtils.HTMLToString(String(resData.legalname));
} }
//result['title'].url = OpenaireProperties.getsearchLinkToOrganization(); //result['title'].url = OpenaireProperties.getsearchLinkToOrganization();

View File

@ -135,11 +135,15 @@ export class SearchProjectsService {
// if(resData['acronym'] != undefined && resData['acronym'] != "") { // if(resData['acronym'] != undefined && resData['acronym'] != "") {
// result['title'].name = resData['acronym'] + " - "; // result['title'].name = resData['acronym'] + " - ";
// } // }
if(Array.isArray(resData['title'])) { if(resData['title']) {
result['title'].name += resData['title'][0]; if (Array.isArray(resData['title'])) {
result['title'].name += StringUtils.HTMLToString(String(resData['title'][0]));
} else { } else {
result['title'].name += resData['title']; result['title'].name += StringUtils.HTMLToString(String(resData['title']));
} }
} else {
result['title'].name = "";
}
// if(result['title'].name != '') { // if(result['title'].name != '') {
// result['title'].name += " ("+resData['code']+")" // result['title'].name += " ("+resData['code']+")"
@ -160,9 +164,9 @@ export class SearchProjectsService {
let abstracts = this.parsingFunctions.parseDescription(resData.summary, true); let abstracts = this.parsingFunctions.parseDescription(resData.summary, true);
result.description = abstracts; result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) { // if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; // result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} // }
if(resData['rels'].hasOwnProperty("rel")) { if(resData['rels'].hasOwnProperty("rel")) {
let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1; let relLength = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'].length : 1;

View File

@ -319,7 +319,7 @@ export class SearchResearchResultsService {
for (let i = 0; i < resData['title'].length; i++) { for (let i = 0; i < resData['title'].length; i++) {
if (resData['title'][i] && resData['title'][i].content) { if (resData['title'][i] && resData['title'][i].content) {
if (!result.title.name || resData['title'][i].classid == "main title") { if (!result.title.name || resData['title'][i].classid == "main title") {
result['title'].name = String(resData['title'][i].content); result['title'].name = StringUtils.HTMLToString(String(resData['title'][i].content));
} }
if (resData['title'][i].classid == "main title") { if (resData['title'][i].classid == "main title") {
break; break;
@ -331,7 +331,7 @@ export class SearchResearchResultsService {
} }
// result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : ""; // result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : "";
} else { } else {
result['title'].name = (resData['title'] && resData['title'].content) ? String(resData['title'].content) : ""; result['title'].name = (resData['title'] && resData['title'].content) ? StringUtils.HTMLToString(String(resData['title'].content)) : "";
} }
result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier']; result['id'] = Array.isArray(data) ? data[i]['result']['header']['dri:objIdentifier'] : data['result']['header']['dri:objIdentifier'];
@ -393,9 +393,9 @@ export class SearchResearchResultsService {
let abstracts = this.parsingFunctions.parseDescription(resData.description, true); let abstracts = this.parsingFunctions.parseDescription(resData.description, true);
result.description = abstracts; result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) { // if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "..."; // result.description = result.description.substring(0, this.sizeOfDescription) + "...";
} // }
if (resData.embargoenddate && resData.embargoenddate != '') { if (resData.embargoenddate && resData.embargoenddate != '') {
result.embargoEndDate = Dates.getDate(resData.embargoenddate); result.embargoEndDate = Dates.getDate(resData.embargoenddate);

View File

@ -1,5 +1,5 @@
<div *ngIf="showMenu && activeHeader"> <div *ngIf="showMenu && activeHeader">
<div class="uk-hidden@l"> <div id="main-menu-small" class="uk-hidden@l">
<nav class="uk-navbar-container uk-navbar" uk-navbar="delay-hide: 400"> <nav class="uk-navbar-container uk-navbar" uk-navbar="delay-hide: 400">
<div <div
*ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge"> *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge">
@ -7,7 +7,7 @@
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')" [src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
alt="BETA" style="height: 60px; width: 60px;"> alt="BETA" style="height: 60px; width: 60px;">
</div> </div>
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-left"> <div *ngIf="!onlyTop || userMenu" class="uk-navbar-left" [class.uk-light]='activeHeader.darkBg'>
<a *ngIf="!offCanvasFlip" class="uk-navbar-toggle" href="#tm-mobile" uk-toggle="" style="z-index:1000;"> <a *ngIf="!offCanvasFlip" class="uk-navbar-toggle" href="#tm-mobile" uk-toggle="" style="z-index:1000;">
<div uk-navbar-toggle-icon="" class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon"></div> <div uk-navbar-toggle-icon="" class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon"></div>
<span class="visually-hidden">toggle menu</span> <span class="visually-hidden">toggle menu</span>
@ -16,7 +16,7 @@
<div class="uk-navbar-center"> <div class="uk-navbar-center">
<ng-container *ngTemplateOutlet="header_template; context: {mobile: true}"></ng-container> <ng-container *ngTemplateOutlet="header_template; context: {mobile: true}"></ng-container>
</div> </div>
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-right"> <div *ngIf="!onlyTop || userMenu" class="uk-navbar-right" [class.uk-light]='activeHeader.darkBg'>
<a *ngIf="offCanvasFlip" class="uk-navbar-toggle" href="#tm-mobile" uk-toggle=""> <a *ngIf="offCanvasFlip" class="uk-navbar-toggle" href="#tm-mobile" uk-toggle="">
<div uk-navbar-toggle-icon="" class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon"></div> <div uk-navbar-toggle-icon="" class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon"></div>
</a> </a>

View File

@ -117,8 +117,8 @@ export class JsonldDocumentSerializerService {
} }
serializeDescription(doc, buffer){ serializeDescription(doc, buffer){
if(doc.description && doc.description[0]) { if(doc.description) {
buffer["description"] = doc.description[0]; buffer["description"] = doc.description;
} }
} }
serializeIdentifier(doc, buffer){ serializeIdentifier(doc, buffer){

View File

@ -107,6 +107,7 @@ export class EGIDataTransferComponent {
this.egiTransferModal.okButton = true; this.egiTransferModal.okButton = true;
this.egiTransferModal.okButtonText = ">> Transfer"; this.egiTransferModal.okButtonText = ">> Transfer";
this.egiTransferModal.alertTitle = "EOSC data transfer service [demo]"; this.egiTransferModal.alertTitle = "EOSC data transfer service [demo]";
this.egiTransferModal.stayOpen = true;
this.init(); this.init();
this.egiTransferModal.open(); this.egiTransferModal.open();
} }
@ -198,6 +199,7 @@ export class EGIDataTransferComponent {
}); });
this.jobId = res['jobId']; this.jobId = res['jobId'];
this.status = "success"; this.status = "success";
this.egiTransferModal.okButton = false;
this.message = ` this.message = `
<!--div class="uk-text-large uk-margin-bottom">Data transfer has began!</div--> <!--div class="uk-text-large uk-margin-bottom">Data transfer has began!</div-->
<div>Transfer of ` + this.downloadElements.length + ` files to <a href="`+ this.selectedDestination.webpage + `" target=_blank>`+this.selectedDestination.label+`</a> has began.`; <div>Transfer of ` + this.downloadElements.length + ` files to <a href="`+ this.selectedDestination.webpage + `" target=_blank>`+this.selectedDestination.label+`</a> has began.`;

View File

@ -59,7 +59,7 @@ export class SearchFields {
}, },
["eoscifguidelines"]: { ["eoscifguidelines"]: {
name: "EOSC Subject", name: "EOSC Subject",
type: "keyword", type: "refine",
param: "eoscSubj", param: "eoscSubj",
operator: "es", operator: "es",
equalityOperator: " exact ", equalityOperator: " exact ",

View File

@ -285,9 +285,7 @@
<div class="section4 uk-text-small"> <div class="section4 uk-text-small">
<!-- Description --> <!-- Description -->
<div *ngIf="result.description" class="multi-line-ellipsis lines-3"> <div *ngIf="result.description" class="multi-line-ellipsis lines-3">
<p class="uk-text-meta"> <p class="uk-text-meta" [innerHTML]="result.description"></p>
{{result.description}}
</p>
</div> </div>
</div> </div>
<!-- 5th section(deposit only) --> <!-- 5th section(deposit only) -->

View File

@ -207,7 +207,7 @@ export class ResultPreview {
resultPreview.accessMode = result.accessMode; resultPreview.accessMode = result.accessMode;
resultPreview.countries = result.countries; resultPreview.countries = result.countries;
resultPreview.projects = result.fundedByProjects; resultPreview.projects = result.fundedByProjects;
resultPreview.description = result.description.length > 0 ? result.description[0] : ""; resultPreview.description = result.description;//.length > 0 ? result.description[0] : "";
if(result.dateofacceptance) { if(result.dateofacceptance) {
resultPreview.year = new Date(result.dateofacceptance).getFullYear().toString(); resultPreview.year = new Date(result.dateofacceptance).getFullYear().toString();
} }