more pages in pub landing page - inline claiming
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@43110 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
3ea5df83cb
commit
5baa174165
|
@ -46,7 +46,7 @@ import 'rxjs/Rx';
|
|||
<li class="active"><a [routerLink]=" ['/Search']" >Search <span class="sr-only">(current)</span></a></li>
|
||||
<li><a [routerLink]=" ['/Claims']">Claims</a></li>
|
||||
<li><a [routerLink]=" ['/Linking']">Linking</a></li>
|
||||
<li><a [routerLink]=" ['/Home']">Home</a></li>
|
||||
<!-- <li><a [routerLink]=" ['/Home']">Home</a></li>-->
|
||||
<li><a [routerLink]=" ['/MyClaims']">My claims</a></li>
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -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 = "";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import {Component, Input,Output, EventEmitter} from '@angular/core';
|
|||
<div *ngIf=" inlineType == 'project' " class="project" >
|
||||
<a *ngIf="inlineEntity[0].url" target="_blank" href="{{inlineEntity[0].url}}" >{{inlineEntity[0].title}}</a>
|
||||
<span *ngIf="!inlineEntity[0].url" >{{inlineEntity[0].title}}</span>
|
||||
<span >{{inlineEntity[0].funderName}} | {{inlineEntity[0].projectName}} {{(inlineEntity[0].projectAcronym)?'('+inlineEntity[0].projectAcronym+')':''}}</span>
|
||||
<span >{{inlineEntity[0].funderName}} | {{(inlineEntity[0].projectAcronym)?inlineEntity[0].projectAcronym: inlineEntity[0].projectName}}</span>
|
||||
</div>
|
||||
<div>Link to </div>
|
||||
</div> -->
|
||||
|
|
|
@ -11,15 +11,18 @@ import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/
|
|||
//directives: [...ROUTER_DIRECTIVES],
|
||||
template: `
|
||||
|
||||
<div *ngIf="publicationInfo != null">
|
||||
<div >
|
||||
|
||||
<div class="container publication">
|
||||
<div class="container-header">
|
||||
<h2>{{publicationInfo.title}}</h2>
|
||||
</div>
|
||||
<div class="row row-offcanvas row-offcanvas-right">
|
||||
<div class="container-header" >
|
||||
<h2 *ngIf="publicationInfo != null" >{{publicationInfo.title}}</h2 >
|
||||
<div *ngIf="warningMessage.length > 0" class="alert alert-warning" role="alert">{{warningMessage}}</div>
|
||||
<div *ngIf="errorMessage.length > 0" class="alert alert-danger" role="alert">{{errorMessage}}</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-9 sidebar-offcanvas">
|
||||
</div>
|
||||
<div class="row row-offcanvas row-offcanvas-right" >
|
||||
|
||||
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" *ngIf="publicationInfo != null">
|
||||
<p>
|
||||
{{publicationInfo.authors}} ({{publicationInfo.date}})
|
||||
</p>
|
||||
|
@ -171,7 +174,7 @@ import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="col-xs-12 col-sm-3" *ngIf="publicationInfo != null">
|
||||
|
||||
<ul class="list-group mainFunctionsBlock">
|
||||
<li class="list-group-item">
|
||||
|
@ -200,17 +203,29 @@ import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/
|
|||
<dl class="functionsSection" *ngIf="publicationInfo.fundedByProjects != undefined">
|
||||
<dt class="title">Funded By</dt>
|
||||
<dd class="line" *ngFor="let key of publicationInfo.fundedByProjects.values()">
|
||||
<a href="{{publicationInfo.fundedByProjects.get(key)}}">
|
||||
{{key}}
|
||||
</a>
|
||||
<a *ngIf="!key[5]" href="{{publicationInfo.fundedByProjects.get(key)}}">
|
||||
{{key[0]?key[0]:key[1]}} | {{ (key[4])?key[4]:key[3]}} </a>
|
||||
|
||||
<a *ngIf="key[5]" href="{{publicationInfo.fundedByProjects.get(key)}}">
|
||||
<mark>{{((key[0])?key[0]:key[1])}} | {{ ((key[4])?key[4]:key[3])}} </mark> </a>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<button (click)="toggleClaimProject()" class = "btn btn-default btn-xs" >Add more Projects</button>
|
||||
<inline-claim-project *ngIf="result " inline="true" inlineType ="publication" [inlineEntity]="result" (projectAdded)="projectAdded($event)" ></inline-claim-project>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<dl class="functionsSection" *ngIf="publicationInfo.fundedByProjects != undefined">
|
||||
<dt class="title">Related to </dt>
|
||||
<dd class="line" >
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<button (click)=" toggleClaimContext()" class = "btn btn-default btn-xs" >Add Contexts</button>
|
||||
<inline-claim-context *ngIf="result " inline="true" inlineType ="publication" [inlineEntity]="result" ></inline-claim-context>
|
||||
<inline-claim-context inline="true" inlineType ="publication" [inlineEntity]="result" ></inline-claim-context>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -219,10 +234,10 @@ import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
`,
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue