1 |
43769
|
argiro.kok
|
import {Component, Input,Output, EventEmitter} from '@angular/core';
|
2 |
43933
|
argiro.kok
|
import {ClaimResult} from '../../../utils/entities/claimEntities.class';
|
3 |
43769
|
argiro.kok
|
|
4 |
|
|
@Component({
|
5 |
|
|
selector: 'claim-selected-results',
|
6 |
|
|
template: `
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
<!-- Results -->
|
10 |
|
|
|
11 |
44881
|
argiro.kok
|
<div *ngIf=" !(inline && (hideType == 'publication' || hideType == 'dataset' )) && (datasets.length > 0 || publications.length > 0)" class="publications" >
|
12 |
44978
|
argiro.kok
|
<ul class="uk-list">
|
13 |
43769
|
argiro.kok
|
<li class="list-group-item panel-footer "> Research Results ({{(datasets.length+publications.length)}})
|
14 |
|
|
<span *ngIf=" !inline && linkToResults " title="Add More Research Results" (click)="showType('result')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
|
15 |
|
|
</li>
|
16 |
|
|
<li *ngIf="publications && datasets && publications.length == 0 && datasets.length == 0" class="list-group-item">There are no Research Results </li>
|
17 |
|
|
<li *ngIf="(publications && publications.length > 0) ||(datasets && datasets.length > 0 ) " class="list-group-item list-group-item-warning ">{{publications. length }} Selected Publications:
|
18 |
|
|
<span *ngIf=" !inline && linkToResults " title="Add More Publications" (click)="showType('result')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
|
19 |
|
|
</li>
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
<claim-selected-publications [publications]="publications" [showAccessRights]="showAccessRights"
|
24 |
|
|
[linkToResults]="(bulkMode)?false:true" >
|
25 |
|
|
</claim-selected-publications>
|
26 |
|
|
<li *ngIf="publications.length > 0 || datasets.length > 0" class="list-group-item list-group-item-warning "> {{datasets.length}} Selected Research Data:
|
27 |
|
|
<span *ngIf=" !inline && linkToResults " title="Add More Research Data" (click)="showType('result')" aria-hidden="true" class="glyphicon glyphicon-plus " style="float:right;cursor: pointer;"></span>
|
28 |
|
|
</li>
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
<claim-selected-datasets [datasets]="datasets" [showAccessRights]="showAccessRights"
|
32 |
|
|
[linkToResults]="(bulkMode)?false:true" >
|
33 |
|
|
</claim-selected-datasets>
|
34 |
|
|
|
35 |
|
|
</ul>
|
36 |
|
|
</div>
|
37 |
|
|
|
38 |
|
|
`
|
39 |
|
|
|
40 |
|
|
})
|
41 |
|
|
export class ClaimSelectedResultsComponent {
|
42 |
|
|
ngOnInit() {
|
43 |
|
|
var myDate = new Date();
|
44 |
|
|
this.todayDate=( myDate.getFullYear()+ "-" +myDate.getMonth() + 1) + "-" + myDate.getDate() ;
|
45 |
|
|
this.nextDate= ( (myDate.getFullYear()+100)+ "-" +myDate.getMonth() + 1) + "-" + myDate.getDate() ;
|
46 |
|
|
//2015-05-01
|
47 |
|
|
}
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
43933
|
argiro.kok
|
@Input() publications:ClaimResult[];
|
52 |
|
|
@Input() datasets:ClaimResult[];
|
53 |
43769
|
argiro.kok
|
@Input() showAccessRights:boolean = false;
|
54 |
|
|
@Input() show='home';
|
55 |
|
|
@Input() inline:boolean = false;
|
56 |
|
|
@Input() hideType;
|
57 |
|
|
@Input() bulkMode:boolean = false;
|
58 |
|
|
@Input() linkToResults:boolean = true;
|
59 |
|
|
@Output() showChange = new EventEmitter();
|
60 |
|
|
|
61 |
|
|
todayDate = '';
|
62 |
|
|
nextDate = '';
|
63 |
|
|
showType(type){
|
64 |
|
|
if(type != this.show){
|
65 |
|
|
this.show = type;
|
66 |
|
|
this.showChange.emit({
|
67 |
|
|
value: this.show
|
68 |
|
|
});
|
69 |
|
|
}
|
70 |
|
|
}
|
71 |
|
|
showChanged($event) {
|
72 |
|
|
this.show=$event.value;
|
73 |
|
|
|
74 |
|
|
this.showChange.emit({
|
75 |
|
|
value: this.show
|
76 |
|
|
});
|
77 |
|
|
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
}
|