167 lines
8.9 KiB
HTML
167 lines
8.9 KiB
HTML
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" >
|
|
<div uk-grid uk-grid>
|
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
|
<div class="uk-container">
|
|
<!--div *ngIf="accessStatus=='empty'" 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">
|
|
<p class="uk-text-large">Please enter your email and then press 'See Claims' button.</p>
|
|
<form class="uk-form">
|
|
<fieldset data-uk-margin>
|
|
<input type="text" placeholder="example@email.com" name="email" [(ngModel)]="email">
|
|
<button (click)="validateJWTandToken()" class=" uk-button uk-button-default">See Claims</button>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div-->
|
|
|
|
<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">
|
|
<!--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-->
|
|
<p class="uk-text-large">Oops! Your email does not give you the authority to view claims for the selected project. Please contact the administrators.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div *ngIf="accessStatus=='valid'">
|
|
<div class="uk-article-title custom-article-title">
|
|
Claims Administrator
|
|
<a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
|
|
routerLinkActive="router-link-active"
|
|
routerLink="/search/project" >
|
|
{{project['name']}} ({{project['funderName']}})
|
|
</a>
|
|
|
|
</div>
|
|
<h2> Pending Claims</h2>
|
|
|
|
<div *ngIf=" pending_claims && pending_claims.length == 0" >
|
|
<div class = "uk-alert uk-alert-primary " >No pending claims found.</div>
|
|
</div>
|
|
|
|
<div class="uk-overflow-container custom-dataTable-content">
|
|
|
|
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
|
|
<form class="uk-text-center uk-panel">
|
|
<input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="filterQuery" name="keyword" />
|
|
</form>
|
|
</div>
|
|
|
|
<span *ngIf="pending_claims && pending_claims.length > 0 && totalPendingResults.count > 0">
|
|
{{totalPendingResults.count | number}} pending claims, page {{activePendingPage.page | number}} of {{totalPages(totalPendingResults.count) | number}}
|
|
<paging-no-load class="uk-float-right" [currentPage]="activePendingPage.page" [totalResults]="totalPendingResults.count" [size]="rowsOnPage" (pageChange)="refreshTable(table1, $event, 'pending')"></paging-no-load>
|
|
</span>
|
|
<table #filtered1 *ngIf="pending_claims && pending_claims.length > 0" class="uk-table uk-table-striped">
|
|
<!--[mfData]="pending_claims | claimsDatatable : [filterQuery, totalPendingResults, activePendingPage]" #mf1="mfDataTable" [mfRowsOnPage]="rowsOnPage" [mfActivePage]="1"-->
|
|
<!--[(mfSortBy)]="sortByClaimDate1" (mfSortOrder)="sortOrder"-->
|
|
<thead>
|
|
<tr>
|
|
<th> Research Result </th>
|
|
<th class="uk-text-center">Claimed By </th>
|
|
<th class="uk-text-center">Claimed Date </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-5" *ngIf="claim1.targetType != 'project'"><claim-entity [entity]="claim1.target" [type]="claim1.targetType" [(properties)]=properties> </claim-entity></td>
|
|
<td class="uk-width-2-5 uk-text-center" *ngIf="claim1.sourceType != 'project'"><claim-entity [entity]="claim1.source" [type]="claim1.sourceType" [(properties)]=properties> </claim-entity></td>
|
|
<td class="uk-width-1-5 uk-text-center">{{claim1.userMail}}</td>
|
|
<td class="uk-width-1-5 uk-text-center">{{claim1.date}}</td>
|
|
<td class="uk-width-1-5 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>
|
|
</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>
|
|
<button class="uk-button uk-button-primary uk-float-right" type="submit" (click)="saveChanges()">Save Changes</button>
|
|
|
|
<h2> Already Curated Claims</h2>
|
|
|
|
<div *ngIf=" curated_claims && curated_claims.length == 0" >
|
|
<div class = "uk-alert uk-alert-primary " >No curated claims found.</div>
|
|
</div>
|
|
|
|
<div class="uk-overflow-container custom-dataTable-content">
|
|
|
|
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
|
|
<form class="uk-text-center uk-panel">
|
|
<input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="filterQuery2" name="keyword" />
|
|
</form>
|
|
</div>
|
|
|
|
<span *ngIf="curated_claims && curated_claims.length > 0 && totalCuratedResults.count > 0">
|
|
{{totalCuratedResults.count | number}} curated claims, page {{activeCuratedPage.page | number}} of {{totalPages(totalCuratedResults.count) | number}}
|
|
<paging-no-load class="uk-float-right" [currentPage]="activeCuratedPage.page" [totalResults]="totalCuratedResults.count" [size]="rowsOnPage" (pageChange)="refreshTable(table2, $event, 'curated')"> </paging-no-load>
|
|
</span>
|
|
|
|
<table *ngIf="curated_claims && curated_claims.length > 0" class="uk-table uk-table-striped" >
|
|
<!--[mfData]="curated_claims | claimsDatatable : [filterQuery2, totalCuratedResults, activeCuratedPage]" #mf2="mfDataTable" [mfRowsOnPage]="rowsOnPage" [mfActivePage]="1"-->
|
|
<!--[(mfSortBy)]="sortByCurationDate2" [(mfSortOrder)]="sortOrder"-->
|
|
<thead>
|
|
<!--tr>
|
|
<td colspan="6">
|
|
<form class="uk-text-center uk-panel uk-background-muted">
|
|
<input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="filterQuery2" name="keyword" />
|
|
</form>
|
|
</td>
|
|
</tr-->
|
|
<!--tr>
|
|
<td>
|
|
Filter curated claims:
|
|
<input class="uk-input uk-width-1-3" [(ngModel)]="filterQuery2"/>
|
|
</td>
|
|
</tr-->
|
|
<tr>
|
|
<th>Research Result</th>
|
|
<!--th>Link to</th-->
|
|
<th class="uk-text-center">Claimed by </th>
|
|
<th class="uk-text-center">Claimed Date </th>
|
|
<th class="uk-text-center">Curated by </th>
|
|
<th class="uk-text-center">Curation Date </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" [(properties)]=properties> </claim-entity></td>
|
|
<td class="uk-width-1-6" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" [(properties)]=properties> </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>
|
|
<!--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" (click)="editable.add(i)">Edit</button></td-->
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!--modal-select (alertOutput)="curatorSelected($event)"></modal-select-->
|
|
<modal-loading [message]= "'Loading...'"></modal-loading>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|