Project

General

Profile

« Previous | Next » 

Revision 59237

[Library|Trunk]

- revome extra headers in CustomOptions (services fail with it)

-Claims: set properly the type of openaire results in claims search results

View differences:

claimResultSearchForm.component.ts
313 313
        if(data[2] && data[2].length > 0){
314 314
          this.openaireResultsfilters =  this.checkSelectedFilters(data[2], this.openaireResultsPrevFilters)
315 315
        }
316
        this.openaireResults = ClaimResultSearchFormComponent.openaire2ClaimResults(data[1], type, this.properties);
316
        this.openaireResults = ClaimResultSearchFormComponent.openaire2ClaimResults(data[1], this.properties);
317 317
        this.openaireResultsStatus = this.errorCodes.DONE;
318 318
        if (this.openaireResultsNum == 0) {
319 319
          this.openaireResultsStatus = this.errorCodes.NONE;
......
630 630

  
631 631
  }
632 632

  
633
  public static openaire2ClaimResults(data, type, properties): ClaimEntity[] {
633
  public static openaire2ClaimResults(data, properties): ClaimEntity[] {
634 634
    const claimResults = [];
635 635
    for (let i = 0; i < data.length; i++) {
636 636
      let item = data[i];
......
642 642
      entity.id = item.id;
643 643
      entity.title = item.title.name;
644 644
      let prefixUrl = "";
645
      if(type == "publication"){
645
      if(item.entityType == "publication"){
646 646
        prefixUrl = properties.searchLinkToPublication;
647
      }else if(type == "dataset"){
647
      }else if(item.entityType == "dataset"){
648 648
        prefixUrl = properties.searchLinkToDataset;
649
      }else if(type == "software"){
649
      }else if(item.entityType == "software"){
650 650
        prefixUrl = properties.searchLinkToSoftwareLanding;
651
      }else if(type == "other"){
651
      }else if(item.entityType == "other"){
652 652
        prefixUrl = properties.searchLinkToOrp;
653 653
      }
654 654
      entity.result.url = prefixUrl + entity.id;
......
656 656
      entity.result.date = (item.year && item.year != "") ? item.year : null;
657 657
      entity.result.accessRights = (item.title && item.title.accessMode) ? String(item.title.accessMode) : "";
658 658

  
659
      entity.type = type;
659
      entity.type = item.entityType;
660 660
      entity.result.embargoEndDate = (item.embargoEndDate && item.embargoEndDate != "") ? item.embargoEndDate : entity.result.embargoEndDate;
661 661
      if (item.publisher && item.publisher.length > 0) {
662 662
        entity.result.publisher = item.publisher;

Also available in: Unified diff