Merge from angular-14

This commit is contained in:
Konstantinos Triantafyllou 2022-12-01 11:22:46 +02:00
commit 1ed9b7db9b
30 changed files with 150 additions and 121 deletions

View File

@ -8,7 +8,7 @@ export class ConnectHelper {
if(properties.environment == "development" &&
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
domain = "canada.explore.openaire.eu"; //for testing
domain = "test.openaire.eu"; //for testing
}
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('eosc-portal.eu') != -1) {

View File

@ -49,7 +49,11 @@
<button class="uk-button uk-button-link uk-text-normal"><icon name="info" type="outlined" [flex]="true"></icon></button>
<div class="uk-dropdown uk-text-normal uk-width-medium uk-padding-small" uk-dropdown>
OpenAIRE style guide is based on <a href="https://getuikit.com/docs/introduction" target="_blank" class="uk-link custom-external">UIKit</a>.
You can find some usage examples <a routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null" target="_blank" class="uk-link custom-external">here</a>
You can find some usage examples
<a *ngIf="properties.dashboard == 'monitor'" routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null"
target="_blank" class="uk-link custom-external">here</a>
<a *ngIf="properties.dashboard == 'connect'" [href] ="'https://'+(properties.environment == 'beta' ? 'beta.' : '')+this.portal+'.openaire.eu/theme'"
target="_blank" class="uk-link custom-external">here</a>
in order to style your content.
</div>
</div>

View File

@ -53,7 +53,11 @@
<button class="uk-button uk-button-link uk-text-normal"><icon name="info" type="outlined" [flex]="true"></icon></button>
<div class="uk-dropdown uk-text-normal uk-width-medium uk-padding-small" uk-dropdown>
OpenAIRE style guide is based on <a href="https://getuikit.com/docs/introduction" target="_blank" class="uk-link custom-external">UIKit</a>.
You can find some usage examples <a routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null" target="_blank" class="uk-link custom-external">here</a>
You can find some usage examples
<a *ngIf="properties.dashboard == 'monitor'" routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null"
target="_blank" class="uk-link custom-external">here</a>
<a *ngIf="properties.dashboard == 'connect'" [href] ="'https://'+(properties.environment == 'beta' ? 'beta.' : '')+this.portal+'.openaire.eu/theme'"
target="_blank" class="uk-link custom-external">here</a>
in order to style your content.
</div>
</div>

View File

@ -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;

View File

@ -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:"";

View File

@ -10,7 +10,7 @@ import {StringUtils} from "../../utils/string-utils.class";
export class ParsingFunctions {
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::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::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) {
return abstracts.join(' ');
} 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 = "";
@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;

View File

@ -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

View File

@ -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);

View File

@ -49,7 +49,7 @@ export class DeletedByInferenceService {
result.dateofacceptance = data.dateofacceptance;
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")) {
result.accessMode = data['bestaccessright'].classname;

View File

@ -448,32 +448,23 @@
<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">
<!-- EOSC Services-->
<!-- 1 link -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length == 1 && properties.adminToolsPortalType == 'eosc'
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 0 && properties.adminToolsPortalType == 'eosc'
&& (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold custom-external"
target="_blank" [href]="resultLandingInfo.eoscSubjects[0].link">
<div class="uk-flex uk-flex-between uk-flex-middle uk-margin-small-bottom">
<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"
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>
<!-- more than 1 links -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 1 && properties.adminToolsPortalType == 'eosc'
&& (!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 class="uk-margin-small-left uk-flex uk-flex-column uk-flex-center">
<div *ngFor="let subject of resultLandingInfo.eoscSubjects; let i=index" class="uk-text-truncate">
<a [href]="subject.link" target="_blank" class="custom-external">{{subject.value}}</a>
</div>
</div>
</div>
</div>
<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>
</div>

View File

@ -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",'<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"];
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, "_"))
);
// console.log("common content " + allow)

View File

@ -153,10 +153,10 @@ export class ResultLandingService {
for(let i=0; i<data[1].length; i++) {
if(data[1][i] && data[1][i].content) {
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') {
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") {
// break;
@ -171,7 +171,7 @@ export class ResultLandingService {
}
// this.resultLandingInfo.title = (data[1][0] && data[1][0].content) ? String(data[1][0].content) : "";
} 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[] = [];
@ViewChild('workModal') workModal;
@ViewChild('saveWorkModal') saveWorkModal;
// @ViewChild('saveWorkModal') saveWorkModal;
@ViewChild('grantModal') grantModal;
@ViewChild('messageModal') messageModal;
// @ViewChild('messageModal') messageModal;
@ViewChild('propagationModal') propagationModal;
public requestGrant: boolean = false;
@ -723,16 +723,16 @@ export class OrcidWorkComponent {
this.workModal.cancel();
}
openMessageModal(title: string) {
this.messageModal.cancelButton = false;
this.messageModal.okButton = false;
this.messageModal.alertTitle = title;
this.messageModal.open();
}
closeMessageModal() {
this.messageModal.cancel();
}
// openMessageModal(title: string) {
// this.messageModal.cancelButton = false;
// this.messageModal.okButton = false;
// this.messageModal.alertTitle = title;
// this.messageModal.open();
// }
//
// closeMessageModal() {
// this.messageModal.cancel();
// }
openPropagationModal(title: string) {
this.propagationModal.cancelButton = true;

View File

@ -1,5 +1,6 @@
import {ResultLandingInfo} from "../utils/entities/resultLandingInfo";
import {ResultPreview} from "../utils/result-preview/result-preview";
import {StringUtils} from "../utils/string-utils.class";
export class WorkV3_0 {
// automatically filled by orcid?
@ -107,7 +108,8 @@ export class WorkV3_0 {
}
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),

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 *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">
@ -9,7 +9,7 @@
<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-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"
(queryChange)="keywordChanged($event)"
[isDisabled]="disableForms"

View File

@ -19,14 +19,14 @@
<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-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;">
<table class="uk-table uk-text-small uk-table-responsive uk-table-small uk-margin-remove">
<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-2-5">Terms</td>
</tr>
<tr *ngFor="let selectedField of selectedFields; let i = index">
<tr *ngFor="let selectedField of selectedFields; let i = index;">
<td>
<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"

View File

@ -7,7 +7,7 @@ import {
OnDestroy,
OnInit,
Output,
SimpleChanges
SimpleChanges, ViewChild
} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
@ -25,6 +25,7 @@ import {Option} from "../../sharedComponents/input/input.component";
templateUrl: 'advancedSearchForm.component.html'
})
export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges {
@ViewChild("container") container;
@Input() entityType;
@Input() fieldIds: string[];
@Input() fieldIdsMap;
@ -157,7 +158,9 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
} else {
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) {

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 '+
(usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
' 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 *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>
</div>
</div>
@ -132,7 +132,7 @@
<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-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"
[fieldIds]="fieldIds"
[fieldIdsMap]="fieldIdsMap"
@ -156,13 +156,14 @@
</div>
<schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters
[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>
<loading [ngClass]="'uk-height-medium uk-display-block uk-margin-xlarge-top'"></loading>
</ng-template>
<ng-template [ngIf]="searchUtils.refineStatus != errorCodes.LOADING || existingFiltersWithValues !== 0" [ngIfElse]="loading">
<div class="uk-container uk-container-large">
<div>
<div class="uk-container uk-container-large search-results-container">
<div [class.uk-margin-top]="properties.adminToolsPortalType == 'eosc'" >
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[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">
@ -212,7 +213,7 @@
search
</a>
</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
|| (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING)
|| (!hideFilters &&

View File

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

View File

@ -106,8 +106,14 @@ export class SearchDataprovidersService {
result['title'] = {"name": '', "accessMode": ''};
result['title'].name = resData.officialname;
result['englishname'] = resData.englishname;
if(resData.officialname) {
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 += 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);
result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "...";
}
// if (result.description && result.description.length > this.sizeOfDescription) {
// result.description = result.description.substring(0, this.sizeOfDescription) + "...";
// }
let typeid: string = resData['datasourcetype'].classid;
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 = resData.legalshortname;
if(resData.legalshortname) {
result['title'].name = StringUtils.HTMLToString(String(resData.legalshortname));
}
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();

View File

@ -135,11 +135,15 @@ export class SearchProjectsService {
// if(resData['acronym'] != undefined && resData['acronym'] != "") {
// result['title'].name = resData['acronym'] + " - ";
// }
if(Array.isArray(resData['title'])) {
result['title'].name += resData['title'][0];
if(resData['title']) {
if (Array.isArray(resData['title'])) {
result['title'].name += StringUtils.HTMLToString(String(resData['title'][0]));
} else {
result['title'].name += resData['title'];
result['title'].name += StringUtils.HTMLToString(String(resData['title']));
}
} else {
result['title'].name = "";
}
// if(result['title'].name != '') {
// result['title'].name += " ("+resData['code']+")"
@ -160,9 +164,9 @@ export class SearchProjectsService {
let abstracts = this.parsingFunctions.parseDescription(resData.summary, true);
result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "...";
}
// if (result.description && result.description.length > this.sizeOfDescription) {
// result.description = result.description.substring(0, this.sizeOfDescription) + "...";
// }
if(resData['rels'].hasOwnProperty("rel")) {
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++) {
if (resData['title'][i] && resData['title'][i].content) {
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") {
break;
@ -331,7 +331,7 @@ export class SearchResearchResultsService {
}
// result['title'].name = (resData['title'][0] && resData['title'][0].content) ? String(resData['title'][0].content) : "";
} 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'];
@ -393,9 +393,9 @@ export class SearchResearchResultsService {
let abstracts = this.parsingFunctions.parseDescription(resData.description, true);
result.description = abstracts;
if (result.description && result.description.length > this.sizeOfDescription) {
result.description = result.description.substring(0, this.sizeOfDescription) + "...";
}
// if (result.description && result.description.length > this.sizeOfDescription) {
// result.description = result.description.substring(0, this.sizeOfDescription) + "...";
// }
if (resData.embargoenddate && resData.embargoenddate != '') {
result.embargoEndDate = Dates.getDate(resData.embargoenddate);

View File

@ -1,5 +1,6 @@
<div *ngIf="showMenu && activeHeader">
<div class="uk-hidden@m">
<div id="main-menu-small" class="uk-hidden@m">
<nav class="uk-navbar-container uk-navbar" uk-navbar="delay-hide: 400">
<div
*ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge">
@ -7,7 +8,7 @@
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
alt="BETA" style="height: 60px; width: 60px;">
</div>
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-left">
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-left" [class.uk-light]='activeHeader.darkBg'>
<a 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>
<span class="visually-hidden">toggle menu</span>
@ -16,7 +17,7 @@
<div class="uk-navbar-center">
<ng-container *ngTemplateOutlet="header_template; context: {mobile: true}"></ng-container>
</div>
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-right">
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-right" [class.uk-light]='activeHeader.darkBg'>
<ng-container *ngIf="userMenu">
<user-mini [user]="user" mobileView=true (closeCanvasEmitter)="closeCanvas(canvas)"
[userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl

View File

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

View File

@ -107,6 +107,7 @@ export class EGIDataTransferComponent {
this.egiTransferModal.okButton = true;
this.egiTransferModal.okButtonText = ">> Transfer";
this.egiTransferModal.alertTitle = "EOSC data transfer service [demo]";
this.egiTransferModal.stayOpen = true;
this.init();
this.egiTransferModal.open();
}
@ -198,6 +199,7 @@ export class EGIDataTransferComponent {
});
this.jobId = res['jobId'];
this.status = "success";
this.egiTransferModal.okButton = false;
this.message = `
<!--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.`;

View File

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

View File

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

View File

@ -207,7 +207,7 @@ export class ResultPreview {
resultPreview.accessMode = result.accessMode;
resultPreview.countries = result.countries;
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) {
resultPreview.year = new Date(result.dateofacceptance).getFullYear().toString();
}