[Library | new-theme]: In result, project, dataprovider landing pages use type names from OpenaireEntities.

1. dataProvider.component.html: Use type names from OpenaireEntities | Added missing bottom <helper> and graph_and_feedback_template for small screens.
2. dataProvider.component.ts: Use type names from OpenaireEntities | stickyHeader = false when queryParams change.
3. project.component.html: Use type names from OpenaireEntities.
4. project.component.ts: stickyHeader = false when queryParams change.
5. resultLanding.component.html: Use type names from OpenaireEntities | In  #relation_in_tab, use common component for input instead of mat-select.
6. resultLanding.component.ts:
   a. Use type names from OpenaireEntities.
   b. Added relatedClassFilters: Option[] and use it in input for #relation_in_tab.
   c. stickyHeader = false when queryParams change.
7. resultLanding.module.ts: Imported InputModule.
8. orcid-work.component.ts: Use type names from OpenaireEntities.
9. result-preview.component: Use type names from OpenaireEntities.
This commit is contained in:
Konstantina Galouni 2022-05-04 13:57:13 +03:00
parent 6c3d1c5127
commit 5e35f5dff1
10 changed files with 107 additions and 76 deletions

View File

@ -137,32 +137,32 @@
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)" [offsetForSticky]="offset" [(isSticky)]="stickyHeader">
<my-tab [tabTitle]="'Summary'" [tabId]="'summary'" [active]="true"></my-tab>
<my-tab *ngIf="fetchProjects.searchUtils.totalResults > 0"
[tabTitle]="'Projects'" [tabNumber]="fetchProjects.searchUtils.totalResults"
[tabTitle]="openaireEntities.PROJECTS" [tabNumber]="fetchProjects.searchUtils.totalResults"
[tabId]="'projects'">
</my-tab>
<my-tab *ngIf="fetchDataproviders.searchUtils.totalResults > 0"
[tabTitle]="'Content Providers'" [tabNumber]="fetchDataproviders.searchUtils.totalResults"
[tabTitle]="openaireEntities.DATASOURCES" [tabNumber]="fetchDataproviders.searchUtils.totalResults"
[tabId]="'datasources'">
</my-tab>
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabTitle]="openaireEntities.PUBLICATIONS" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabId]="'publications'">
</my-tab>
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabTitle]="openaireEntities.DATASETS" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabId]="'datasets'">
</my-tab>
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabTitle]="openaireEntities.SOFTWARE" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabId]="'software'">
</my-tab>
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabTitle]="openaireEntities.OTHER" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabId]="'other'">
</my-tab>
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
[tabTitle]="'Related Content Providers'" [tabId]="'relatedDatasources'">
[tabTitle]="'Related '+openaireEntities.DATASOURCES" [tabId]="'relatedDatasources'">
</my-tab>
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
@ -423,6 +423,9 @@
</div>
</ng-container>
</div>
<div class="uk-text-xsmall uk-hidden@m"><ng-container *ngTemplateOutlet="graph_and_feedback_template"></ng-container></div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>
</div>
</div>

View File

@ -163,7 +163,8 @@ export class DataProviderComponent {
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
this.subscriptions.push(this.route.queryParams.subscribe(data => {
this.updateTitle("Content provider");
this.stickyHeader = false;
this.updateTitle(this.openaireEntities.DATASOURCE);
this.updateDescription("");
this.datasourceId = data['datasourceId'];
if (this.datasourceId && StringUtils.isOpenAIREID(this.datasourceId)) {
@ -284,7 +285,7 @@ export class DataProviderComponent {
},
err => {
//console.log(err);
this.handleError("Error getting content provider for id: " + this.datasourceId, err);
this.handleError("Error getting "+this.openaireEntities.DATASOURCE+" for id: " + this.datasourceId, err);
if (err.status == 404) {
this._router.navigate(['/error'], {
queryParams: {
@ -313,7 +314,7 @@ export class DataProviderComponent {
err => {
//console.log(err);
this.aggregationStatusIsInitialized = true;
this.handleError("Error getting content provider aggregation status for id: " + this.datasourceId, err);
this.handleError("Error getting "+this.openaireEntities.DATASOURCE+" aggregation status for id: " + this.datasourceId, err);
}
));
}
@ -594,7 +595,7 @@ export class DataProviderComponent {
this.searchRelatedDatasources(1, 0);
this.relatedDatasourcesModal.cancelButton = false;
this.relatedDatasourcesModal.okButton = false;
this.relatedDatasourcesModal.alertTitle = "Related content providers of";
this.relatedDatasourcesModal.alertTitle = "Related "+this.openaireEntities.DATASOURCES+" of";
this.relatedDatasourcesModal.open();
}
@ -617,7 +618,7 @@ export class DataProviderComponent {
public openOrganizationsModal() {
this.organizationsModal.cancelButton = false;
this.organizationsModal.okButton = false;
this.organizationsModal.alertTitle = "Organizations";
this.organizationsModal.alertTitle = this.openaireEntities.ORGANIZATIONS;
this.organizationsModal.open();
}
@ -646,7 +647,7 @@ export class DataProviderComponent {
}
private handleError(message: string, error) {
console.error("Content Provider Landing Page: " + message, error);
console.error(this.openaireEntities.DATASOURCE+" Landing Page: " + message, error);
}
private getEntityName(entityType: string, plural: boolean, full: boolean): string {

View File

@ -128,17 +128,18 @@
<div class="uk-margin-bottom">
<ng-container *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets">
<span class="uk-label uk-label-success uk-text-truncate"
title="Open Access mandate for Publications and Research Data">Open Access mandate for Publications and Research Data
title="Open Access mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}">
Open Access mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}
</span>&#160;
</ng-container>
<ng-container *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && (projectInfo.openAccessMandateDatasets == undefined || !projectInfo.openAccessMandateDatasets)">
<span class="uk-label uk-label-success uk-text-truncate" title="Open Access mandate for Publications">
Open Access mandate for Publications
<span class="uk-label uk-label-success uk-text-truncate" title="Open Access mandate for {{openaireEntities.PUBLICATIONS}}">
Open Access mandate for {{openaireEntities.PUBLICATIONS}}
</span>&#160;
</ng-container>
<ng-container *ngIf="projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets && (projectInfo.openAccessMandatePublications == undefined || !projectInfo.openAccessMandatePublications)">
<span class="uk-label uk-label-success uk-text-truncate" title="Open Access mandate for Research Data">
Open Access mandate for Research Data
<span class="uk-label uk-label-success uk-text-truncate" title="Open Access mandate for {{openaireEntities.DATASETS}}">
Open Access mandate for {{openaireEntities.DATASETS}}
</span>&#160;
</ng-container>
<ng-container *ngIf="projectInfo.funding && projectInfo.funding.funderName">
@ -221,13 +222,13 @@
<span
*ngIf="projectInfo.openAccessMandatePublications != undefined && !projectInfo.openAccessMandatePublications"
class="uk-margin-right">
<span class="uk-text-meta">Publications: </span>
<span class="uk-text-meta">{{openaireEntities.PUBLICATIONS}}: </span>
<!-- <span *ngIf="projectInfo.openAccessMandatePublications">Yes</span>-->
<span>No</span>
</span>
<span
*ngIf="projectInfo.openAccessMandateDatasets != undefined && !projectInfo.openAccessMandateDatasets">
<span class="uk-text-meta">Research Data: </span>
<span class="uk-text-meta">{{openaireEntities.DATASETS}}: </span>
<span>No</span>
</span>
</div>
@ -243,16 +244,16 @@
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)" [offsetForSticky]="offset" [(isSticky)]="stickyHeader">
<my-tab tabTitle="Summary" [tabId]="'summary'" [active]="true"></my-tab>
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabTitle]="openaireEntities.PUBLICATIONS" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabId]="'publications'"></my-tab>
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabTitle]="openaireEntities.DATASETS" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabId]="'datasets'"></my-tab>
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabTitle]="openaireEntities.SOFTWARE" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabId]="'software'"></my-tab>
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabTitle]="openaireEntities.OTHER" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabId]="'other'"></my-tab>
<my-tab [tabTitle]="'Dmps'" [tabNumber]="fetchDmps.searchUtils.totalResults > 0 ? fetchDmps.searchUtils.totalResults : ''" [tabId]="'dmps'"></my-tab>
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0

View File

@ -1,4 +1,4 @@
import {ChangeDetectorRef, Component, Input, ViewChild} from '@angular/core';
import {Component, Input, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
@ -112,7 +112,7 @@ export class ProjectComponent {
public showFeedback: boolean;
public feedbackFields: string [] = [
'Title', 'Funding Information', 'Duration',
'Organizations', 'Other'];
OpenaireEntities.ORGANIZATIONS, 'Other'];
@ViewChild(ModalLoading) loading: ModalLoading;
// Alert box when something is wrong with CSV requests
@ -186,6 +186,7 @@ export class ProjectComponent {
this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.stickyHeader = false;
this.metricsClicked = false;
this.statsClicked = false;
this.fetchPublications = new FetchResearchResults(this._searchResearchResultsService);

View File

@ -278,7 +278,7 @@
</ng-container>
<ng-container *ngIf="resultLandingInfo.relatedResults?.length > 0">
<div id="all_related" class="landing-section uk-padding uk-padding-remove-horizontal">
<ng-container *ngTemplateOutlet="relation_in_tab; context: { researchResults: filteredRelatedResults, header: '', relatedClassFilters: resultLandingInfo.relatedClassFilters}"></ng-container>
<ng-container *ngTemplateOutlet="relation_in_tab; context: { researchResults: filteredRelatedResults, header: ''}"></ng-container>
</div>
</ng-container>
<ng-container *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0">
@ -445,22 +445,22 @@
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
[ids]="resultLandingInfo.deletedByInferenceIds"
[modal]="AlertModalDeletedByInference"
[resultType]="type" [type]="'publications'"></deletedByInference>
[resultType]="type" [type]="openaireEntities.PUBLICATIONS"></deletedByInference>
<deletedByInference *ngIf="type == 'dataset' && deleteByInferenceOpened"
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
[ids]="resultLandingInfo.deletedByInferenceIds"
[modal]="AlertModalDeletedByInference"
[resultType]="'dataset'" [type]="'research data'"></deletedByInference>
[resultType]="'dataset'" [type]="openaireEntities.DATASETS"></deletedByInference>
<deletedByInference *ngIf="type == 'software' && deleteByInferenceOpened"
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
[ids]="resultLandingInfo.deletedByInferenceIds"
[modal]="AlertModalDeletedByInference"
[resultType]="type" [type]="'software'"></deletedByInference>
[resultType]="type" [type]="openaireEntities.SOFTWARE"></deletedByInference>
<deletedByInference *ngIf="type == 'orp' && deleteByInferenceOpened"
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
[ids]="resultLandingInfo.deletedByInferenceIds"
[modal]="AlertModalDeletedByInference"
[resultType]="'other'" [type]="'other research products'"></deletedByInference>
[resultType]="'other'" [type]="openaireEntities.OTHER"></deletedByInference>
</modal-alert>
<modal-alert *ngIf="resultLandingInfo" #citeModal>
<citeThis *ngIf="citeThisClicked" [result]="resultLandingInfo" [id]="id"
@ -488,21 +488,26 @@
</ul>
</ng-template>
<ng-template #relation_in_tab let-researchResults="researchResults" let-header="header" let-relatedClassFilters="relatedClassFilters">
<ng-template #relation_in_tab let-researchResults="researchResults" let-header="header">
<div
*ngIf="researchResults && researchResults.length > 0"
class="uk-margin-bottom">
<h6 *ngIf="header">{{header}}</h6>
<mat-form-field *ngIf="relatedClassFilters?.size > 1" class="matSelectionFormField">
<mat-label>Filter by relation:</mat-label>
<mat-select [(ngModel)]="relatedClassSelected" (ngModelChange)="relatedClassChanged()"
[disableOptionCentering]="true"
panelClass="matSelectionPanel"
class="uk-text-bold matSelection">
<mat-option [value]="">All relations</mat-option>
<mat-option *ngFor="let relatedClass of relatedClassFilters" [value]="relatedClass">{{relatedClass}}</mat-option>
</mat-select>
</mat-form-field>
<!-- <mat-form-field *ngIf="relatedClassFilters?.size > 1" class="matSelectionFormField">-->
<!-- <mat-label>Filter by relation:</mat-label>-->
<!-- <mat-select [(ngModel)]="relatedClassSelected" (ngModelChange)="relatedClassChanged()"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="matSelectionPanel"-->
<!-- class="uk-text-bold matSelection">-->
<!-- <mat-option [value]="">All relations</mat-option>-->
<!-- <mat-option *ngFor="let relatedClass of relatedClassFilters" [value]="relatedClass">{{relatedClass}}</mat-option>-->
<!-- </mat-select>-->
<!-- </mat-form-field>-->
<div *ngIf="relatedClassFilters?.length > 1" class="uk-margin-medium-bottom"
input type="select" placeholder="Filter by relation" inputClass="flat x-small"
[options]="relatedClassFilters" [(value)]="relatedClassSelected"
(valueChange)="relatedClassChanged()"></div>
<results-and-pages
[type]="openaireEntities.RESULTS"
[page]="relatedPage" [pageSize]="pageSize"

View File

@ -24,6 +24,7 @@ import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
import {ConnectHelper} from "../../connect/connectHelper";
import {UserManagementService} from "../../services/user-management.service";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {Option} from "../../sharedComponents/input/input.component";
declare var UIkit;
@ -119,6 +120,7 @@ export class ResultLandingComponent {
@ViewChild("annotation") annotation: AnnotationComponent;
public contextsWithLink: any;
public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}];
public relatedClassSelected: string = "";
public filteredRelatedResults: RelationResult[];
@ -165,6 +167,7 @@ export class ResultLandingComponent {
this.updateUrl(this.properties.domain +this.properties.baseLink + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
this.subscriptions.push(this.route.queryParams.subscribe(data => {
this.stickyHeader = false;
if (data['articleId']) {
this.id = data['articleId'];
this.initMetaAndLinks("publication");
@ -231,34 +234,34 @@ export class ResultLandingComponent {
private initMetaAndLinks(type: string) {
if (type == "publication") {
this.type = "publication";
this.updateTitle("Publication");
this.updateTitle(this.openaireEntities.PUBLICATION);
this.linkToLandingPage = this.properties.searchLinkToPublication;
this.linkToSearchPage = this.properties.searchLinkToPublications;
this.title = "Publication";
this.title = this.openaireEntities.PUBLICATION;
} else if (type == "dataset") {
this.updateTitle("Dataset");
this.updateTitle(this.openaireEntities.DATASET);
this.type = "dataset";
this.linkToLandingPage = this.properties.searchLinkToDataset;
this.linkToSearchPage = this.properties.searchLinkToDatasets;
this.title = "Research Data";
this.title = this.openaireEntities.DATASET;
} else if (type == "software") {
this.updateTitle("Software");
this.updateTitle(this.openaireEntities.SOFTWARE_SINGULAR);
this.type = "software";
this.linkToLandingPage = this.properties.searchLinkToSoftwareLanding;
this.linkToSearchPage = this.properties.searchLinkToSoftware;
this.title = "Software";
this.title = this.openaireEntities.SOFTWARE_SINGULAR;
} else if (type == "orp") {
this.type = "orp";
this.updateTitle("Other Research Product");
this.updateTitle(this.openaireEntities.OTHER_SINGULAR);
this.linkToLandingPage = this.properties.searchLinkToOrp;
this.linkToSearchPage = this.properties.searchLinkToOrps;
this.title = "Other Research Product";
this.title = this.openaireEntities.OTHER_SINGULAR;
} else if (type == "result") {
this.type = "result";
this.updateTitle("Research Result");
this.updateTitle(this.openaireEntities.RESULT);
this.linkToLandingPage = this.properties.searchLinkToResult;
this.linkToSearchPage = this.properties.searchLinkToResults;
this.title = "Research Result";
this.title = this.openaireEntities.RESULT;
}
}
@ -297,11 +300,13 @@ export class ResultLandingComponent {
public getTypeName(): string {
if (this.type === "dataset") {
return "research data";
return this.openaireEntities.DATASET;
} else if (this.type === "orp" || this.type === "other") {
return "research product";
} else {
return this.type;
return this.openaireEntities.OTHER_SINGULAR;
} else if(this.type === "publication") {
return this.openaireEntities.PUBLICATION;
} else if(this.type === "software") {
return this.openaireEntities.SOFTWARE_SINGULAR;
}
}
@ -456,6 +461,14 @@ export class ResultLandingComponent {
this.enermapsId = ParsingFunctions.getEnermapsConceptId(this.resultLandingInfo.contexts);
}
if(this.resultLandingInfo.relatedClassFilters.size > 1) {
for (let relClass of this.resultLandingInfo.relatedClassFilters) {
this.relatedClassFilters.push({"label": relClass, "value": relClass});
}
} else {
this.relatedClassFilters.pop();
}
this.relatedClassSelected = "";
this.filteredRelatedResults = this.resultLandingInfo.relatedResults;
@ -471,12 +484,14 @@ export class ResultLandingComponent {
}else if(err.name == "TimeoutError"){
this.errorMessage = 'An error occurred please try again later';
}else{
if (this.type == "publication" || this.type == "software") {
this.errorMessage = 'No ' + this.type + ' found';
if (this.type == "publication") {
this.errorMessage = "No "+ this.openaireEntities.PUBLICATIONS +" found";
} else if (this.type == "software") {
this.errorMessage = 'No ' + this.openaireEntities.SOFTWARE + ' found';
} else if (this.type == "dataset") {
this.errorMessage += "No research data found";
this.errorMessage += "No "+this.openaireEntities.DATASETS+" found";
} else if (this.type == "orp") {
this.errorMessage += "No research product found";
this.errorMessage += "No "+this.openaireEntities.OTHER+" found";
}
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + this.linkToSearchPage);
}
@ -610,15 +625,15 @@ export class ResultLandingComponent {
private handleError(message: string, error) {
if (this.type == "publication") {
console.error("Publication Landing Page: " + message, error);
console.error(this.openaireEntities.PUBLICATION+" Landing Page: " + message, error);
} else if (this.type == "dataset") {
console.error("Research Data Landing Page: " + message, error);
console.error(this.openaireEntities.DATASET+" Landing Page: " + message, error);
} else if (this.type == "software") {
console.error("Software Landing Page: " + message, error);
console.error(this.openaireEntities.SOFTWARE_SINGULAR+" Landing Page: " + message, error);
} else if (this.type == "orp") {
console.error("Other Research Product Landing Page: " + message, error);
console.error(this.openaireEntities.OTHER_SINGULAR+" Landing Page: " + message, error);
} else {
console.error("Landing Page: " + message, error);
console.error(this.openaireEntities.RESULT+" Landing Page: " + message, error);
}
}
@ -844,7 +859,7 @@ export class ResultLandingComponent {
public openOrganizationsModal() {
this.organizationsModal.cancelButton = false;
this.organizationsModal.okButton = false;
this.organizationsModal.alertTitle = "Related Organizations";
this.organizationsModal.alertTitle = "Related "+this.openaireEntities.ORGANIZATIONS;
this.organizationsModal.open();
}
}

View File

@ -34,6 +34,7 @@ import {MatSelectModule} from "@angular/material/select";
import {IconsModule} from "../../utils/icons/icons.module";
import {IconsService} from "../../utils/icons/icons.service";
import {graph, link, quotes} from "../../utils/icons/icons";
import {InputModule} from "../../sharedComponents/input/input.module";
@NgModule({
imports: [
@ -42,7 +43,7 @@ import {graph, link, quotes} from "../../utils/icons/icons";
MetricsModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule,
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule,
AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule,
OrcidModule, MatFormFieldModule, MatSelectModule, IconsModule
OrcidModule, MatFormFieldModule, MatSelectModule, IconsModule, InputModule
],
declarations: [
ResultLandingComponent

View File

@ -10,6 +10,7 @@ import {LoginErrorCodes} from "../login/utils/guardHelper.class";
import {ExternalIDV3_0, WorkV3_0} from "./orcidWork";
import {EnvProperties} from "../utils/properties/env-properties";
import {UserManagementService} from "../services/user-management.service";
import {OpenaireEntities} from "../utils/properties/searchFields";
declare var UIkit: any;
@ -263,9 +264,9 @@ declare var UIkit: any;
<modal-alert #propagationModal (alertOutput)="confirmedPropagation()">
<div>
This research outcome is the result of <span class="uk-text-bold"> merged research outcomes in OpenAIRE</span>.
This {{openaireEntities.RESULT}} is the result of <span class="uk-text-bold"> merged {{openaireEntities.RESULTS}} in OpenAIRE</span>.
<br><br>
You have already added <span class="uk-text-bold">{{this.putCodes?.length}} works</span> in your ORCID record related to the merged research outcome.
You have already added <span class="uk-text-bold">{{this.putCodes?.length}} works</span> in your ORCID record related to the merged {{openaireEntities.RESULT}}.
<div *ngIf="currentAction == 'delete'">
If you continue with delete action, <span class="uk-text-bold">all these works will be deleted</span>.
</div>
@ -327,6 +328,7 @@ export class OrcidWorkComponent {
public hoverDelete: boolean = false;
public properties: EnvProperties = properties;
public openaireEntities = OpenaireEntities;
constructor(private route: ActivatedRoute,
private _router: Router,

View File

@ -93,7 +93,7 @@
{{result.funderShortname}}
</span>
<span *ngIf="result.code" [class.uk-margin-left]="result.funderShortname">
<span class="uk-text-meta">Project Code: </span>
<span class="uk-text-meta">{{openaireEntities.PROJECT}} Code: </span>
{{result.code}}
</span>
<!-- Currently not parsed -->
@ -126,19 +126,19 @@
<span
*ngIf="result.openAccessMandatePublications && (!result.openAccessMandateDatasets)"
class="uk-label uk-label-success uk-text-truncate"
title="Open Access mandate for Publications">
Open Access mandate for Publications
title="Open Access mandate for {{openaireEntities.PUBLICATIONS}}">
Open Access mandate for {{openaireEntities.PUBLICATIONS}}
</span>{{' '}}
<span
*ngIf="result.openAccessMandateDatasets != undefined && result.openAccessMandateDatasets && (result.openAccessMandatePublications == undefined || !result.openAccessMandatePublications)"
class="uk-label uk-label-success uk-text-truncate " title="Open Access mandate for Research Data">
Open Access mandate for Research Data
class="uk-label uk-label-success uk-text-truncate " title="Open Access mandate for {{openaireEntities.DATASETS}}">
Open Access mandate for {{openaireEntities.DATASETS}}
</span>{{' '}}
<span
*ngIf="result.openAccessMandatePublications != undefined && result.openAccessMandatePublications && result.openAccessMandateDatasets != undefined && result.openAccessMandateDatasets"
class="uk-label uk-label-success uk-text-truncate"
title="Open Access mandate for Publications and Research Data">
Open Access mandate for Publications and Research Data
title="Open Access mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}">
Open Access mandate for {{openaireEntities.PUBLICATIONS}} and {{openaireEntities.DATASETS}}
</span>{{' '}}
<span *ngIf="result.languages && result.languages.length > 0">
<span

View File

@ -6,6 +6,7 @@ import {AlertModal} from "../modal/alert";
import {properties} from "../../../../environments/environment";
import {Session} from "../../login/utils/helper.class";
import {Identifier} from "../string-utils.class";
import {OpenaireEntities} from "../properties/searchFields";
@Component({
selector: 'result-preview',
@ -14,6 +15,7 @@ import {Identifier} from "../string-utils.class";
export class ResultPreviewComponent implements OnInit, OnChanges {
@Input() result: ResultPreview;
@Input() properties: EnvProperties;
public openaireEntities = OpenaireEntities;
@Input() showSubjects: boolean = true;
@Input() showOrganizations: boolean = true;
@Input() modal: AlertModal = null;