first draft for inline linking in publication landing page--- layout changes in publication landing page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@43099 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2016-07-01 15:04:58 +00:00
parent eaa535e2a2
commit 1a04444e54
11 changed files with 667 additions and 280 deletions

View File

@ -8,7 +8,6 @@ import {HomeComponent} from './home/home.component';
import {LinkingComponent} from './claimPages/linking/linking.component';
import {LinkingHomeComponent} from './claimPages/linking/linkingHome.component';
import {MyClaimsComponent} from './claimPages/myClaims/myClaims.component';
import {ProjectComponent} from './landingPages/project/project.component';
import {PublicationComponent} from './landingPages/publication/publication.component';
@ -66,11 +65,9 @@ import 'rxjs/Rx';
@RouteConfig([
{ path: '/', component: HomeComponent, name: 'Home', useAsDefault: true },
{ path: '/home', component: HomeComponent, name: 'Home' },
// { path: '/demo', component: Demo, name: 'Demo' },
{ path: '/claims', component: ClaimsAdminComponent, name: 'Claims' },
{ path: '/claim', component: ClaimComponent, name: 'Claim' },
{ path: '/search', component: SearchComponent, name: 'Search' },
// { path: '/upload', component: BasicProgressbar, name: 'Upload' },
{ path: '/linking', component: LinkingComponent, name: 'Linking' },
{ path: '/my-claims', component: MyClaimsComponent, name: 'MyClaims' },
{ path: '/project', component: ProjectComponent, name: 'Project' },

View File

@ -11,9 +11,7 @@
<button class="btn btn-default" type = "submit" (click)="goTo()">Fetch</button>
</form>
-->
<!--<div class="col-md-4">
<input type="text" #listFilter (keyup)="0" />
</div>-->
<!-- KI-->
<div class="row row-offcanvas row-offcanvas-right">
@ -70,6 +68,7 @@
</div>
<button class="btn btn-default" (click)="selectAll()">Select All</button> <button class="btn btn-default" (click)="deselectAll()">Deselect All</button> <button class="btn btn-default" (click)="confirmOpen()">Delete</button>
</div>
<input type="text" #listFilter (keyup)="0" />
<div *ngIf=" claims && claims.length == 0" class = "alert alert-info " >No entries found.</div>
@ -89,14 +88,11 @@
</tr>
</thead>
<tbody>
<!--<tr *ngFor="let claim of claims | claimTextFilter:textFilter | claimTypeFilter:publicationCB:datasetCB:projectCB:contextCB " >-->
<tr *ngFor="let claim of claims " >
<tr *ngFor="let claim of claims " >
<td *ngIf="enableDelete"><input [id]="claim.id" type="checkbox" (click)="select(claim,$event)" [ngModel]="selectAllClaims"/></td>
<!--<td><a (click)="goToClaim((claim.id))">{{claim.id}}</a></td>
<!--<td>{{claim.targetType}}</td> -->
<td><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
<!-- <td>{{claim.sourceType}}</td> -->
<td><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
<td><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
<td>{{claim.userMail}}</td>
<td>{{claim.date}}</td>
</tr>

View File

@ -0,0 +1,112 @@
import {Component, Input} from '@angular/core';
import {JSONP_PROVIDERS} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import { RouteParams, RouteConfig, ROUTER_DIRECTIVES, Router } from '@angular/router-deprecated';
import {ClaimContextComponent} from '../linking/claimContext/claimContext.component';
import {ClaimSelectedComponent} from '../linking/selected/selected.component';
import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component';
@Component({
selector: 'inline-claim-context',
directives: [ROUTER_DIRECTIVES, ClaimContextComponent, ClaimSelectedComponent, ClaimInsertComponent],
template: `
<div class="panel-body" >
<h6>Find Context:</h6>
<div *ngIf=" show == 'context' " class="row" >
<claim-contexts [selectedList]="contexts" (contextsChange)="contextsChange($event)" > </claim-contexts>
<claim-selected [contexts]="contexts"
(contextsChange)="contextsChange($event)"
(showChange)="showChange($event)" [inlineEntity]="inlineEntity" inline="true" [inlineType]="inlineType" > </claim-selected>
</div>
<div *ngIf=" show == 'claim'" >
<claim-selected [contexts]="contexts" [inlineEntity]="inlineEntity" inline="true" [inlineType]="inlineType" > </claim-selected>
<claim-insert (showChange)="showChange($event)" inline="true" [contexts]="contexts" [publications]="publications" [datasets]="datasets" ></claim-insert>
</div>
<nav>
<ul class="pager">
<li *ngIf="show != 'context'" class="previous" (click)="prev()"><a ><span aria-hidden="true">&larr;</span> Previous</a></li>
<li class="next" *ngIf="show != 'claim'" (click)="next()" ><a >Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
</div>
<!-- <h3>Find Context</h3>
<div *ngIf="show=='context'" >
<claim-contexts [selectedList]="contexts" (contextsChange)="contextsChange($event)" > </claim-contexts>
<h3>Link to</h3>
<claim-selected [contexts]="contexts"
(contextsChange)="contextsChange($event)"
(showChange)="showChange($event)" [inlineEntity]="inlineEntity" inline="true" [inlineType]="inlineType" > </claim-selected>
<button (click)="claim()" class="btn btn-primary" style="float:right">Finish</button>
</div>
<div *ngIf="show=='claim'" >
<claim-insert showAccessRights="true" [contexts]="contexts" [publications]="publications" [datasets]="datasets" ></claim-insert>
</div>-->
`
})
export class InlineClaimContextComponent {
constructor ( private _router: Router ) {
}
@Input() public inlineEntity:any;
@Input() public inlineType:string;
contexts=[];
publications;
datasets;
show = "context";
keyword: string = "";
ngOnInit() {
}
next(){
if(this.inlineType === 'dataset'){
this.datasets = [];
this.datasets.push(this.inlineEntity[0]);
}else if(this.inlineType === 'publication'){
this.publications = [];
this.publications.push(this.inlineEntity[0]);
console.info(" result: :targetId: " +this.publications[0].id + "targetType :"+ this.publications[0].type+" targetCollectedFrom:"+ this.publications[0].source+ "targetAccessRights :"+this.publications[0].accessRights+ " targetEmbargoEndDate:"+this.publications[0].embargoEndDate);
}
if( this.show == 'context'){
this.show='claim';
}
}
prev(){
if(this.show == 'claim'){
this.show = 'context';
}
}
contextsChange($event) {
this.contexts=$event.value;
console.log($event.value);
}
showChange($event) {
this.show=$event.value;
if(this.show == "end"){
this.contexts = [];
this.show = "context";
}
}
}

View File

@ -0,0 +1,159 @@
import {Component, Input, ViewChild, Output, EventEmitter} from '@angular/core';
import {JSONP_PROVIDERS} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import { RouteParams, RouteConfig, ROUTER_DIRECTIVES, Router } from '@angular/router-deprecated';
import {ClaimProjectsComponent} from '../linking/claimProject/claimProject.component';
import {ClaimSelectedComponent} from '../linking/selected/selected.component';
import {ClaimInsertComponent} from '../linking/insertClaim/insertClaim.component';
@Component({
selector: 'inline-claim-project',
directives: [ROUTER_DIRECTIVES, ClaimProjectsComponent, ClaimSelectedComponent, ClaimInsertComponent],
template: `
<div *ngIf="showComp" class="panel-body well well-lg">
<h6>Search for Projects:</h6>
<div class="row" >
<claim-projects [selectedProjects]="projects" (projectsChange)="projectsChange($event)" inline="true" > </claim-projects>
<claim-selected [projects]="projects"
(projectsChange)="projectsChange($event)"
(showChange)="showChange($event)" [inlineEntity]="inlineEntity" inline="true" [inlineType]="inlineType" > </claim-selected>
</div>
<claim-insert (showChange)="showChange($event)" inline="true" [projects]="projects" [publications]="publications" [datasets]="datasets" showButtton="false" ></claim-insert>
<button (click)="insert()" [class]="(enableButton)?'btn btn-primary':'btn btn-primary disabled'" style="float:right">Finish </button>
<button (click)="cancel()" [class]="(enableButton)?'btn ':'btn disabled'" style="float:left">Cancel </button>
<!-- <div *ngIf=" show == 'claim'" >
<claim-selected [projects]="projects" [inlineEntity]="inlineEntity" inline="true" [inlineType]="inlineType" > </claim-selected>
<claim-insert (showChange)="showChange($event)" inline="true" [projects]="projects" [publications]="publications" [datasets]="datasets" showButtton="false" ></claim-insert>
</div>
<nav>
<ul class="pager">
<li *ngIf="show != 'context'" class="previous" (click)="prev()"><a ><span aria-hidden="true">&larr;</span> Previous</a></li>
<li class="next" *ngIf="show != 'claim'" (click)="next()" ><a >Next <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
-->
</div>
<!-- <h3>Find Context</h3>
<div *ngIf="show=='context'" >
<claim-projects [selectedList]="contexts" (contextsChange)="contextsChange($event)" > </claim-contexts>
<h3>Link to</h3>
<claim-selected [contexts]="contexts"
(contextsChange)="contextsChange($event)"
(showChange)="showChange($event)" [inlineEntity]="inlineEntity" inline="true" [inlineType]="inlineType" > </claim-selected>
<button (click)="claim()" class="btn btn-primary" style="float:right">Finish</button>
</div>
<div *ngIf="show=='claim'" >
<claim-insert showAccessRights="true" [contexts]="contexts" [publications]="publications" [datasets]="datasets" ></claim-insert>
</div>-->
`
})
export class InlineClaimProjectComponent {
constructor ( private _router: Router ) {
}
@Input() public inlineEntity:any;
@Input() public inlineType:string;
projects=[];
publications;
datasets;
private show = 'project';
private showComp:boolean = false;
private enableButton:boolean=true;
keyword: string = "";
@Output() projectAdded = new EventEmitter();
@ViewChild (ClaimInsertComponent) claimInsert : ClaimInsertComponent ;
ngOnInit() {
}
next(){
if(this.inlineType === 'dataset'){
this.datasets = [];
this.datasets.push(this.inlineEntity[0]);
}else if(this.inlineType === 'publication'){
this.publications = [];
this.publications.push(this.inlineEntity[0]);
console.info(" result: :targetId: " +this.publications[0].id + "targetType :"+ this.publications[0].type+" targetCollectedFrom:"+ this.publications[0].source+ "targetAccessRights :"+this.publications[0].accessRights+ " targetEmbargoEndDate:"+this.publications[0].embargoEndDate);
}
if( this.show == 'context'){
this.show='claim';
}
}
prev(){
if(this.show == 'claim'){
this.show = 'context';
}
}
projectsChange($event) {
this.projects=$event.value;
console.log($event.value);
}
showChange($event) {
this.show=$event.value;
if(this.show == "end"){
//TODO
this.projectAdded.emit({
value: this.projects
});
this.projects = [];
this.hideComponent();
}else if(this.show == "error"){
this.showComponent();
}
}
public toggle(){
console.info("TOOGLE pr ");
if(!this.showComp){
console.info("TOOGLE show ");
this.showComponent();
}else{
console.info("TOOGLE hide ");
this.hideComponent();
}
}
private showComponent(){
this.showComp=true;
this.enableButton = true;
}
private hideComponent(){
this.showComp=false;
}
private insert(){
this.claimInsert.publications = [];
this.claimInsert.publications.push(this.inlineEntity[0]);
this.publications = [];
this.publications.push(this.inlineEntity[0]);
console.info(" result: :targetId: " +this.publications[0].id + "targetType :"+ this.publications[0].type+" targetCollectedFrom:"+ this.publications[0].source+ "targetAccessRights :"+this.publications[0].accessRights+ " targetEmbargoEndDate:"+this.publications[0].embargoEndDate);
this.enableButton = false;
this.claimInsert.insert();
}
private cancel(){
this.projects = [];
this.hideComponent();
}
}

View File

@ -16,8 +16,8 @@ import {Loading} from '../../../common/modal/loading.component';
</select> -->
<form>
<div class="input-group">
<div class="input-group-btn">
<div [class]="(inline =='false')?'input-group':''">
<div [class]="(inline =='false')?'input-group-btn':''" >
<button type="button" class="btn btn-info dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
{{selectedFunderName}}
</button>
@ -28,7 +28,7 @@ import {Loading} from '../../../common/modal/loading.component';
</ul>
</div><!-- (keyup)=filter() *ngIf="selectedFunderId != '0'" -->
<input id="community" type="text" class="form-control" placeholder="Search for Projects" [(ngModel)]=query >
<span class="input-group-btn">
<span [class]="(inline =='false')?'input-group-btn':''" >
<button type="submit" (click)="filter()" class="btn btn-default">Search</button>
</span>
</div>
@ -67,6 +67,7 @@ export class ClaimProjectsComponent {
this.getFunders();
}
@Input() public inline= 'false' ; // for claimed started from landing pages
public query = '';
public filteredList = [];
@Input() public selectedProjects=[] ;
@ -82,7 +83,7 @@ public projects:string[];
public warningMessage = "";
public infoMessage = "";
@ViewChild (Loading) loading : Loading ;
// @ViewChild (Loading) loading : Loading ;
constructor(private _projectService: OpenaireProjectsService,myElement: ElementRef) {
@ -100,16 +101,16 @@ filter() {
}else{
this.warningMessage = "";
this.infoMessage = "";
this.loading.open();
// this.loading.open();
this._projectService.searchForProjects(this.query, this.selectedFunderId).subscribe(
data => {
this.filteredList =(data == null)?[]:data;
this.infoMessage = (data == null)?"No Results found":"";
this.loading.close();
// this.loading.close();
},
err => {
console.error(err);
this.loading.close();
// this.loading.close();
this.warningMessage = "An error occured";
}

View File

@ -12,7 +12,7 @@ import {Loading} from '../../../common/modal/loading.component';
directives: [...ROUTER_DIRECTIVES, Loading],
template: `
<button *ngIf="claiming == false" (click)="insert()" class="btn btn-primary" style="float:right">Finish</button>
<button *ngIf="claiming == false && showButton == 'true' " (click)="insert()" class="btn btn-primary" style="float:right">Finish</button>
<div *ngIf="error == true"> <div class="alert alert-warning" role="alert">{{errorMessage}}</div>
</div>
<div *ngIf="claiming == true && claimsTODO > 0 && claimsTODO == claims" >
@ -30,12 +30,13 @@ export class ClaimInsertComponent {
}
@Input() contexts=[];
@Input() projects=[];
@Input() publications=[];
@Input() datasets=[];
@Input() public contexts;
@Input() public projects;
@Input() public publications;
@Input() public datasets;
@Input() public showButton:string = 'false';
@Input() show='claim';
@Input() inline='false';
@Output() showChange = new EventEmitter();
@ViewChild (Loading) loading : Loading ;
@ -45,69 +46,112 @@ export class ClaimInsertComponent {
errorMessage = "";
claimsTODO:number = 0;
claims:number = 0;
errorclaims:number = 0;
insert(){
this.claiming = true;
var user="argirok@di.uoa.gr"
if( this.datasets.length == 0 && this.publications.length == 0){
this.errorMessage = "There are no publications or datasets selected.";
this.error = true;
}else if(this.contexts.length == 0 && this.projects.length == 0){
this.errorMessage = "There are no projects or concepts to link.";
this.error = true;
if( this.datasets && this.datasets.length == 0 && this.publications && this.publications.length == 0){
this.showError("There are no publications or datasets selected.");
}else if((!this.contexts|| this.contexts.length==0 )&&(!this.projects|| this.projects.length==0 )){
this.showError("There are no projects or concepts to link.");
}else if((!this.publications|| this.publications.length==0 )&&(!this.datasets|| this.datasets.length==0 )){
this.showError("There are no publications or datasets to link.");
}else{
this.loading.open();
for (var i = 0; i < this.publications.length; i++) {
var result=this.publications[i];
if(this.publications){
for (var i = 0; i < this.publications.length; i++) {
var result=this.publications[i];
this.insertClaim(result,user);
}
}
if(this.datasets){
for (var i = 0; i < this.datasets.length; i++) {
var result=this.datasets[i];
this.insertClaim(result,user);
}
for (var i = 0; i < this.datasets.length; i++) {
var result=this.datasets[i];
this.insertClaim(result,user);
}
}
}
}
claimInserted(){
private claimInserted(){
this.claims+=1;
if(this.claims == this.claimsTODO){
this.show = "myclaims";
this.show = "context";
this.loading.close();
// this.showChange.emit({
// value: this.show
// });
this._router.navigate( ['MyClaims'] );
if(this.inline == "true"){
this.show = "end";
}else{
this._router.navigate( ['MyClaims'] );
}
this.showChange.emit({
value: this.show
});
}
}
insertClaim(result:any, user:any){
for (var j = 0; j < this.contexts.length; j++) {
var context=this.contexts[j];
var claim = { claimedBy : user, sourceId : context.concept.id, sourceType : "context", sourceCollectedFrom:"openaire", sourceAccessRights:"OPEN", sourceEmbargoEndDate:"", targetId : result.id , targetType : result.type,
targetCollectedFrom: result.source, targetAccessRights:result.accessRights, targetEmbargoEndDate:result.embargoEndDate};
console.info("Trying to insert context - result relation: contextId: "+claim.sourceId +" resultId : " + claim.targetId + " "+ claim.targetEmbargoEndDate );
this.claimsTODO +=1;
this.claimService.insertClaim(claim).subscribe(
data => {
this.claimInserted();
},
err => console.error(err)
);
private showError(error:string){
this.errorMessage = error;
this.error = true;
if(this.inline == "true"){
this.show = "error";
this.showChange.emit({
value: this.show
});
}
for (var j = 0; j < this.projects.length; j++) {
var project=this.projects[j];
}
private claimFailed(){
this.errorMessage = "An Error Occured.";
this.errorclaims++;
if((this.claims+this.errorclaims) == this.claimsTODO){
this.show = "context";
this.loading.close();
if(this.inline == "true"){
this.show = "end";
}else{
this._router.navigate( ['MyClaims'] );
}
this.showChange.emit({
value: this.show
});
}
}
insertClaim(result:any, user:any){
if(this.contexts){
for (var j = 0; j < this.contexts.length; j++) {
var context=this.contexts[j];
var claim = { claimedBy : user, sourceId : context.concept.id, sourceType : "context", sourceCollectedFrom:"openaire", sourceAccessRights:"OPEN", sourceEmbargoEndDate:"no", targetId : result.id , targetType : result.type, targetCollectedFrom: result.source, targetAccessRights:result.accessRights, targetEmbargoEndDate:result.embargoEndDate};
this.claimsTODO +=1;
this.claimService.insertClaim(claim).subscribe(
data => {
this.claimInserted();
},
err => {
console.error(err);
this.claimFailed();
}
);
}
}
if(this.projects){
for (var j = 0; j < this.projects.length; j++) {
var project=this.projects[j];
var claim = { claimedBy : user, sourceId : project.projectId, sourceType : "project", sourceCollectedFrom:"openaire", sourceAccessRights:"OPEN", sourceEmbargoEndDate:"", targetId : result.id , targetType : result.type,
targetCollectedFrom: result.source, targetAccessRights:result.accessRights, targetEmbargoEndDate:result.embargoEndDate};
console.info("Trying to insert project - result relation: projectId: "+claim.sourceId +" resultId : " + claim.targetId + " "+ claim.targetEmbargoEndDate );
this.claimsTODO +=1;
this.claimService.insertClaim(claim).subscribe(
data => {
this.claimInserted();
},
err => console.error(err)
);
var claim = { claimedBy : user, sourceId : project.projectId, sourceType : "project", sourceCollectedFrom:"openaire", sourceAccessRights:"OPEN", sourceEmbargoEndDate:"", targetId : result.id , targetType : result.type, targetCollectedFrom: result.source, targetAccessRights:result.accessRights, targetEmbargoEndDate:result.embargoEndDate};
console.info("Trying to insert project - result relation: projectId: "+claim.sourceId +" resultId : " + claim.targetId + " "+ claim.targetEmbargoEndDate );
this.claimsTODO +=1;
this.claimService.insertClaim(claim).subscribe(
data => {
this.claimInserted();
},
err => {
console.error(err);
this.claimFailed();
}
);
}
}
}
}

View File

@ -5,12 +5,29 @@ import {Component, Input,Output, EventEmitter} from '@angular/core';
template: `
<div [class]="(showAccessRights== 'true' )?'row':''" >
<!-- <div *ngIf=" inline == 'true'">
<div *ngIf=" inlineType == 'publication' " class="publication" >
<a *ngIf="inlineEntity[0].url" target="_blank" href="{{inlineEntity[0].url}}" >{{inlineEntity[0].title}}</a>
<span *ngIf="!inlineEntity[0].url" >{{inlineEntity[0].title}}</span>
</div>
<div *ngIf=" inlineType == 'dataset' " class="dataset" >
<a *ngIf="inlineEntity[0].url" target="_blank" href="{{inlineEntity[0].url}}" >{{inlineEntity[0].title}}</a>
<span *ngIf="!inlineEntity[0].url" >{{inlineEntity[0].title}}</span>
</div>
<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>
</div>
<div>Link to </div>
</div> -->
<div [class]="(showAccessRights== 'true' )?'col-sm-6':''" >
<div class="concepts" >
<div *ngIf=" !(inline == 'true' && inlineType == 'context') && contexts" class="concepts" >
<ul class="list-group">
<li class="list-group-item list-group-item-success">Selected Concepts ({{(contexts.length)}})
<span title="Add More Concepts" (click)="showType('context')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
<span *ngIf=" inline == 'false'" title="Add More Concepts" (click)="showType('context')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li class="list-group-item" *ngFor="let context of contexts" >
<span >{{context.community }} > {{context.category}} > {{context.concept.label}} </span>
@ -24,15 +41,15 @@ import {Component, Input,Output, EventEmitter} from '@angular/core';
</div>
<div [class]="(showAccessRights== 'true' )?'col-sm-6':''" >
<div class="projects" >
<div *ngIf=" !(inline == 'true' && inlineType == 'project') && projects " class="projects" >
<ul class="list-group">
<li class="list-group-item list-group-item-info">Selected Projects ({{(projects.length)}})
<span title="Add More Projects" (click)="showType('project')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
<span *ngIf=" inline == 'false'" title="Add More Projects" (click)="showType('project')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li class="list-group-item" *ngFor="let project of projects">
<span >{{project.funderName}} | {{project.projectName}} {{(project.projectAcronym)?'('+project.projectAcronym+')':''}}</span>
<span (click)="removeProject(project)" aria-hidden="true" class="btn glyphicon glyphicon-remove"></span>
<span (click)="removeProject(project)" aria-hidden="true" class="btn glyphicon glyphicon-remove"></span>
</li>
<li *ngIf="projects.length == 0 " class="list-group-item">There are no projects</li>
</ul>
@ -40,41 +57,15 @@ import {Component, Input,Output, EventEmitter} from '@angular/core';
</div>
</div>
<!--<div *ngIf="contexts.length == 0 " class="concepts" >
<ul class="list-group">
<li class="list-group-item list-group-item-success">Selected Concepts
<span title="Add More Concepts" (click)="showType('context')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li class="list-group-item">There are no contexts</li>
</ul>
</div>
<div *ngIf="projects.length == 0 " class="projects" >
<ul class="list-group">
<li class="list-group-item list-group-item-info">Selected Projects
<span title="Add More Projects" (click)="showType('project')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li class="list-group-item">There are no projects</li>
</ul>
</div>
<div *ngIf="publications.length == 0 && datasets.length == 0" class="results" >
<ul class="list-group">
<li class="list-group-item disabled">Selected Research Results
<span title="Add More Research Results" (click)="showType('result')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li class="list-group-item">There are no Research Results </li>
</ul>
</div>
-->
<div class="publications" >
<div *ngIf=" !(inline == 'true' && (inlineType == 'publication' || inlineType == 'dataset' )) && (datasets || publications)" class="publications" >
<ul class="list-group">
<li class="list-group-item panel-footer "> Research Results ({{(datasets.length+publications.length)}})
<span title="Add More Research Results" (click)="showType('result')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
<span *ngIf=" inline == 'false'" title="Add More Research Results" (click)="showType('result')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li *ngIf="publications.length == 0 && datasets.length == 0" class="list-group-item">There are no Research Results </li>
<li *ngIf="publications.length > 0 || datasets.length > 0" class="list-group-item list-group-item-warning ">{{publications. length }} Selected Publications:
<span title="Add More Publications" (click)="showType('publication')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
<li *ngIf="publications && datasets && publications.length == 0 && datasets.length == 0" class="list-group-item">There are no Research Results </li>
<li *ngIf="(publications && publications.length > 0) ||(datasets && datasets.length > 0 ) " class="list-group-item list-group-item-warning ">{{publications. length }} Selected Publications:
<span *ngIf=" inline == 'false'" title="Add More Publications" (click)="showType('publication')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li *ngFor="let pub of publications" class="list-group-item">
<span *ngIf="showAccessRights == 'true'" (click)="removePublication(pub)" aria-hidden="true" class="btn glyphicon glyphicon-remove"></span>
@ -99,7 +90,7 @@ import {Component, Input,Output, EventEmitter} from '@angular/core';
<span *ngIf="showAccessRights != 'true'" (click)="removePublication(pub)" aria-hidden="true" class="btn glyphicon glyphicon-remove"></span>
</li>
<li *ngIf="publications.length > 0 || datasets.length > 0" class="list-group-item list-group-item-warning "> {{datasets.length}} Selected Research Data:
<span title="Add More Research Data" (click)="showType('dataset')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
<span *ngIf=" inline == 'false'" title="Add More Research Data" (click)="showType('dataset')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
</li>
<li *ngFor="let dataset of datasets" class="list-group-item">
<span *ngIf="showAccessRights == 'true'" (click)="removeDataset(dataset)" aria-hidden="true" class="btn glyphicon glyphicon-remove"></span>
@ -141,12 +132,15 @@ export class ClaimSelectedComponent {
}
@Input() contexts=[];
@Input() projects=[];
@Input() publications=[];
@Input() datasets=[];
@Input() contexts;
@Input() projects;
@Input() publications;
@Input() datasets;
@Input() showAccessRights=false;
@Input() show='home';
@Input() inline='false';
@Input() inlineEntity;
@Input() inlineType;
@Output() projectsChange = new EventEmitter();
@Output()publicationsChange = new EventEmitter();
@Output() datasetsChange = new EventEmitter();

View File

@ -7,7 +7,7 @@ import {Router, ROUTER_DIRECTIVES} from '@angular/router-deprecated';
selector: 'paging',
template: `
<div *ngIf=" ( getTotalPages() > 0 ) && (getTotalPages() > 1) && ( 0 < currentPage && currentPage <= getTotalPages() ) " >
<ul class="pagination">
<ul class="pagination pagination-sm">
<li *ngIf=" currentPage > 1" ><a (click)="onPage((1))" aria-label="Previous">
<span aria-hidden="true">&laquo;</span></a></li>

View File

@ -7,7 +7,7 @@ import {Router, ROUTER_DIRECTIVES} from '@angular/router-deprecated';
selector: 'paging-no-load',
template: `
<div *ngIf=" ( getTotalPages() > 0 ) && (getTotalPages() > 1) && ( 0 < currentPage && currentPage <= getTotalPages() ) " >
<ul class="pagination">
<ul class="pagination pagination-sm">
<li *ngIf=" currentPage > 1" ><a (click)="onPage((1))" aria-label="Previous">
<span aria-hidden="true">&laquo;</span></a></li>

View File

@ -1,11 +1,11 @@
import {Component} from '@angular/core';
import {Component, ViewChild} from '@angular/core';
import {JSONP_PROVIDERS} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import {PublicationService} from '../../services/publication.service';
import {PublicationInfo} from '../../entities/publicationInfo';
import { RouteParams} from '@angular/router-deprecated';
import { InlineClaimContextComponent} from '../../claimPages/inlineClaimContext/inlineClaimContext.component';
import { InlineClaimProjectComponent} from '../../claimPages/inlineClaimProject/inlineClaimProject.component';
@Component({
selector: 'publication',
//directives: [...ROUTER_DIRECTIVES],
@ -13,183 +13,221 @@ import { RouteParams} from '@angular/router-deprecated';
<div *ngIf="publicationInfo != null">
<div class="publication">
<h2>{{publicationInfo.title}}</h2>
<div class="container publication">
<div class="container-header">
<h2>{{publicationInfo.title}}</h2>
</div>
<div class="row row-offcanvas row-offcanvas-right">
<p>
{{publicationInfo.authors}} ({{publicationInfo.date}})
</p>
<div class="row" *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">
<div class="col-md-1"> Publisher: </div>
<span>{{publicationInfo.publisher}}</span>
</div>
<div class="row" *ngIf="publicationInfo.journal != undefined && publicationInfo.journal != ''">
<div class="col-md-1"> Journal: </div>
<span>{{publicationInfo.journal}}</span>
</div>
<div class="row" *ngIf="publicationInfo.languages != undefined && publicationInfo.languages != 'Undetermined' && publicationInfo.languages != ''">
<div class="col-md-1"> Languages: </div>
<span>{{publicationInfo.languages}}</span>
</div>
<div class="row" *ngIf="publicationInfo.types != undefined">
<div class="col-md-1"> Types: </div>
<span>{{publicationInfo.types}}</span>
</div>
<div class="row" *ngIf="publicationInfo.subjects != undefined">
<div class="col-md-1"> Subjects: </div>
<span> {{publicationInfo.subjects}} </span>
</div>
<div class="row" *ngIf="publicationInfo.identifiers != undefined">
<div class="col-md-1">Identifiers:</div>
<span *ngFor="let key of publicationInfo.identifiers.keys()">
{{key}}: {{publicationInfo.identifiers.get(key)}}
</span>
</div>
<div >
<blockquote>
{{publicationInfo.description}}
</blockquote>
</div>
<div class="col-xs-6 col-sm-9 sidebar-offcanvas">
<p>
{{publicationInfo.authors}} ({{publicationInfo.date}})
</p>
<dl class="dl-horizontal">
<dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt>
<dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd>
<dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal != ''">Journal: </dt>
<dd *ngIf="publicationInfo.journal != undefined && publicationInfo.journal != ''">{{publicationInfo.journal}}</dd>
<dt *ngIf="publicationInfo.languages != undefined && publicationInfo.languages != 'Undetermined' && publicationInfo.languages != ''"> Languages: </dt>
<dd *ngIf="publicationInfo.languages != undefined && publicationInfo.languages != 'Undetermined' && publicationInfo.languages != ''">{{publicationInfo.languages}}</dd>
<dt *ngIf="publicationInfo.types != undefined"> Types: </dt>
<dd *ngIf="publicationInfo.types != undefined">{{publicationInfo.types}}</dd>
<dt *ngIf="publicationInfo.subjects != undefined"> Subjects: </dt>
<dd *ngIf="publicationInfo.subjects != undefined"> {{publicationInfo.subjects}} </dd>
<dt *ngIf="publicationInfo.identifiers != undefined">Identifiers:</dt>
<dd>
<ul class="list-inline">
<li *ngFor="let key of publicationInfo.identifiers.keys()">
{{key}}: {{publicationInfo.identifiers.get(key)}} </li>
</ul>
</dd>
</dl>
<blockquote>
{{publicationInfo.description}}
</blockquote>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#citationsTab">References</a></li>
<li><a data-toggle="tab" href="#dataTab">Related Research Data</a></li>
<li><a data-toggle="tab" href="#similarTab">Similar Publications</a></li>
<li><a data-toggle="tab" href="#bioentitiesTab">Bioentities</a></li>
</ul>
<div class="tab-content">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#citationsTab">References</a></li>
<li role="presentation"><a data-toggle="tab" href="#dataTab">Related Research Data</a></li>
<li role="presentation"><a data-toggle="tab" href="#similarTab">Similar Publications</a></li>
<li role="presentation" *ngIf="publicationInfo.bioentities != undefined"><a data-toggle="tab" href="#bioentitiesTab">Bioentities</a></li>
</ul>
<div id="citationsTab" class="tab-pane fade in active">
<h3>REFERENCES</h3>
<div class="tab-content">
<div id="citationsTab" class="tab-pane fade in active panel-body">
<div *ngIf="publicationInfo.references != undefined">
<div *ngFor="let item of publicationInfo.references">
<div *ngIf="item != undefined">
<p *ngIf="item['url'] != undefined">
<a class="custom-external" href="{{item['url']}}" target="_blank">
{{item['text']}}
</a>
</p>
<p *ngIf="item['url'] == undefined">
{{item['text']}}
</p>
</div>
</div>
<div *ngIf="publicationInfo.references == undefined" class = "alert alert-info " >
There are no references
</div>
<div *ngIf="publicationInfo.references != undefined" >
<div *ngFor="let item of publicationInfo.references">
<p *ngIf=" item != undefined &&item['url'] != undefined">
<a class="custom-external" href="{{item['url']}}" target="_blank">
{{item['text']}}
</a>
</p>
<p *ngIf="item['url'] == undefined">
{{item['text']}}
</p>
</div>
</div>
</div>
<div id="dataTab" class="tab-pane fade">
<h3>RELATED RESEARCH DATA</h3>
</div>
<div id="dataTab" class="tab-pane fade panel-body">
<div *ngIf="publicationInfo.relatedResearchData == undefined" class = "alert alert-info " >
There are no related research data
</div>
<table *ngIf="publicationInfo.relatedResearchData != undefined" id="inferredTable" class="table table-striped">
<thead>
<tr role="row">
<th>Title</th>
<th>Trust</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let key of publicationInfo.relatedResearchData.keys()">
<td *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.relatedResearchData.get(key)[0]}}
</a>
({{publicationInfo.relatedResearchData.get(key)[1]}})
</td>
<td>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "publicationInfo.relatedResearchData.get(key)[2]">
{{publicationInfo.relatedResearchData.get(key)[2]}}
</div>
</div>
</td>
</tr>
<table id="inferredTable">
<thead>
<tr role="row">
<th>Title</th>
<th>Trust</th>
</tr>
</thead>
<tbody *ngIf="publicationInfo.relatedResearchData != undefined">
<tr *ngFor="let key of publicationInfo.relatedResearchData.keys()">
<td *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.relatedResearchData.get(key)[0]}}
</a>
({{publicationInfo.relatedResearchData.get(key)[1]}})
</td>
<td>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "publicationInfo.relatedResearchData.get(key)[2]">
{{publicationInfo.relatedResearchData.get(key)[2]}}
</div>
</tbody>
</table>
</div>
<div id="similarTab" class="tab-pane fade panel-body">
<div *ngIf="publicationInfo.similarPublications == undefined" class = "alert alert-info " >
There are no similar publications
</div>
<table *ngIf="publicationInfo.similarPublications != undefined" id="similarTable" class="table table-striped">
<thead>
<tr>
<th>Title</th>
<th>Trust</th>
</tr>
</thead>
<tbody >
<tr *ngFor="let key of publicationInfo.similarPublications.keys()">
<td *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.similarPublications.get(key)[0]}}
</a>
({{publicationInfo.similarPublications.get(key)[1]}})
</td>
<td class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "publicationInfo.similarPublications.get(key)[2]">
{{publicationInfo.similarPublications.get(key)[2]}}
</div>
</td>
</tr>
</td>
</tr>
</tbody>
</table>
</div>
<div id="similarTab" class="tab-pane fade">
<h3>SIMILAR PUBLICATIONS</h3>
<table id="similarTable">
<thead>
<tr>
<th>Title</th>
<th>Trust</th>
</tr>
</thead>
<tbody *ngIf="publicationInfo.similarPublications != undefined">
<tr *ngFor="let key of publicationInfo.similarPublications.keys()">
<td *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.similarPublications.get(key)[0]}}
</a>
({{publicationInfo.similarPublications.get(key)[1]}})
</td>
<td class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "publicationInfo.similarPublications.get(key)[2]">
{{publicationInfo.similarPublications.get(key)[2]}}
</tbody>
</table>
</div>
<div *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab" class="tab-pane fade panel-body">
<table id="bioentitiesTable" class="table table-striped">
<thead>
<tr>
<th>Bio Entity</th>
<th>Site Name</th>
</tr>
</thead>
<div *ngIf="publicationInfo.bioentities != undefined">
<tbody *ngFor="let key of publicationInfo.bioentities.keys()">
<div *ngIf="publicationInfo.bioentities.get(key) != undefined">
<tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()">
<td *ngIf="keyIn != undefined">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" target="_blank">
{{keyIn}}
</a>
</td>
<td>
{{key}}
</td>
</tr>
</div>
</td>
</tr>
</tbody>
</tbody>
</table>
</div>
<div id="bioentitiesTab" class="tab-pane fade">
<h3>BIOENTITIES</h3>
<table id="bioentitiesTable">
<thead>
<tr>
<th>Bio Entity</th>
<th>Site Name</th>
</tr>
</thead>
<div *ngIf="publicationInfo.bioentities != undefined">
<tbody *ngFor="let key of publicationInfo.bioentities.keys()">
<div *ngIf="publicationInfo.bioentities.get(key) != undefined">
<tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()">
<td *ngIf="keyIn != undefined">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" target="_blank">
{{keyIn}}
</a>
</td>
<td>
{{key}}
</td>
</tr>
</div>
</tbody>
</div>
</table>
</div>
</table>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3">
</div>
</div>
<div class="mainFunctionsBlock">
<div class="functionsSection" *ngIf="publicationInfo.collectedFrom != undefined">
<h3 class="title">Collected from</h3>
<ul class="line" *ngFor="let key of publicationInfo.collectedFrom.keys()">
<li class="collectedFrom">
<ul class="list-group mainFunctionsBlock">
<li class="list-group-item">
<dl class="functionsSection" *ngIf="publicationInfo.collectedFrom != undefined">
<dt >Collected from</dt>
<dd *ngFor="let key of publicationInfo.collectedFrom.keys()">
<a href="{{publicationInfo.collectedFrom.get(key)}}">
{{key}}
{{key}}
</a>
</li>
</ul>
</div>
</dd>
</dl>
</li>
<li class="list-group-item">
<dl class="functionsSection" *ngIf="publicationInfo.collectedFrom != undefined">
<dt class="title">Download from</dt>
<dd class="line" *ngFor="let key of publicationInfo.collectedFrom.keys()">
<a href="{{publicationInfo.collectedFrom.get(key)}}">
{{key}}
</a>
</dd>
</dl>
</li>
<li class="list-group-item">
<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>
</dd>
</dl>
<a (click)="toggleClaimProject()">Add more Projects</a>
<inline-claim-project *ngIf="result " inline="true" inlineType ="publication" [inlineEntity]="result" (projectAdded)="projectAdded($event)" ></inline-claim-project>
</li>
<li class="list-group-item">
<a (click)=" claimInline=(claimInline=='context')?'none':'context'" >Add more Contexts</a>
<inline-claim-context *ngIf="result " inline="true" inlineType ="publication" [inlineEntity]="result" ></inline-claim-context>
</li>
</ul>
</div>
</div>
</div>
</div>
`,
providers:[JSONP_PROVIDERS, PublicationService]
providers:[JSONP_PROVIDERS, PublicationService],
directives:[InlineClaimContextComponent, InlineClaimProjectComponent]
})
export class PublicationComponent {
constructor (private _publicationService: PublicationService, private _routeParams: RouteParams) {
console.info('publication constructor');
@ -197,25 +235,65 @@ export class PublicationComponent {
}
ngOnInit() {
console.info('publication init');
// let result_ = {id: this.params.get("articleId"), type :"publication", source : "openaire", title:"lalalla",url: null, result: null, accessRights:"OPEN", embargoEndDate: null};
// this.result.push(result_);
this.getPublicationInfo();
}
results : String[];
orcidresults : String[];
resultsNum : number ;
publicationInfo: PublicationInfo;
params: RouteParams;
//AK - For the claims
private result ;
private claimInline:string = "none" ;
@ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
@ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ;
getPublicationInfo() {
console.info("inside getPublicationInfo of component");
this._publicationService.getPublicationInfo(this.params.get("articleId")).subscribe(
data => {
this.publicationInfo = data;
//AK - For the claims
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)
);
}
toggleClaimProject(){
console.info("TOOGLE ");
this.inlineClaimProject.toggle();
}
projectAdded($event){
var projects =$event.value;
if(projects){
for(var i=0; i < projects.length; i++){
if(this.publicationInfo.fundedByProjects == undefined) {
this.publicationInfo.fundedByProjects = new Map<string, string[]>();
}
var project =projects[i];
// this.publicationInfo.fundedByProjects.set(mydata.code, new Array<string>());
// this.publicationInfo.fundedByProjects.get(mydata.code)[0] = mydata.acronym;
// this.publicationInfo.fundedByProjects.get(mydata.code)[1] = mydata.title;
// var project= { funderId: this.selectedFunderId,funderName: this.selectedFunderName, projectId: item.field[0]['@value'], projectName: item.field[3]['@value'] , projectAcronym: item.field[1]['@value'] };
this.publicationInfo.fundedByProjects.set(project.projectId, new Array<string>());
this.publicationInfo.fundedByProjects.get(project.projectId)[0] = project.projectAcronym;
this.publicationInfo.fundedByProjects.get(project.projectId)[1] = project.projectName;
// this.publicationInfo.fundedByProjects.get(mydata.code)[2] = mydata['funding']['funder'].shortname;
// this.publicationInfo.fundedByProjects.get(mydata.code)[3] = mydata['funding']['funder'].name;
this.publicationInfo.fundedByProjects.get(project.projectId)[2] =project.selectedFunderId;
this.publicationInfo.fundedByProjects.get(project.projectId)[3] = project.selectedFunderName;
}
}
}
}

View File

@ -75,13 +75,18 @@ export class PublicationService {
this.publicationInfo.fundedByProjects = new Map<string, string[]>();
}
this.publicationInfo.fundedByProjects.set(mydata.code, new Array<string>());
this.publicationInfo.fundedByProjects.get(mydata.code)[0] = mydata.acronym;
this.publicationInfo.fundedByProjects.get(mydata.code)[1] = mydata.title;
// this.publicationInfo.fundedByProjects.set(mydata.code, new Array<string>());
// this.publicationInfo.fundedByProjects.get(mydata.code)[0] = mydata.acronym;
// this.publicationInfo.fundedByProjects.get(mydata.code)[1] = mydata.title;
this.publicationInfo.fundedByProjects.set(mydata['to'].content, new Array<string>());
this.publicationInfo.fundedByProjects.get(mydata['to'].content)[0] = mydata.acronym;
this.publicationInfo.fundedByProjects.get(mydata['to'].content)[1] = mydata.title;
if(mydata.hasOwnProperty("funding")) {
if(mydata['funding'].hasOwnProperty("funder")) {
this.publicationInfo.fundedByProjects.get(mydata.code)[2] = mydata['funding']['funder'].shortname;
this.publicationInfo.fundedByProjects.get(mydata.code)[3] = mydata['funding']['funder'].name;
// this.publicationInfo.fundedByProjects.get(mydata.code)[2] = mydata['funding']['funder'].shortname;
// this.publicationInfo.fundedByProjects.get(mydata.code)[3] = mydata['funding']['funder'].name;
this.publicationInfo.fundedByProjects.get(mydata['to'].content)[2] = mydata['funding']['funder'].shortname;
this.publicationInfo.fundedByProjects.get(mydata['to'].content)[3] = mydata['funding']['funder'].name;
}
if(mydata['funding'].hasOwnProperty("funding_level_2")) {
funding = mydata['funding']['funding_level_2'].content;
@ -93,10 +98,11 @@ export class PublicationService {
if(funding != undefined) {
funding = funding.split("::");
this.publicationInfo.fundedByProjects.get(mydata.code)[4] = funding[1];
// this.publicationInfo.fundedByProjects.get(mydata.code)[4] = funding[1];
this.publicationInfo.fundedByProjects.get(mydata['to'].content)[4] = funding[1];
for(let i=2; i<funding.length; i++) {
this.publicationInfo.fundedByProjects.get(mydata.code)[4] += " | " + funding[i];
// this.publicationInfo.fundedByProjects.get(mydata.code)[4] += " | " + funding[i];
this.publicationInfo.fundedByProjects.get(mydata['to'].content)[4] += " | " + funding[i];
}
}
}
@ -293,7 +299,7 @@ export class PublicationService {
}
}
this.printPublicationInfo();
//this.printPublicationInfo();
return this.publicationInfo;
}