Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
236522145c
|
@ -7,21 +7,19 @@ import {properties} from "../../../../../environments/environment";
|
|||
@Component({
|
||||
selector: 'project-title',
|
||||
template: `
|
||||
<ng-container>
|
||||
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove">
|
||||
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}}</span>
|
||||
<span *ngIf="project['name'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['name'] == 'unidentified'">{{project['funderName']}}</span>
|
||||
</a>
|
||||
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}} </span>
|
||||
<span *ngIf="project['name'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['name'] == 'unidentified'">{{project['funderName']}} </span>
|
||||
</a>
|
||||
</p>
|
||||
</h6>
|
||||
</ng-container>
|
||||
<span *ngIf="project['funderName'] && project['code'] != 'unidentified'" class="uk-margin-small-top">
|
||||
<span *ngIf="project['funderName'] && project['name'] != 'unidentified'" class="uk-margin-small-top">
|
||||
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||
</span>
|
||||
`
|
||||
|
@ -40,5 +38,6 @@ export class ProjectTitleFormatter {
|
|||
|
||||
ngOnInit() {
|
||||
this.url = this.searchLink + "?projectId=" + this.project["openaireId"];
|
||||
console.log(this.project)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)"
|
||||
(disableSelectEmitter)="disableSelectChange($event)"
|
||||
[onChangeNavigate]="false"></entities-selection>
|
||||
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true"
|
||||
<div input #input class="uk-width-expand" placeholder="Scholarly works" [searchable]="true"
|
||||
[hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||
</advanced-search-input>
|
||||
</div>
|
||||
|
|
|
@ -598,7 +598,8 @@ export class ParsingFunctions {
|
|||
if (pid.hasOwnProperty("classid") && pid['classid'] != "") {
|
||||
if (pid.classid == "doi" || pid.classid == "pmc" || pid.classid == "handle" || pid.classid == "pmid" || pid.classid == "re3data"
|
||||
|| pid.classid == "swhid"
|
||||
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef") {
|
||||
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef"
|
||||
|| pid.classid == "RRID") {
|
||||
if (!identifiers.has(pid.classid)) {
|
||||
identifiers.set(pid.classid, new Array<string>());
|
||||
}
|
||||
|
@ -608,7 +609,8 @@ export class ParsingFunctions {
|
|||
for (let i = 0; i < pid.length; i++) {
|
||||
if (pid[i].classid == "doi" || pid[i].classid == "pmc" || pid[i].classid == "handle" || pid[i].classid == "pmid" || pid[i].classid == "re3data"
|
||||
|| pid[i].classid == "swhid"
|
||||
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef") {
|
||||
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef"
|
||||
|| pid[i].classid == "RRID") {
|
||||
if (!identifiers.has(pid[i].classid)) {
|
||||
identifiers.set(pid[i].classid, new Array<string>());
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import {properties} from "../../../../environments/environment";
|
|||
<span [class.uk-margin-small-left]="modal">
|
||||
<ng-container *ngFor="let item of identifiers.get(key) let j=index">
|
||||
<a *ngIf="key == 'doi' || key == 'pmc' || key == 'pmid' || key == 'handle' || key == 're3data' || key == 'swhid'
|
||||
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef'"
|
||||
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef' || key == 'RRID'"
|
||||
[href]="getUrl(key, item) + item" target="_blank" class="uk-display-inline-block custom-external">
|
||||
{{item}}
|
||||
</a>
|
||||
|
@ -138,6 +138,8 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
return properties.wikiDataURL;
|
||||
} else if(key == "FundRef") {
|
||||
return properties.fundRefURL;
|
||||
} else if(key == "RRID") {
|
||||
return properties.rridURL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ export interface EnvProperties {
|
|||
isniURL?: string;
|
||||
wikiDataURL?: string;
|
||||
fundRefURL?: string;
|
||||
rridURL?: string;
|
||||
fairSharingURL?: string,
|
||||
openScienceCloudURL?: string,
|
||||
eoscMarketplaceURL?: string,
|
||||
|
|
|
@ -24,6 +24,7 @@ export let common: EnvProperties = {
|
|||
isniURL: "https://isni.org/isni/",
|
||||
wikiDataURL: "https://www.wikidata.org/wiki/",
|
||||
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
|
||||
rridURL: "https://scicrunch.org/resolver/",
|
||||
fairSharingURL: "https://fairsharing.org/",
|
||||
openScienceCloudURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
|
||||
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
||||
|
|
|
@ -150,7 +150,7 @@ export class DOI {
|
|||
}
|
||||
|
||||
export class Identifier {
|
||||
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" = null;
|
||||
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" | "RRID" = null;
|
||||
id: string;
|
||||
|
||||
public static getDOIsFromString(str: string): string[] {
|
||||
|
@ -213,13 +213,15 @@ export class Identifier {
|
|||
return {"class": "wikidata", "id": pid};
|
||||
} else if (Identifier.isValidIsni(pid)) {
|
||||
return {"class": "isni", "id": pid};
|
||||
} else if(Identifier.isValidRrid(pid)) {
|
||||
return {"class": "RRID", "id": pid};
|
||||
}
|
||||
//set it as a doi, to catch the case that doi has not valid format
|
||||
return (strict?null:{"class": "doi", "id": pid});
|
||||
}
|
||||
|
||||
public static getPIDFromIdentifiers(identifiers: Map<string, string[]>): Identifier {
|
||||
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni"];
|
||||
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni", "rrid"];
|
||||
if(identifiers && identifiers.size > 0) {
|
||||
for (let cl of classes) {
|
||||
if (identifiers.get(cl)) {
|
||||
|
@ -303,6 +305,10 @@ export class Identifier {
|
|||
return str.match(exp) != null;
|
||||
}
|
||||
|
||||
public static isValidRrid(str: string): boolean {
|
||||
let exp = /^RRID:.*$/g;
|
||||
return str.match(exp) != null;
|
||||
}
|
||||
}
|
||||
|
||||
export class StringUtils {
|
||||
|
|
Loading…
Reference in New Issue