A few more changes for UIKIT3 | get changes to portal-2/ until r47108
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47130 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
b8448dab08
commit
d5ecd8cfa9
|
@ -53,6 +53,7 @@
|
||||||
"@angularclass/bootloader": "~1.0.1",
|
"@angularclass/bootloader": "~1.0.1",
|
||||||
"@angularclass/idle-preload": "~1.0.4",
|
"@angularclass/idle-preload": "~1.0.4",
|
||||||
"@types/clipboard": "^1.5.31",
|
"@types/clipboard": "^1.5.31",
|
||||||
|
"angular2-datatable": "^0.6.0",
|
||||||
"angular2-express-engine": "~2.1.0-rc.1",
|
"angular2-express-engine": "~2.1.0-rc.1",
|
||||||
"angular2-platform-node": "~2.1.0-rc.1",
|
"angular2-platform-node": "~2.1.0-rc.1",
|
||||||
"angular2-universal": "~2.1.0-rc.1",
|
"angular2-universal": "~2.1.0-rc.1",
|
||||||
|
@ -63,14 +64,12 @@
|
||||||
"clipboard": "^1.5.16",
|
"clipboard": "^1.5.16",
|
||||||
"compression": "^1.6.2",
|
"compression": "^1.6.2",
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
"jquery": "^3.2.1",
|
|
||||||
"js.clone": "0.0.3",
|
"js.clone": "0.0.3",
|
||||||
"methods": "~1.1.2",
|
"methods": "~1.1.2",
|
||||||
"morgan": "^1.7.0",
|
"morgan": "^1.7.0",
|
||||||
"preboot": "~4.5.2",
|
"preboot": "~4.5.2",
|
||||||
"rxjs": "5.0.0-beta.12",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"ts-md5": "^1.2.0",
|
"ts-md5": "^1.2.0",
|
||||||
"uikit": "^3.0.0-beta.22",
|
|
||||||
"webfontloader": "^1.6.26",
|
"webfontloader": "^1.6.26",
|
||||||
"zone.js": "~0.6.26"
|
"zone.js": "~0.6.26"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,14 +15,10 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
selector: 'claims-project-manager',
|
selector: 'claims-project-manager',
|
||||||
template: `
|
template: `
|
||||||
|
|
||||||
<!--div class="page-header">
|
<!--div *ngIf="accessStatus=='empty'" class="uk-margin-top uk-width-medium-2-3 uk-container-center">
|
||||||
<h1> Claims Manager </h1>
|
|
||||||
</div-->
|
|
||||||
|
|
||||||
<!--div *ngIf="accessStatus=='empty'" class="uk-margin-top uk-width-medium-2-3 ">
|
|
||||||
<div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
|
<div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
|
||||||
<p class="uk-text-large">Please enter your email and then press 'See Claims' button.</p>
|
<p class="uk-text-large">Please enter your email and then press 'See Claims' button.</p>
|
||||||
<form class="">
|
<form class="uk-form">
|
||||||
<fieldset data-uk-margin>
|
<fieldset data-uk-margin>
|
||||||
<input type="text" placeholder="example@email.com" name="email" [(ngModel)]="email">
|
<input type="text" placeholder="example@email.com" name="email" [(ngModel)]="email">
|
||||||
<button (click)="validateJWTandToken()" class=" uk-button uk-button-default">See Claims</button>
|
<button (click)="validateJWTandToken()" class=" uk-button uk-button-default">See Claims</button>
|
||||||
|
@ -31,7 +27,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
</div>
|
</div>
|
||||||
</div-->
|
</div-->
|
||||||
|
|
||||||
<div *ngIf="accessStatus=='invalid'" class="uk-margin-top uk-width-medium-2-3 ">
|
<div *ngIf="accessStatus=='invalid'" class="uk-margin-top uk-width-medium-2-3 uk-container-center">
|
||||||
<div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
|
<div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
|
||||||
<!--p class="uk-text-large">Oops! There is no entry for you! Please retry with another email or for another project.</p-->
|
<!--p class="uk-text-large">Oops! There is no entry for you! Please retry with another email or for another project.</p-->
|
||||||
<!--button (click)="accessStatus='empty'" class=" uk-button uk-button-default">Retry</button-->
|
<!--button (click)="accessStatus='empty'" class=" uk-button uk-button-default">Retry</button-->
|
||||||
|
@ -40,24 +36,24 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="accessStatus=='valid'">
|
<div *ngIf="accessStatus=='valid'">
|
||||||
<h1> Pending Claims for project:
|
<h1 class="page-header">
|
||||||
<a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
|
<a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
|
||||||
routerLinkActive="router-link-active"
|
routerLinkActive="router-link-active"
|
||||||
routerLink="/search/project" >
|
routerLink="/search/project" >
|
||||||
{{project['name']}} ({{project['funderName']}})
|
{{project['name']}} ({{project['funderName']}})
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
<h2> Pending Claims</h2>
|
||||||
|
|
||||||
<div *ngIf=" pending_claims && pending_claims.length == 0" >
|
<div *ngIf=" pending_claims && pending_claims.length == 0" >
|
||||||
<div class = "uk-alert uk-alert-primary " >No pending claims found.</div>
|
<div class = "uk-alert uk-alert-primary " >No pending claims found.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-overflow-container">
|
<div class="uk-overflow-container">
|
||||||
<table *ngIf="pending_claims && pending_claims.length > 0" class="uk-table uk-table-striped">
|
<!--table *ngIf="pending_claims && pending_claims.length > 0" class="uk-table uk-table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Research Result</th>
|
<th>Research Result</th>
|
||||||
<!--th>Link to</th-->
|
|
||||||
<th class="uk-text-center">Claimed by</th>
|
<th class="uk-text-center">Claimed by</th>
|
||||||
<th class="uk-text-center">Claimed Date</th>
|
<th class="uk-text-center">Claimed Date</th>
|
||||||
<th class="uk-text-center">Approve</th>
|
<th class="uk-text-center">Approve</th>
|
||||||
|
@ -69,14 +65,6 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
<td class="uk-width-1-6 uk-text-center" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
|
<td class="uk-width-1-6 uk-text-center" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
|
||||||
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
|
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
|
||||||
<td class="uk-width-1-6 uk-text-center">{{claim.date}}</td>
|
<td class="uk-width-1-6 uk-text-center">{{claim.date}}</td>
|
||||||
<!--td>
|
|
||||||
<label>
|
|
||||||
Yes <input [id]="claim.id" type="checkbox" (click)="selectApprove(claim.id,$event)" [ngModel]="isSelectedRight(claim.id)"/>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
No <input [id]="claim.id" type="checkbox" (click)="selectDisapprove(claim.id,$event)" [ngModel]="isSelectedWrong(claim.id)"/>
|
|
||||||
</label>
|
|
||||||
</td-->
|
|
||||||
<td class="uk-width-1-6 uk-text-center">
|
<td class="uk-width-1-6 uk-text-center">
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
@ -88,20 +76,61 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table-->
|
||||||
|
|
||||||
<h1> Already Curated Claims </h1>
|
<table *ngIf="pending_claims && pending_claims.length > 0" class="uk-table uk-table-striped custom-dataTable-content"
|
||||||
|
[mfData]="pending_claims" #mf1="mfDataTable" [mfRowsOnPage]="rowsOnPage" [mfActivePage]="1">
|
||||||
|
<!--[(mfSortBy)]="sortByClaimDate1" (mfSortOrder)="sortOrder"-->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><mfDefaultSorter [by]="sortByTitle1">Research Result</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center"><mfDefaultSorter by="claim1.userMail">Claimed By</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center"><mfDefaultSorter [by]="sortByClaimDate1">Claimed Date</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center">Approve</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="uk-table-middle" *ngFor="let claim1 of mf1.data">
|
||||||
|
<td class="uk-width-2-6" *ngIf="claim1.targetType != 'project'"><claim-entity [entity]="claim1.target" [type]="claim1.targetType" > </claim-entity></td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center" *ngIf="claim1.sourceType != 'project'"><claim-entity [entity]="claim1.source" [type]="claim1.sourceType" > </claim-entity></td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">{{claim1.userMail}}</td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">{{claim1.date}}</td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">
|
||||||
|
|
||||||
|
<label>
|
||||||
|
Yes <input [id]="claim1.id" type="checkbox" (click)="selectApprove(claim1.id,$event)" [ngModel]="isSelectedRight(claim1.id)"/>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
No <input [id]="claim1.id" type="checkbox" (click)="selectDisapprove(claim1.id,$event)" [ngModel]="isSelectedWrong(claim1.id)"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<paging-no-load [currentPage]="1" [totalResults]="pending_claims.length" [size]="rowsOnPage" (pageChange)="refreshTable(mf1, $event)"></paging-no-load>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2> Already Curated Claims</h2>
|
||||||
|
|
||||||
<div *ngIf=" curated_claims && curated_claims.length == 0" >
|
<div *ngIf=" curated_claims && curated_claims.length == 0" >
|
||||||
<div class = "uk-alert uk-alert-primary " >No curated claims found.</div>
|
<div class = "uk-alert uk-alert-primary " >No curated claims found.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-overflow-container">
|
<div class="uk-overflow-container">
|
||||||
<table *ngIf="curated_claims && curated_claims.length > 0" class="uk-table uk-table-striped">
|
<!--table *ngIf="curated_claims && curated_claims.length > 0" class="uk-table uk-table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Research Result</th>
|
<th>Research Result</th>
|
||||||
<!--th>Link to</th-->
|
|
||||||
<th class="uk-text-center">Claimed by</th>
|
<th class="uk-text-center">Claimed by</th>
|
||||||
<th class="uk-text-center">Claimed Date</th>
|
<th class="uk-text-center">Claimed Date</th>
|
||||||
<th class="uk-text-center">Curated by</th>
|
<th class="uk-text-center">Curated by</th>
|
||||||
|
@ -111,6 +140,42 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="uk-table-middle" *ngFor="let claim of curated_claims let i=index">
|
<tr class="uk-table-middle" *ngFor="let claim of curated_claims let i=index">
|
||||||
|
<td class="uk-width-1-6" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
|
||||||
|
<td class="uk-width-1-6" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">{{claim.date}}</td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">{{claim.curatedBy}}</td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">{{claim.curationDate}}</td>
|
||||||
|
<td class="uk-width-1-6 uk-text-center">
|
||||||
|
|
||||||
|
<label>
|
||||||
|
Yes <input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" [ngModel]="isRight(claim)"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
No <input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" [ngModel]="isWrong(claim)"/>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table-->
|
||||||
|
|
||||||
|
<table *ngIf="curated_claims && curated_claims.length > 0" class="uk-table uk-table-striped"
|
||||||
|
[mfData]="curated_claims" #mf2="mfDataTable" [mfRowsOnPage]="rowsOnPage" [mfActivePage]="1">
|
||||||
|
<!--[(mfSortBy)]="sortByCurationDate2" [(mfSortOrder)]="sortOrder"-->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><mfDefaultSorter [by]="sortByTitle1">Research Result</mfDefaultSorter></th>
|
||||||
|
<!--th>Link to</th-->
|
||||||
|
<th class="uk-text-center"><mfDefaultSorter by="userMail">Claimed by</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center"><mfDefaultSorter [by]="sortByClaimDate2">Claimed Date</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center"><mfDefaultSorter by="curatedBy">Curated by</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center"><mfDefaultSorter [by]="sortByCurationDate2">Curation Date</mfDefaultSorter></th>
|
||||||
|
<th class="uk-text-center">Approved</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="uk-table-middle" *ngFor="let claim of mf2.data let i=index">
|
||||||
<td class="uk-width-1-6" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
|
<td class="uk-width-1-6" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
|
||||||
<td class="uk-width-1-6" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
|
<td class="uk-width-1-6" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
|
||||||
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
|
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
|
||||||
|
@ -129,11 +194,26 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<!--td><input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" (click)="selectDisapprove(claim.id,$event)" [ngModel]="isWrong(claim)"/></td-->
|
<!--td><input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" (click)="selectDisapprove(claim.id,$event)" [ngModel]="isWrong(claim)"/></td-->
|
||||||
<!--td><button class=" uk-button uk-button-default" (click)="editable.add(i)">Edit</button></td-->
|
<!--td><button class="uk-button" (click)="editable.add(i)">Edit</button></td-->
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<!--mfBootstrapPaginator></mfBootstrapPaginator-->
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<paging-no-load [currentPage]="1" [totalResults]="curated_claims.length" [size]="rowsOnPage" (pageChange)="refreshTable(mf2, $event)"> </paging-no-load>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="uk-text-small uk-text-right">*Note that claims you did not approved or disapproved are considered as right (but not curated)</div>
|
<div class="uk-text-small uk-text-right">*Note that claims you did not approved or disapproved are considered as right (but not curated)</div>
|
||||||
<button class="uk-button uk-button-success uk-float-right" type="button" (click)="saveChanges()">Save Changes</button>
|
<button class="uk-button uk-button-success uk-float-right" type="button" (click)="saveChanges()">Save Changes</button>
|
||||||
|
@ -160,6 +240,10 @@ export class ClaimsByTokenComponent {
|
||||||
// when 'empty' show form to fill email, when 'valid' show proper claims, when 'invalid' show no matched entry-wanna retry
|
// when 'empty' show form to fill email, when 'valid' show proper claims, when 'invalid' show no matched entry-wanna retry
|
||||||
public accessStatus: string;// = "empty";
|
public accessStatus: string;// = "empty";
|
||||||
|
|
||||||
|
public rowsOnPage = 5;
|
||||||
|
public sortOrder = "asc";
|
||||||
|
|
||||||
|
|
||||||
@ViewChild (ModalSelect) selectModal : ModalSelect;
|
@ViewChild (ModalSelect) selectModal : ModalSelect;
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
|
|
||||||
|
@ -182,6 +266,45 @@ export class ClaimsByTokenComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshTable(mf:any, $event:any) {
|
||||||
|
mf.mfActivePage=$event.value;
|
||||||
|
mf.setPage(mf.mfActivePage, this.rowsOnPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sortByClaimDate1 = (claim: any) => {
|
||||||
|
return new Date(claim.date);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sortByCurationDate1 = (claim: any) => {
|
||||||
|
return new Date(claim.curationDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sortByTitle1 = (claim: any) => {
|
||||||
|
if(claim.targetType != 'project') {
|
||||||
|
return claim.target.title;
|
||||||
|
} else {
|
||||||
|
return claim.source.title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public sortByClaimDate2 = (claim: any) => {
|
||||||
|
return new Date(claim.date);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sortByCurationDate2 = (claim: any) => {
|
||||||
|
console.info(new Date(claim.curationDate));
|
||||||
|
return new Date(claim.curationDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sortByTitle2= (claim: any) => {
|
||||||
|
if(claim.targetType != 'project') {
|
||||||
|
return claim.target.title;
|
||||||
|
} else {
|
||||||
|
return claim.source.title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
validateJWTandToken() {
|
validateJWTandToken() {
|
||||||
var jwtToken=Session.getUserJwt();
|
var jwtToken=Session.getUserJwt();
|
||||||
if(this.token) {
|
if(this.token) {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import {DataTableModule} from "angular2-datatable";
|
||||||
|
|
||||||
import { SharedModule } from '../../shared/shared.module';
|
import { SharedModule } from '../../shared/shared.module';
|
||||||
import { ClaimsByTokenComponent } from './claimsByToken.component';
|
import { ClaimsByTokenComponent } from './claimsByToken.component';
|
||||||
import { ClaimsByTokenService } from './claimsByToken.service';
|
import { ClaimsByTokenService } from './claimsByToken.service';
|
||||||
|
@ -13,14 +15,18 @@ import {LoadingModalModule} from '../../utils/modal/loadingModal.module';
|
||||||
|
|
||||||
import {LoginGuard} from'../../login/loginGuard.guard';
|
import {LoginGuard} from'../../login/loginGuard.guard';
|
||||||
|
|
||||||
|
import {PagingModule} from '../../utils/paging.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule,
|
RouterModule,
|
||||||
|
DataTableModule,
|
||||||
SharedModule,
|
SharedModule,
|
||||||
ClaimsByTokenRoutingModule,
|
ClaimsByTokenRoutingModule,
|
||||||
ClaimEntityFormatterModule,
|
ClaimEntityFormatterModule,
|
||||||
SelectModalModule,
|
SelectModalModule,
|
||||||
LoadingModalModule
|
LoadingModalModule,
|
||||||
|
PagingModule
|
||||||
// ClaimServiceModule,
|
// ClaimServiceModule,
|
||||||
//DisplayClaimsModule
|
//DisplayClaimsModule
|
||||||
|
|
||||||
|
|
|
@ -13,18 +13,18 @@ export class ClaimsByTokenService {
|
||||||
getClaims(token: string, jwtToken: string):any {
|
getClaims(token: string, jwtToken: string):any {
|
||||||
console.info("getClaims in service");
|
console.info("getClaims in service");
|
||||||
|
|
||||||
let url = OpenaireProperties.getClaimsAPIURL()+"projects/corda__h2020::94c962e736df90a5075a7f660ba3d7f6/claims"
|
let url = OpenaireProperties.getClaimsAPIURL()+"project/claims?token="+jwtToken+"&projectToken="+token;
|
||||||
+"?&token="+jwtToken;
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
//if (this._cache.has(key)) {
|
||||||
return Observable.of(this._cache.get(key));
|
// return Observable.of(this._cache.get(key));
|
||||||
}
|
//}
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
//.map(res => <any> res.text())
|
//.map(res => <any> res.text())
|
||||||
.map(request => <any> request.json())
|
.map(request => <any> request.json());
|
||||||
.do(res => {
|
//.do(res => {
|
||||||
this._cache.set(key, res);
|
// this._cache.set(key, res);
|
||||||
});
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ import { Meta} from '../../angular2-meta';
|
||||||
|
|
||||||
<h3>Locate data provider via your institution</h3>
|
<h3>Locate data provider via your institution</h3>
|
||||||
|
|
||||||
<form class= " -row">
|
<form class= "">
|
||||||
<entities-autocomplete fieldId="organization" (click)="warningMessage = ''" [entityType]="'organization'" [depositType]=compatibility [selectedValue]=selectedId [showSelected]=true
|
<entities-autocomplete fieldId="organization" (click)="warningMessage = ''" [entityType]="'organization'" [depositType]=compatibility [selectedValue]=selectedId [showSelected]=true
|
||||||
[placeHolderMessage] = "'Search for Organizations'" [title] = "'Organizations'" [multipleSelections]=false
|
[placeHolderMessage] = "'Search for Organizations'" [title] = "'Organizations'" [multipleSelections]=false
|
||||||
(selectedValueChanged)="valueChanged($event)">
|
(selectedValueChanged)="valueChanged($event)">
|
||||||
|
|
|
@ -7,6 +7,14 @@
|
||||||
<div *ngIf="datasetInfo != null" uk-grid>
|
<div *ngIf="datasetInfo != null" uk-grid>
|
||||||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||||
<showTitle [title]="datasetInfo.title"></showTitle>
|
<showTitle [title]="datasetInfo.title"></showTitle>
|
||||||
|
|
||||||
|
<div *ngIf="datasetInfo.underCurationMessage">
|
||||||
|
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||||
|
title="{{buildCurationTooltip()}}">
|
||||||
|
<i>Record in preview</i>
|
||||||
|
<i class="uk-icon-info-circle"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<!--/div>
|
<!--/div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -166,18 +174,7 @@
|
||||||
*ngFor="let item of datasetInfo.fundedByProjects let i=index">
|
*ngFor="let item of datasetInfo.fundedByProjects let i=index">
|
||||||
<div *ngIf="i<5 || showAllFundedBy">
|
<div *ngIf="i<5 || showAllFundedBy">
|
||||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||||
title="
|
title="{{buildFundingTooltip(item)}}">
|
||||||
<div>
|
|
||||||
<h4>{{item['title']}}</h4>
|
|
||||||
Project Code: {{item['code']}}
|
|
||||||
<div>
|
|
||||||
Funder: {{item['funderName']}} ({{item['funderShortname']}})
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Funding: {{item['funding']}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
">
|
|
||||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||||
<a *ngIf="!item['inline']"
|
<a *ngIf="!item['inline']"
|
||||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||||
|
|
|
@ -128,4 +128,48 @@ export class DatasetComponent {
|
||||||
this._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateMeta("og:title",_title);
|
this._meta.updateMeta("og:title",_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public buildCurationTooltip() {
|
||||||
|
let tooltipContent: string = "";
|
||||||
|
|
||||||
|
tooltipContent += "<h4>Record in preview</h4>";
|
||||||
|
tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>";
|
||||||
|
|
||||||
|
return tooltipContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||||
|
"funderShortname": string, "funderName": string,
|
||||||
|
"funding": string, "code": string, inline: boolean}) {
|
||||||
|
let tooltipContent: string = "";
|
||||||
|
|
||||||
|
if(item.title) {
|
||||||
|
tooltipContent += "<h4>"+item.title+"</h4>";
|
||||||
|
}
|
||||||
|
if(item.code) {
|
||||||
|
tooltipContent += "Project Code: "+item.code;
|
||||||
|
}
|
||||||
|
if(item.funderName || item.funderShortname) {
|
||||||
|
tooltipContent += "<div>Funder: ";
|
||||||
|
if(item.funderName && item.funderShortname) {
|
||||||
|
tooltipContent += item.funderName + " ("+ item.funderShortname +")";
|
||||||
|
} else if(item.funderName) {
|
||||||
|
tooltipContent += item.funderName;
|
||||||
|
} else {
|
||||||
|
tooltipContent += item.funderShortname;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltipContent += "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.funding) {
|
||||||
|
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tooltipContent) {
|
||||||
|
tooltipContent = "<div>" + tooltipContent + "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return tooltipContent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,17 +27,18 @@ export class DatasetService {
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.map(res => <any> res.json())
|
.map(res => <any> res.json())
|
||||||
.do(res => console.info(res['result']['metadata']['oaf:entity']))
|
.do(res => console.info(res['result']['metadata']['oaf:entity']))
|
||||||
.map(res => res['result']['metadata']['oaf:entity']['oaf:result'])
|
.map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity']['oaf:result']])
|
||||||
.map(res => [res,
|
.map(res => [res[1],
|
||||||
res['title'],
|
res[1]['title'],
|
||||||
res['rels']['rel'],
|
res[1]['rels']['rel'],
|
||||||
res['children'],
|
res[1]['children'],
|
||||||
res['pid'],
|
res[1]['pid'],
|
||||||
res['subject'],
|
res[1]['subject'],
|
||||||
res['bestlicense'],
|
res[1]['bestlicense'],
|
||||||
res['collectedfrom'],
|
res[1]['collectedfrom'],
|
||||||
res['context'],
|
res[1]['context'],
|
||||||
res['resulttype']
|
res[1]['resulttype'],
|
||||||
|
res[0]
|
||||||
]).do(res => {
|
]).do(res => {
|
||||||
this._cache.set(key, res);
|
this._cache.set(key, res);
|
||||||
})
|
})
|
||||||
|
@ -565,6 +566,11 @@ export class DatasetService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(data[10] != null && data[10] == "under curation") {
|
||||||
|
this.datasetInfo.underCurationMessage = true;
|
||||||
|
} else {
|
||||||
|
this.datasetInfo.underCurationMessage = false;
|
||||||
|
}
|
||||||
|
|
||||||
//this.printdatasetInfo();
|
//this.printdatasetInfo();
|
||||||
return this.datasetInfo;
|
return this.datasetInfo;
|
||||||
|
|
|
@ -39,11 +39,13 @@ export class CiteThisComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.Cite
|
// this.Cite
|
||||||
// this.sub = this.route.queryParams.subscribe(data => {
|
// this.sub = this.route.queryParams.subscribe(data => {
|
||||||
|
if(typeof window !== 'undefined') {
|
||||||
this.parseData();
|
this.parseData();
|
||||||
var Cite = require('citation-js');
|
var Cite = require('citation-js');
|
||||||
this.cite = new Cite(this.data);
|
this.cite = new Cite(this.data);
|
||||||
// this.cite.setData(this.data);
|
// this.cite.setData(this.data);
|
||||||
this.citationText = this.cite.get(this.citation.getOptionsBy(this.selectedStyle));
|
this.citationText = this.cite.get(this.citation.getOptionsBy(this.selectedStyle));
|
||||||
|
}
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
parseData(){
|
parseData(){
|
||||||
|
|
|
@ -8,6 +8,15 @@
|
||||||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||||
<showTitle [title]="publicationInfo.title"></showTitle>
|
<showTitle [title]="publicationInfo.title"></showTitle>
|
||||||
|
|
||||||
|
<div *ngIf="publicationInfo.underCurationMessage">
|
||||||
|
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||||
|
title="{{buildCurationTooltip()}}">
|
||||||
|
<i>Record in preview</i>
|
||||||
|
<i class="uk-icon-info-circle"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<showAuthors [authors]="publicationInfo.authors"></showAuthors>
|
<showAuthors [authors]="publicationInfo.authors"></showAuthors>
|
||||||
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
|
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
|
||||||
|
@ -398,7 +407,7 @@
|
||||||
*ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
*ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
||||||
<div *ngIf="i<5 || showAllFundedBy">
|
<div *ngIf="i<5 || showAllFundedBy">
|
||||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||||
title="{{buildTooltip(item)}}">
|
title="{{buildFundingTooltip(item)}}">
|
||||||
|
|
||||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||||
<a *ngIf="!item['inline'] && item.id"
|
<a *ngIf="!item['inline'] && item.id"
|
||||||
|
|
|
@ -151,7 +151,16 @@ export class PublicationComponent {
|
||||||
this.pageViews = $event.pageViews;
|
this.pageViews = $event.pageViews;
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTooltip(item: { "id": string, "acronym": string, "title": string,
|
public buildCurationTooltip() {
|
||||||
|
let tooltipContent: string = "<div class='uk-margin'>";
|
||||||
|
|
||||||
|
tooltipContent += "<h4>Record in preview</h4>";
|
||||||
|
tooltipContent += "<p>Bibliographic record accepted by the system, but not yet processed by <br> OpenAIRE tools for information quality improvement and de-duplication</p>";
|
||||||
|
|
||||||
|
return tooltipContent+= "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||||
"funderShortname": string, "funderName": string,
|
"funderShortname": string, "funderName": string,
|
||||||
"funding": string, "code": string, inline: boolean}) {
|
"funding": string, "code": string, inline: boolean}) {
|
||||||
let tooltipContent: string = "<div class='uk-margin'>";
|
let tooltipContent: string = "<div class='uk-margin'>";
|
||||||
|
|
|
@ -23,19 +23,20 @@ export class PublicationService {
|
||||||
}
|
}
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.map(res => <any> res.json())
|
.map(res => <any> res.json())
|
||||||
.map(res => res['result']['metadata']['oaf:entity'])
|
.map(res => [res['result']['header']['dri:status'], res['result']['metadata']['oaf:entity']])
|
||||||
.map(res => [res['oaf:result'],
|
.map(res => [ res[1]['oaf:result'],
|
||||||
res['oaf:result']['title'],
|
res[1]['oaf:result']['title'],
|
||||||
res['oaf:result']['rels']['rel'],
|
res[1]['oaf:result']['rels']['rel'],
|
||||||
res['oaf:result']['children'],
|
res[1]['oaf:result']['children'],
|
||||||
res['oaf:result']['pid'],
|
res[1]['oaf:result']['pid'],
|
||||||
res['oaf:result']['journal'],
|
res[1]['oaf:result']['journal'],
|
||||||
res['oaf:result']['language'],
|
res[1]['oaf:result']['language'],
|
||||||
res['oaf:result']['subject'],
|
res[1]['oaf:result']['subject'],
|
||||||
res['oaf:result']['bestlicense'],
|
res[1]['oaf:result']['bestlicense'],
|
||||||
res['oaf:result']['collectedfrom'],
|
res[1]['oaf:result']['collectedfrom'],
|
||||||
(res['extraInfo']!= undefined && res['extraInfo']['citations']!= undefined)? res['extraInfo']['citations']['citation']:null,
|
(res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null,
|
||||||
res['oaf:result']['context']
|
res[1]['oaf:result']['context'],
|
||||||
|
res[0]
|
||||||
])
|
])
|
||||||
.do(res => {
|
.do(res => {
|
||||||
this._cache.set(key, res);
|
this._cache.set(key, res);
|
||||||
|
|
|
@ -7,19 +7,17 @@ import {Component, Input} from '@angular/core';
|
||||||
<div *ngIf="showAll">
|
<div *ngIf="showAll">
|
||||||
<a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
|
<a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
|
||||||
</div>
|
</div>
|
||||||
<span *ngFor="let item of authors.slice(0,30)">
|
<span *ngFor="let item of authors.slice(0,30) let i=index">
|
||||||
<!--a href="{{item['url']}}"-->
|
<!--a href="{{item['url']}}"-->
|
||||||
<a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">
|
<a *ngIf="item.id" routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">{{item['name']}}</a><span *ngIf="item.id && i<29 && i<(authors.length-1)">;</span>
|
||||||
{{item['name']}};
|
<span *ngIf="!item.id">{{item['name']}}</span><span *ngIf="!item.id && i<29 && i<(authors.length-1)">;</span>
|
||||||
</a>
|
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="!showAll && authors.length > 30"> ... </span>
|
<span *ngIf="!showAll && authors.length > 30"> ... </span>
|
||||||
<span *ngIf="showAll">
|
<span *ngIf="showAll">
|
||||||
<span *ngFor="let item of authors.slice(30)">
|
<span *ngFor="let item of authors.slice(30) let i=index">
|
||||||
<!--a href="{{item['url']}}"-->
|
<!--a href="{{item['url']}}"-->
|
||||||
<a routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">
|
<a *ngIf="item.id" routerLinkActive="router-link-active" routerLink="/search/person" [queryParams]="{personId: item.id}">{{item['name']}}</a><span *ngIf="item.id && i<(authors.length-1)">;</span>
|
||||||
{{item['name']}};
|
<span *ngIf="!item.id">{{item['name']}}</span><span *ngIf="!item.id && i<(authors.length-1)">;</span>
|
||||||
</a>
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="!showAll && authors.length > 30">
|
<span *ngIf="!showAll && authors.length > 30">
|
||||||
|
|
|
@ -141,6 +141,10 @@
|
||||||
min-height: 250px;
|
min-height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-dataTable-content {
|
||||||
|
min-height: 1000px;
|
||||||
|
}
|
||||||
|
|
||||||
.filterItem span {
|
.filterItem span {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue