diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c8ffed44..8b3cb8c4 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -46,7 +46,7 @@ import 'rxjs/Rx';
  • Search (current)
  • Claims
  • Linking
  • -
  • Home
  • +
  • My claims
  • diff --git a/src/app/claimPages/inlineClaimContext/inlineClaimContext.component.ts b/src/app/claimPages/inlineClaimContext/inlineClaimContext.component.ts index 38672061..971b1207 100644 --- a/src/app/claimPages/inlineClaimContext/inlineClaimContext.component.ts +++ b/src/app/claimPages/inlineClaimContext/inlineClaimContext.component.ts @@ -64,7 +64,7 @@ import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component publications; datasets; private show = 'context'; - private showComp:string = 'false'; + private showComp:string = 'true'; private enableButton:boolean=true; keyword: string = ""; diff --git a/src/app/claimPages/linking/selected/selected.component.ts b/src/app/claimPages/linking/selected/selected.component.ts index f76cdfcd..af05343d 100644 --- a/src/app/claimPages/linking/selected/selected.component.ts +++ b/src/app/claimPages/linking/selected/selected.component.ts @@ -18,7 +18,7 @@ import {Component, Input,Output, EventEmitter} from '@angular/core';
    {{inlineEntity[0].title}} {{inlineEntity[0].title}} - {{inlineEntity[0].funderName}} | {{inlineEntity[0].projectName}} {{(inlineEntity[0].projectAcronym)?'('+inlineEntity[0].projectAcronym+')':''}} + {{inlineEntity[0].funderName}} | {{(inlineEntity[0].projectAcronym)?inlineEntity[0].projectAcronym: inlineEntity[0].projectName}}
    Link to
    --> diff --git a/src/app/landingPages/publication/publication.component.ts b/src/app/landingPages/publication/publication.component.ts index 4552c46a..938639f1 100644 --- a/src/app/landingPages/publication/publication.component.ts +++ b/src/app/landingPages/publication/publication.component.ts @@ -11,15 +11,18 @@ import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/ //directives: [...ROUTER_DIRECTIVES], template: ` -
    +
    -
    -

    {{publicationInfo.title}}

    -
    -
    +
    +

    {{publicationInfo.title}}

    + + - +
    + +
    -
    +
    @@ -219,10 +234,10 @@ import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/
    -
    + `, providers:[JSONP_PROVIDERS, PublicationService], directives:[InlineClaimContextComponent, InlineClaimProjectComponent] @@ -247,17 +262,32 @@ export class PublicationComponent { @ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ; @ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ; + public warningMessage = ""; + public errorMessage = ""; getPublicationInfo() { - this._publicationService.getPublicationInfo(this.params.get("articleId")).subscribe( - data => { - this.publicationInfo = data; - this.result = [] - let result_ ={id: this.params.get("articleId"), type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''}; - this.result.push(result_); - }, - err => console.error(err) - ); + this.warningMessage = ''; + this.errorMessage="" + if(this.params.get("articleId")==null || this.params.get("articleId")==''){ + this.warningMessage="No valid publication id"; + console.info("novalid"); + }else{ +console.info("do request"); + this._publicationService.getPublicationInfo(this.params.get("articleId")).subscribe( + data => { + this.publicationInfo = data; + this.result = [] + let result_ ={id: this.params.get("articleId"), type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''}; + this.result.push(result_); + }, + err => { + console.error(err) + console.info("error"); + + this.errorMessage = 'No publication found'; + } + ); + } } /* @@ -280,6 +310,7 @@ export class PublicationComponent { this.publicationInfo.fundedByProjects.get(project.projectId)[1] = project.projectName; this.publicationInfo.fundedByProjects.get(project.projectId)[2] =project.selectedFunderId; this.publicationInfo.fundedByProjects.get(project.projectId)[3] = project.selectedFunderName; + this.publicationInfo.fundedByProjects.get(project.projectId)[5] = "new"; } } }