[develop | DONE | CHANGED] Claims: keep both shortname and funderName, in cards show fundername. For unidentified, hide code and link
This commit is contained in:
parent
474a73e2f7
commit
68125b3577
|
@ -28,6 +28,7 @@ export class ClaimResult {
|
||||||
|
|
||||||
export class ClaimProject {
|
export class ClaimProject {
|
||||||
public funderId: string;
|
public funderId: string;
|
||||||
|
public funderShortname: string;
|
||||||
public funderName: string;
|
public funderName: string;
|
||||||
public acronym: string;
|
public acronym: string;
|
||||||
public startDate: string;
|
public startDate: string;
|
||||||
|
|
|
@ -178,9 +178,10 @@ export class ClaimProjectsSearchFormComponent {
|
||||||
const entity: ClaimEntity = new ClaimEntity();
|
const entity: ClaimEntity = new ClaimEntity();
|
||||||
entity.project = new ClaimProject();
|
entity.project = new ClaimProject();
|
||||||
entity.project.funderId = item.funderId;
|
entity.project.funderId = item.funderId;
|
||||||
entity.project.funderName = item.funderShortname;
|
entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId.split("::")[1]);
|
||||||
|
entity.project.funderName = item.funderName;
|
||||||
entity.id = item.id;
|
entity.id = item.id;
|
||||||
entity.project.url = properties.searchLinkToProject + entity.id;
|
entity.project.url = (item.code !="unidentified") ? properties.searchLinkToProject + entity.id : null;
|
||||||
entity.title = item.title.name;
|
entity.title = item.title.name;
|
||||||
entity.project.acronym = item.acronym;
|
entity.project.acronym = item.acronym;
|
||||||
entity.project.startDate = item.startYear;
|
entity.project.startDate = item.startYear;
|
||||||
|
|
|
@ -156,6 +156,7 @@ export class DirectLinkingComponent {
|
||||||
entity.project.code = project.code;
|
entity.project.code = project.code;
|
||||||
entity.project.endDate = project.endDate;
|
entity.project.endDate = project.endDate;
|
||||||
entity.project.funderId = project.funderId;
|
entity.project.funderId = project.funderId;
|
||||||
|
entity.project.funderShortname = project.funderShortName?project.funderShortName:(entity.project.funderId.split("::")[1]);
|
||||||
entity.project.funderName = project.funderName;
|
entity.project.funderName = project.funderName;
|
||||||
entity.project.fundingLevel0 = project.fundingLevel0;
|
entity.project.fundingLevel0 = project.fundingLevel0;
|
||||||
entity.project.jurisdiction = project.jurisdiction;
|
entity.project.jurisdiction = project.jurisdiction;
|
||||||
|
|
|
@ -508,7 +508,7 @@ export class ClaimInsertComponent {
|
||||||
entity["linksToProjects"] = [];
|
entity["linksToProjects"] = [];
|
||||||
}
|
}
|
||||||
let project: ClaimEntity = results[i];
|
let project: ClaimEntity = results[i];
|
||||||
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderName + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
|
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderShortname + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
|
||||||
|
|
||||||
} else if (results[i].context) {
|
} else if (results[i].context) {
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'10px':'20px'"
|
<div class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'10px':'20px'"
|
||||||
[class.uk-margin-small-top]="!shortVersion">
|
[class.uk-margin-small-top]="!shortVersion">
|
||||||
<div *ngIf="entity.project.funderName">
|
<div *ngIf="entity.project.funderName || entity.project.funderShortname">
|
||||||
<span class="uk-text-meta">Funder: </span>{{entity.project.funderName}}
|
<span class="uk-text-meta">Funder: </span>{{entity.project.funderName?entity.project.funderName:entity.project.funderShortname}}
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="entity.project.code">
|
<div *ngIf="entity.project.code && entity.project.code!='unidentified'">
|
||||||
<span class="uk-text-meta">Project Code: </span>{{entity.project.code}}
|
<span class="uk-text-meta">Project Code: </span>{{entity.project.code}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,7 +70,7 @@ export class RefineResultsUtils {
|
||||||
}
|
}
|
||||||
public static inParenthesisThePartAfterCharacters(field, characters):string {
|
public static inParenthesisThePartAfterCharacters(field, characters):string {
|
||||||
if( field.name.indexOf(characters) !=-1){
|
if( field.name.indexOf(characters) !=-1){
|
||||||
return field.name.split(characters)[0]+" ("+field.name.split(characters)[1]+")";
|
return field.name.split(characters)[0]+ (field.name.split(characters)[1]?(" ("+field.name.split(characters)[1]+")"):"");
|
||||||
|
|
||||||
}
|
}
|
||||||
return field.name;
|
return field.name;
|
||||||
|
|
|
@ -237,7 +237,8 @@ private fetch (link,id,oafEntityType,type, properties:EnvProperties ){
|
||||||
|
|
||||||
if(resData['fundingtree'] && resData['fundingtree']['funder']){
|
if(resData['fundingtree'] && resData['fundingtree']['funder']){
|
||||||
value.funderId = (resData['fundingtree']['funder']['id'] )?resData['fundingtree']['funder']['id']:"";
|
value.funderId = (resData['fundingtree']['funder']['id'] )?resData['fundingtree']['funder']['id']:"";
|
||||||
value.funderName = (resData['fundingtree']['funder']['shortname'] )?resData['fundingtree']['funder']['shortname']:"";
|
value.funderName = (resData['fundingtree']['funder']['name'] )?resData['fundingtree']['funder']['name']:"";
|
||||||
|
value.funderShortName = (resData['fundingtree']['funder']['shortname'] )?resData['fundingtree']['funder']['shortname']:"";
|
||||||
value.jurisdiction = (resData['fundingtree']['funder']['jurisdiction'] )?resData['fundingtree']['funder']['jurisdiction']:"";
|
value.jurisdiction = (resData['fundingtree']['funder']['jurisdiction'] )?resData['fundingtree']['funder']['jurisdiction']:"";
|
||||||
if(resData['fundingtree']['funding_level_2']){
|
if(resData['fundingtree']['funding_level_2']){
|
||||||
value.fundingLevel0 = (resData['fundingtree']['funding_level_2'] && resData['fundingtree']['funding_level_2']['parent'] &&
|
value.fundingLevel0 = (resData['fundingtree']['funding_level_2'] && resData['fundingtree']['funding_level_2']['parent'] &&
|
||||||
|
|
Loading…
Reference in New Issue