Merge remote-tracking branch 'origin/new-theme' into new-theme
This commit is contained in:
commit
97c11eb0ec
|
@ -1,6 +1,7 @@
|
||||||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||||
import {Project} from "../../utils/result-preview/result-preview";
|
import {Project} from "../../utils/result-preview/result-preview";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
|
import {HelperFunctions} from '../../utils/HelperFunctions.class';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fundedBy',
|
selector: 'fundedBy',
|
||||||
|
@ -60,7 +61,7 @@ import {properties} from "../../../../environments/environment";
|
||||||
<div *ngIf="item.provenanceAction || item.validated" class="uk-text-meta">
|
<div *ngIf="item.provenanceAction || item.validated" class="uk-text-meta">
|
||||||
<span *ngIf="item.validated">Validated by funder</span>
|
<span *ngIf="item.validated">Validated by funder</span>
|
||||||
<span *ngIf="item.provenanceAction && item.validated"> | </span>
|
<span *ngIf="item.provenanceAction && item.validated"> | </span>
|
||||||
<span *ngIf="item.provenanceAction">{{item.provenanceAction}}</span>
|
<span *ngIf="item.provenanceAction">{{getVocabularyLabel(item.provenanceAction, provenanceActionVocabulary)}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,6 +79,7 @@ export class FundedByComponent {
|
||||||
public threshold: number = 4;
|
public threshold: number = 4;
|
||||||
public url = properties.searchLinkToProject.split('?')[0];
|
public url = properties.searchLinkToProject.split('?')[0];
|
||||||
public title: string = "Funded by";
|
public title: string = "Funded by";
|
||||||
|
@Input() provenanceActionVocabulary = null;
|
||||||
|
|
||||||
public viewAllClick() {
|
public viewAllClick() {
|
||||||
if(this.fundedByProjects.length <= this.threshold*2) {
|
if(this.fundedByProjects.length <= this.threshold*2) {
|
||||||
|
@ -93,4 +95,8 @@ export class FundedByComponent {
|
||||||
this.viewAll = false;
|
this.viewAll = false;
|
||||||
this.viewAllClicked.emit("");
|
this.viewAllClicked.emit("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getVocabularyLabel(value: any, vocabulary: any) {
|
||||||
|
return HelperFunctions.getVocabularyLabel(value, vocabulary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,7 @@ export class ParsingFunctions {
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public parseFundingByProjects(fundedByProjects: Project[], relation: any,
|
public parseFundingByProjects(fundedByProjects: Project[], relation: any): Project[] {
|
||||||
provenanceActionVocabulary: any): Project[] {
|
|
||||||
if (fundedByProjects == undefined) {
|
if (fundedByProjects == undefined) {
|
||||||
fundedByProjects = [];
|
fundedByProjects = [];
|
||||||
}
|
}
|
||||||
|
@ -52,10 +51,7 @@ export class ParsingFunctions {
|
||||||
if(relation.validated && relation.validated.date) {
|
if(relation.validated && relation.validated.date) {
|
||||||
fundedByProject['validated'] = true;
|
fundedByProject['validated'] = true;
|
||||||
}
|
}
|
||||||
|
fundedByProject['provenanceAction'] = relation.provenanceaction;
|
||||||
if (provenanceActionVocabulary != null && relation.provenanceaction in provenanceActionVocabulary) {
|
|
||||||
fundedByProject['provenanceAction'] = provenanceActionVocabulary[relation.provenanceaction];
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
fundedByProject['id'] = "";
|
fundedByProject['id'] = "";
|
||||||
fundedByProject['acronym'] = "";
|
fundedByProject['acronym'] = "";
|
||||||
|
|
|
@ -479,7 +479,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Funded By -->
|
<!-- Funded By -->
|
||||||
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
|
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
|
||||||
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects" (viewAllClicked)="viewAll=$event"></fundedBy>
|
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects" [provenanceActionVocabulary]="provenanceActionVocabulary" (viewAllClicked)="viewAll=$event"></fundedBy>
|
||||||
</div>
|
</div>
|
||||||
<!-- Communities -->
|
<!-- Communities -->
|
||||||
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length > 0 && !noCommunities && (!viewAll || viewAll=='relatedTo')">
|
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length > 0 && !noCommunities && (!viewAll || viewAll=='relatedTo')">
|
||||||
|
@ -567,7 +567,8 @@
|
||||||
<ul class="uk-list uk-list-divider uk-margin">
|
<ul class="uk-list uk-list-divider uk-margin">
|
||||||
<li *ngFor="let item of researchResults.slice((relatedPage-1)*pageSize, relatedPage*pageSize)">
|
<li *ngFor="let item of researchResults.slice((relatedPage-1)*pageSize, relatedPage*pageSize)">
|
||||||
<result-preview [modal]="relationModal" [properties]="properties"
|
<result-preview [modal]="relationModal" [properties]="properties"
|
||||||
[result]="getResultPreview(item)"
|
[result]="getResultPreview(item)" [provenanceActionVocabulary]="provenanceActionVocabulary"
|
||||||
|
[relationsVocabulary]="relationsVocabulary"
|
||||||
[isCard]="false"></result-preview>
|
[isCard]="false"></result-preview>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -125,6 +125,9 @@ export class ResultLandingComponent {
|
||||||
public relatedClassSelected: string = "";
|
public relatedClassSelected: string = "";
|
||||||
public filteredRelatedResults: RelationResult[];
|
public filteredRelatedResults: RelationResult[];
|
||||||
|
|
||||||
|
public provenanceActionVocabulary = null;
|
||||||
|
public relationsVocabulary = null;
|
||||||
|
|
||||||
public offset: number;
|
public offset: number;
|
||||||
public stickyHeader: boolean = false;
|
public stickyHeader: boolean = false;
|
||||||
public graph_offset: number = 0;
|
public graph_offset: number = 0;
|
||||||
|
@ -358,28 +361,32 @@ export class ResultLandingComponent {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
let observables: Array<Observable<any>> = [];
|
this.subscriptions.push(this._vocabulariesService.getProvenanceActionVocabulary(this.properties).subscribe(
|
||||||
observables.push(this._vocabulariesService.getProvenanceActionVocabulary(this.properties));
|
data => {
|
||||||
observables.push(this._vocabulariesService.getSubjectsVocabulary(this.properties));
|
this.provenanceActionVocabulary = data;
|
||||||
observables.push(this._vocabulariesService.getRelationsVocabulary(this.properties));
|
}, error => {
|
||||||
// observables.push(this.indexInfoService.getLastIndexDate(properties));
|
this.handleError("Error getting provenance action vocabulary for " + this.type, error);
|
||||||
// observables.push(this.indexInfoService.getLastOrcidUpdateDate(properties));
|
}
|
||||||
|
));
|
||||||
this.subscriptions.push(forkJoin(observables)
|
this.subscriptions.push(this._vocabulariesService.getSubjectsVocabulary(this.properties).subscribe(
|
||||||
.subscribe(
|
data => {
|
||||||
// this.subscriptions.push(forkJoin(observables).subscribe(
|
this.getResultLandingInfo(data);
|
||||||
// this.subscriptions.push(this._vocabulariesService.getProvenanceActionVocabulary(this.properties).subscribe(
|
}, error => {
|
||||||
vocabularies => {
|
this.getResultLandingInfo(null);
|
||||||
this.getResultLandingInfo(vocabularies[0], vocabularies[1], vocabularies[2]);
|
this.handleError("Error getting subjects vocabulary for " + this.type, error);
|
||||||
}, err => {
|
}
|
||||||
this.getResultLandingInfo(null, null);
|
));
|
||||||
this.handleError("Error getting provenance action vocabulary for " + this.type, err);
|
this.subscriptions.push(this._vocabulariesService.getRelationsVocabulary(this.properties).subscribe(
|
||||||
}
|
data => {
|
||||||
));
|
this.relationsVocabulary = data;
|
||||||
} else {
|
}, error => {
|
||||||
this.getResultLandingInfo(null, null);
|
this.handleError("Error getting relations vocabulary for " + this.type, error);
|
||||||
}
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.getResultLandingInfo(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private setActiveTab() {
|
private setActiveTab() {
|
||||||
|
@ -424,14 +431,14 @@ export class ResultLandingComponent {
|
||||||
// return numberOfTabs;
|
// return numberOfTabs;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private getResultLandingInfo(provenanceActionVocabulary: any, subjectsVocabulary?: any, relationsVocabulary?: any) {
|
private getResultLandingInfo(subjectsVocabulary?: any) {
|
||||||
if(this.resultFromInput && this.resultLandingInfo){
|
if(this.resultFromInput && this.resultLandingInfo){
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.resultLandingInfo = null;
|
this.resultLandingInfo = null;
|
||||||
this.hasAltMetrics = false;
|
this.hasAltMetrics = false;
|
||||||
this.subscriptions.push(this._resultLandingService.getResultLandingInfo(this.id, this.identifier, this.type, provenanceActionVocabulary, subjectsVocabulary, relationsVocabulary, this.properties).subscribe(
|
this.subscriptions.push(this._resultLandingService.getResultLandingInfo(this.id, this.identifier, this.type, subjectsVocabulary, this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.resultLandingInfo = data;
|
this.resultLandingInfo = data;
|
||||||
this.id = this.resultLandingInfo.objIdentifier;
|
this.id = this.resultLandingInfo.objIdentifier;
|
||||||
|
@ -490,7 +497,7 @@ export class ResultLandingComponent {
|
||||||
|
|
||||||
if(this.resultLandingInfo.relatedClassFilters.size > 1) {
|
if(this.resultLandingInfo.relatedClassFilters.size > 1) {
|
||||||
for (let relClass of this.resultLandingInfo.relatedClassFilters) {
|
for (let relClass of this.resultLandingInfo.relatedClassFilters) {
|
||||||
this.relatedClassFilters.push({"label": relClass, "value": relClass});
|
this.relatedClassFilters.push({"label": HelperFunctions.getVocabularyLabel(relClass, this.relationsVocabulary), "value": relClass});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.relatedClassFilters.pop();
|
this.relatedClassFilters.pop();
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class ResultLandingService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getResultLandingInfo (id: string, identifier: Identifier, type: string,
|
getResultLandingInfo (id: string, identifier: Identifier, type: string,
|
||||||
provenanceActionVocabulary: any, subjectsVocabulary: any, relationsVocabulary: any,
|
subjectsVocabulary: any,
|
||||||
properties: EnvProperties): any {
|
properties: EnvProperties): any {
|
||||||
let url: string = this.buildResultLandingInfoUrl(id, identifier, type);
|
let url: string = this.buildResultLandingInfoUrl(id, identifier, type);
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ export class ResultLandingService {
|
||||||
res[0], // 14
|
res[0], // 14
|
||||||
res[2], // 15
|
res[2], // 15
|
||||||
]))
|
]))
|
||||||
.pipe(map(res => this.parseResultLandingInfo(res, provenanceActionVocabulary, subjectsVocabulary, relationsVocabulary, properties)));
|
.pipe(map(res => this.parseResultLandingInfo(res, subjectsVocabulary, properties)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// getProvenanceActionVocabulary (properties: EnvProperties): any {
|
// getProvenanceActionVocabulary (properties: EnvProperties): any {
|
||||||
|
@ -125,7 +125,7 @@ export class ResultLandingService {
|
||||||
return throwError(error || 'Server error');
|
return throwError(error || 'Server error');
|
||||||
}
|
}
|
||||||
|
|
||||||
parseResultLandingInfo (data: any, provenanceActionVocabulary: any, subjectsVocabulary: any, relationsVocabulary: any, properties: EnvProperties): any {
|
parseResultLandingInfo (data: any, subjectsVocabulary: any, properties: EnvProperties): any {
|
||||||
this.resultLandingInfo = new ResultLandingInfo();
|
this.resultLandingInfo = new ResultLandingInfo();
|
||||||
|
|
||||||
// res
|
// res
|
||||||
|
@ -184,23 +184,15 @@ export class ResultLandingService {
|
||||||
relation = Array.isArray(data[2]) ? data[2][i] : data[2];
|
relation = Array.isArray(data[2]) ? data[2][i] : data[2];
|
||||||
if(relation.hasOwnProperty("to")) {
|
if(relation.hasOwnProperty("to")) {
|
||||||
if(relation['to'].class && relation['to'].class.toLowerCase() == "isproducedby") {
|
if(relation['to'].class && relation['to'].class.toLowerCase() == "isproducedby") {
|
||||||
this.resultLandingInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.resultLandingInfo.fundedByProjects, relation, provenanceActionVocabulary);
|
this.resultLandingInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.resultLandingInfo.fundedByProjects, relation);
|
||||||
}
|
}
|
||||||
if(relation['to'].scheme && relation['to'].scheme == "dnet:result_result_relations") {
|
if(relation['to'].scheme && relation['to'].scheme == "dnet:result_result_relations") {
|
||||||
let relationName: string = relation.to.class;
|
let relationName: string = relation.to.class;
|
||||||
if(relation.to.class) {
|
|
||||||
if(relationsVocabulary != null && relation.to.class in relationsVocabulary) {
|
|
||||||
relationName = relationsVocabulary[relation.to.class];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!this.resultLandingInfo.relatedClassFilters.has(relationName)) {
|
if(!this.resultLandingInfo.relatedClassFilters.has(relationName)) {
|
||||||
this.resultLandingInfo.relatedClassFilters.add(relationName);
|
this.resultLandingInfo.relatedClassFilters.add(relationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
let provenanceAction: string = "";
|
let provenanceAction: string = relation.provenanceaction;
|
||||||
if(provenanceActionVocabulary != null && relation.provenanceaction in provenanceActionVocabulary) {
|
|
||||||
provenanceAction = provenanceActionVocabulary[relation.provenanceaction];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.resultLandingInfo.relatedResults = this.parsingFunctions.parseResults(this.resultLandingInfo.relatedResults, relation, provenanceAction, relationName);
|
this.resultLandingInfo.relatedResults = this.parsingFunctions.parseResults(this.resultLandingInfo.relatedResults, relation, provenanceAction, relationName);
|
||||||
} else if(relation['to'].class && relation['to'].class.toLowerCase() == "hasauthorinstitution") {
|
} else if(relation['to'].class && relation['to'].class.toLowerCase() == "hasauthorinstitution") {
|
||||||
|
|
|
@ -59,6 +59,7 @@ export class IndicatorThemesComponent implements OnInit, OnDestroy {
|
||||||
const title = "Monitor | Indicator Themes";
|
const title = "Monitor | Indicator Themes";
|
||||||
this.metaTags(title, description);
|
this.metaTags(title, description);
|
||||||
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
||||||
|
this.breadcrumbs[0].name = (params['stakeholder']?'dashboard':'home');
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
||||||
|
this.breadcrumbs[0].name = (params['stakeholder']?'dashboard':'home');
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,7 @@ export class SeeHowItWorksComponent implements OnInit, OnDestroy {
|
||||||
const title = "Monitor | See how it works";
|
const title = "Monitor | See how it works";
|
||||||
this.metaTags(title, description);
|
this.metaTags(title, description);
|
||||||
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
||||||
|
this.breadcrumbs[0].name = (params['stakeholder']?'dashboard':'home');
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -464,6 +464,7 @@ export class TerminologyComponent implements OnInit, OnDestroy {
|
||||||
const title = "Monitor | Terminology and construction";
|
const title = "Monitor | Terminology and construction";
|
||||||
this.metaTags(title, description);
|
this.metaTags(title, description);
|
||||||
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
|
||||||
|
this.breadcrumbs[0].name = (params['stakeholder']?'dashboard':'home');
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getResultLandingInfo(action: string) {
|
private getResultLandingInfo(action: string) {
|
||||||
this.subscriptions.push(this.resultLandingService.getResultLandingInfo(this.resultId, null, this.type, null, null, null, properties).subscribe(
|
this.subscriptions.push(this.resultLandingService.getResultLandingInfo(this.resultId, null, this.type, null, properties).subscribe(
|
||||||
resultLandingInfo => {
|
resultLandingInfo => {
|
||||||
this.resultLandingInfo = resultLandingInfo;
|
this.resultLandingInfo = resultLandingInfo;
|
||||||
if (this.resultLandingInfo && this.resultLandingInfo.identifiers) {
|
if (this.resultLandingInfo && this.resultLandingInfo.identifiers) {
|
||||||
|
|
|
@ -25,13 +25,13 @@ export class WorkV3_0 {
|
||||||
private static mapType(type: string): string {
|
private static mapType(type: string): string {
|
||||||
if(type == "Annotation") {
|
if(type == "Annotation") {
|
||||||
return "annotation";
|
return "annotation";
|
||||||
} else if(type == "Article") {
|
} else if(type == "Article" || type == "publication") {
|
||||||
return "journal-article";
|
return "journal-article";
|
||||||
} else if(type == "Book") {
|
} else if(type == "Book") {
|
||||||
return "book";
|
return "book";
|
||||||
} else if(type == "Clinical Trial") {
|
} else if(type == "Clinical Trial") {
|
||||||
return "test";
|
return "test";
|
||||||
} else if(type == "Dataset") {
|
} else if(type == "Dataset" || type == "dataset") {
|
||||||
return "data-set";
|
return "data-set";
|
||||||
} else if(type == "Doctoral thesis") {
|
} else if(type == "Doctoral thesis") {
|
||||||
return "dissertation-thesis";
|
return "dissertation-thesis";
|
||||||
|
@ -55,7 +55,7 @@ export class WorkV3_0 {
|
||||||
return "working-paper";
|
return "working-paper";
|
||||||
} else if(type == "Review") {
|
} else if(type == "Review") {
|
||||||
return "book-review";
|
return "book-review";
|
||||||
} else if(type == "Software") {
|
} else if(type == "Software" || type == "software") {
|
||||||
return "software";
|
return "software";
|
||||||
}
|
}
|
||||||
return "other";
|
return "other";
|
||||||
|
@ -121,6 +121,9 @@ export class WorkV3_0 {
|
||||||
}
|
}
|
||||||
// work['type'] = this.mapType(resultLandingInfo.types[0]);
|
// work['type'] = this.mapType(resultLandingInfo.types[0]);
|
||||||
}
|
}
|
||||||
|
if(!work['type']) {
|
||||||
|
work['type'] = this.mapType(resultLandingInfo.resultType);
|
||||||
|
}
|
||||||
|
|
||||||
if(resultLandingInfo.date || resultLandingInfo.dateofacceptance) {
|
if(resultLandingInfo.date || resultLandingInfo.dateofacceptance) {
|
||||||
if(resultLandingInfo.dateofacceptance) {
|
if(resultLandingInfo.dateofacceptance) {
|
||||||
|
|
|
@ -79,9 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="result.description" class="uk-margin-top uk-text-small multi-line-ellipsis lines-3">
|
<div *ngIf="result.description" class="uk-margin-top uk-text-small 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -72,6 +72,13 @@ export class HelperFunctions {
|
||||||
return Object.keys(value).map(key => value[key]);
|
return Object.keys(value).map(key => value[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static getVocabularyLabel(value: any, vocabulary: any) {
|
||||||
|
if(vocabulary && value in vocabulary) {
|
||||||
|
return vocabulary[value];
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
public static sortSDGs(sgd1: string, sdg2: string): number {
|
public static sortSDGs(sgd1: string, sdg2: string): number {
|
||||||
let splitA: string[] = sgd1.split(".");
|
let splitA: string[] = sgd1.split(".");
|
||||||
let numA: number;
|
let numA: number;
|
||||||
|
|
|
@ -200,12 +200,12 @@ export const filters = {
|
||||||
|
|
||||||
export const orcid_add = {
|
export const orcid_add = {
|
||||||
name: 'orcid_add',
|
name: 'orcid_add',
|
||||||
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42.13 40.77"><defs><style>.cls-1{}.cls-2{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="18.09" cy="18.09" r="18.09"/><rect class="cls-2" x="9.86" y="11.03" width="2.49" height="15.27"/><ellipse class="cls-2" cx="11.07" cy="8.16" rx="1.63" ry="1.6"/><path class="cls-2" d="M23.07,11.17A6.57,6.57,0,0,0,21.81,11H15.28V13.2h0V24.09h0v2.15h6.34a7.75,7.75,0,0,0,1.45-.14,7.61,7.61,0,0,0,0-14.93ZM25,23l-.26.19a4.3,4.3,0,0,1-.45.29,4.41,4.41,0,0,1-1.64.62H17.63V13.2h4.42a5.63,5.63,0,0,1,2.62.81,4.12,4.12,0,0,1,.47.38A5.74,5.74,0,0,1,25,23Z"/><path class="cls-1" d="M41.33,34.62H37.57V30.86a.79.79,0,0,0-.79-.79h0a.79.79,0,0,0-.8.78h0v3.76H32.22a.79.79,0,0,0-.79.79h0a.79.79,0,0,0,.79.79H36V40a.8.8,0,1,0,1.59,0h0V36.21h3.76a.79.79,0,0,0,.8-.78h0A.8.8,0,0,0,41.33,34.62Z"/></g></g></svg>'
|
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42.13 40.77"><defs><style>.cls-2{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle cx="18.09" cy="18.09" r="18.09"/><rect class="cls-2" x="9.86" y="11.03" width="2.49" height="15.27"/><ellipse class="cls-2" cx="11.07" cy="8.16" rx="1.63" ry="1.6"/><path class="cls-2" d="M23.07,11.17A6.57,6.57,0,0,0,21.81,11H15.28V13.2h0V24.09h0v2.15h6.34a7.75,7.75,0,0,0,1.45-.14,7.61,7.61,0,0,0,0-14.93ZM25,23l-.26.19a4.3,4.3,0,0,1-.45.29,4.41,4.41,0,0,1-1.64.62H17.63V13.2h4.42a5.63,5.63,0,0,1,2.62.81,4.12,4.12,0,0,1,.47.38A5.74,5.74,0,0,1,25,23Z"/><path d="M41.33,34.62H37.57V30.86a.79.79,0,0,0-.79-.79h0a.79.79,0,0,0-.8.78h0v3.76H32.22a.79.79,0,0,0-.79.79h0a.79.79,0,0,0,.79.79H36V40a.8.8,0,1,0,1.59,0h0V36.21h3.76a.79.79,0,0,0,.8-.78h0A.8.8,0,0,0,41.33,34.62Z"/></g></g></svg>'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const orcid_bin = {
|
export const orcid_bin = {
|
||||||
name: 'orcid_bin',
|
name: 'orcid_bin',
|
||||||
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41.58 41.07"><defs><style>.cls-1{fill:#666;}.cls-2{}.cls-3{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="Layer_2-2" data-name="Layer 2"><g id="Layer_1-2-2" data-name="Layer 1-2"><path class="cls-1" d="M40.55,31.91v7.56A1.58,1.58,0,0,1,39,41.07H34.3a1.59,1.59,0,0,1-1.57-1.6V31.91H32a.25.25,0,0,1-.27-.23v0h0a.28.28,0,0,1,.27-.23h2.32v-1a.25.25,0,0,1,.22-.28h4.22a.3.3,0,0,1,.28.28v1h2.32c.15,0,.22.13.22.28h0c0,.14-.08.18-.22.19Zm-7.23,0v7.56a1,1,0,0,0,1,1H39a1,1,0,0,0,1-1V31.91Zm5.12-.5v-.74H34.82v.74Z"/><path class="cls-1" d="M34.74,33.79a.29.29,0,0,1,.28-.28.29.29,0,0,1,.27.28v4.85a.29.29,0,0,1-.27.28.29.29,0,0,1-.28-.28Z"/><path class="cls-1" d="M38,33.79a.29.29,0,0,1,.28-.28.29.29,0,0,1,.27.28v4.85a.29.29,0,0,1-.27.28.29.29,0,0,1-.28-.28Z"/><path class="cls-1" d="M36.34,33.79a.3.3,0,0,1,.28-.28.28.28,0,0,1,.27.28v4.85a.28.28,0,0,1-.27.28.3.3,0,0,1-.28-.28Z"/><circle class="cls-2" cx="18.09" cy="18.09" r="18.09"/><rect class="cls-3" x="9.86" y="11.03" width="2.49" height="15.27"/><ellipse class="cls-3" cx="11.07" cy="8.16" rx="1.63" ry="1.6"/><path class="cls-3" d="M23.07,11.17A6.7,6.7,0,0,0,21.81,11H15.28v2.2h0V24.09h0v2.15h6.34a7.83,7.83,0,0,0,1.45-.14,7.61,7.61,0,0,0,0-14.93ZM25,23l-.26.19a3.46,3.46,0,0,1-.45.29,4.42,4.42,0,0,1-1.64.62h-5V13.2h4.42a5.63,5.63,0,0,1,2.62.81,3.4,3.4,0,0,1,.47.38,5.75,5.75,0,0,1,.38,8.11A6.14,6.14,0,0,1,25,23Z"/></g></g></g></g></svg>'
|
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41.58 41.07"><defs><style>.cls-3{fill:#fff;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="Layer_2-2" data-name="Layer 2"><g id="Layer_1-2-2" data-name="Layer 1-2"><path d="M40.55,31.91v7.56A1.58,1.58,0,0,1,39,41.07H34.3a1.59,1.59,0,0,1-1.57-1.6V31.91H32a.25.25,0,0,1-.27-.23v0h0a.28.28,0,0,1,.27-.23h2.32v-1a.25.25,0,0,1,.22-.28h4.22a.3.3,0,0,1,.28.28v1h2.32c.15,0,.22.13.22.28h0c0,.14-.08.18-.22.19Zm-7.23,0v7.56a1,1,0,0,0,1,1H39a1,1,0,0,0,1-1V31.91Zm5.12-.5v-.74H34.82v.74Z"/><path d="M34.74,33.79a.29.29,0,0,1,.28-.28.29.29,0,0,1,.27.28v4.85a.29.29,0,0,1-.27.28.29.29,0,0,1-.28-.28Z"/><path d="M38,33.79a.29.29,0,0,1,.28-.28.29.29,0,0,1,.27.28v4.85a.29.29,0,0,1-.27.28.29.29,0,0,1-.28-.28Z"/><path d="M36.34,33.79a.3.3,0,0,1,.28-.28.28.28,0,0,1,.27.28v4.85a.28.28,0,0,1-.27.28.3.3,0,0,1-.28-.28Z"/><circle cx="18.09" cy="18.09" r="18.09"/><rect class="cls-3" x="9.86" y="11.03" width="2.49" height="15.27"/><ellipse class="cls-3" cx="11.07" cy="8.16" rx="1.63" ry="1.6"/><path class="cls-3" d="M23.07,11.17A6.7,6.7,0,0,0,21.81,11H15.28v2.2h0V24.09h0v2.15h6.34a7.83,7.83,0,0,0,1.45-.14,7.61,7.61,0,0,0,0-14.93ZM25,23l-.26.19a3.46,3.46,0,0,1-.45.29,4.42,4.42,0,0,1-1.64.62h-5V13.2h4.42a5.63,5.63,0,0,1,2.62.81,3.4,3.4,0,0,1,.47.38,5.75,5.75,0,0,1,.38,8.11A6.14,6.14,0,0,1,25,23Z"/></g></g></g></g></svg>'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const link = {
|
export const link = {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {properties} from "../../../../environments/environment";
|
||||||
import {Session} from "../../login/utils/helper.class";
|
import {Session} from "../../login/utils/helper.class";
|
||||||
import {Identifier, StringUtils} from "../string-utils.class";
|
import {Identifier, StringUtils} from "../string-utils.class";
|
||||||
import {OpenaireEntities} from "../properties/searchFields";
|
import {OpenaireEntities} from "../properties/searchFields";
|
||||||
|
import {HelperFunctions} from "../HelperFunctions.class";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'result-preview',
|
selector: 'result-preview',
|
||||||
|
@ -33,6 +34,8 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
@Input() showOrcid: boolean = true;
|
@Input() showOrcid: boolean = true;
|
||||||
@Input() showEnermaps: boolean = false;
|
@Input() showEnermaps: boolean = false;
|
||||||
@Input() deposit: boolean = false;
|
@Input() deposit: boolean = false;
|
||||||
|
@Input() provenanceActionVocabulary = null;
|
||||||
|
@Input() relationsVocabulary = null;
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if(this.hasLink) {
|
if(this.hasLink) {
|
||||||
|
@ -119,11 +122,11 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
if(this.result.startYear && this.result.endYear) {
|
if(this.result.startYear && this.result.endYear) {
|
||||||
this.beforeTitle.push(this.result.startYear.toString() + ' - ' + this.result.endYear.toString());
|
this.beforeTitle.push(this.result.startYear.toString() + ' - ' + this.result.endYear.toString());
|
||||||
}
|
}
|
||||||
if(this.result.provenanceAction) {
|
if(this.result.provenanceAction) {
|
||||||
this.beforeTitle.push(this.result.provenanceAction);
|
this.beforeTitle.push(HelperFunctions.getVocabularyLabel(this.result.provenanceAction, this.provenanceActionVocabulary));
|
||||||
}
|
}
|
||||||
if(this.result.relationName) {
|
if(this.result.relationName) {
|
||||||
this.beforeTitle.push(this.result.relationName);
|
this.beforeTitle.push(HelperFunctions.getVocabularyLabel(this.result.relationName, this.relationsVocabulary));
|
||||||
}
|
}
|
||||||
// if(this.result.percentage) {
|
// if(this.result.percentage) {
|
||||||
// this.beforeTitle.push((this.result.relation ? this.result.relation+": " : "") + this.result.percentage.toString() + "%");
|
// this.beforeTitle.push((this.result.relation ? this.result.relation+": " : "") + this.result.percentage.toString() + "%");
|
||||||
|
|
Loading…
Reference in New Issue