1 |
61381
|
k.triantaf
|
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" >
|
2 |
|
|
<div uk-grid uk-grid>
|
3 |
|
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
4 |
|
|
<div class="uk-container">
|
5 |
|
|
|
6 |
|
|
<div *ngIf="accessStatus=='invalid'" class="uk-margin-top uk-width-medium-2-3 uk-container-center">
|
7 |
|
|
<div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
|
8 |
|
|
<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>
|
9 |
|
|
</div>
|
10 |
|
|
</div>
|
11 |
|
|
|
12 |
|
|
<div *ngIf="accessStatus=='valid'">
|
13 |
|
|
<div class="uk-article-title custom-article-title">
|
14 |
|
|
Claims Administrator
|
15 |
|
|
<a *ngIf="project" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
|
16 |
|
|
routerLinkActive="router-link-active"
|
17 |
|
|
[routerLink]="properties.searchLinkToProject.split('?')[0]">
|
18 |
|
|
{{project['name']}} ({{project['funderName']}})
|
19 |
|
|
</a>
|
20 |
|
|
|
21 |
|
|
</div>
|
22 |
|
|
<ul class="uk-margin-large-top" uk-tab="connect: #tab-content">
|
23 |
|
|
<li [class]="mode == 'pending' ? 'uk-active' : ''" (click)="mode='pending'"><a>Pending Claims</a></li>
|
24 |
|
|
<li [class]="mode == 'curated' ? 'uk-active' : ''" (click)="mode='curated'"><a>Curated Claims</a></li>
|
25 |
|
|
</ul>
|
26 |
|
|
<ul class="uk-switcher uk-margin"><!-- uk-switcher="connect: #tab-content"-->
|
27 |
|
|
<li [class]="mode == 'pending' ? 'uk-active' : ''" (click)="mode='pending'">
|
28 |
|
|
<h3>Pending Claims</h3>
|
29 |
|
|
<!-- <div *ngIf=" pending_claims && pending_claims.length == 0" >
|
30 |
|
|
<div class = "uk-alert uk-alert-primary " >No pending claims found.</div>
|
31 |
|
|
</div> -->
|
32 |
|
|
<errorMessages [status]="[pending_status]" [type]="'pending claims'"></errorMessages>
|
33 |
|
|
|
34 |
|
|
<div class="uk-overflow-container custom-dataTable-content">
|
35 |
|
|
|
36 |
|
|
<div class="uk-alert-warning" uk-alert>Note that claims you do not select (approve or disapprove) are considered as approved (but not curated)</div>
|
37 |
|
|
|
38 |
|
|
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
|
39 |
|
|
<form class="uk-text-center uk-panel">
|
40 |
|
|
<input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="keyword1" name="keyword" />
|
41 |
|
|
<button (click)="refreshTable(1, 'pending')" type="submit" class=" uk-button">
|
42 |
|
|
<span class="uk-icon">
|
43 |
|
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
44 |
|
|
</span>Search
|
45 |
|
|
</button>
|
46 |
|
|
</form>
|
47 |
|
|
</div>
|
48 |
|
|
|
49 |
|
|
<span *ngIf="pending_claims && pending_claims.length > 0 && totalPendingResults.count > 0">
|
50 |
|
|
{{totalPendingResults.count | number}} pending claims, page {{activePendingPage.page | number}} of {{totalPages(totalPendingResults.count) | number}}
|
51 |
|
|
<paging-no-load class="uk-float-right" [currentPage]="activePendingPage.page" [totalResults]="totalPendingResults.count" [size]="rowsOnPage" (pageChange)="refreshTable($event.value, 'pending')"></paging-no-load>
|
52 |
|
|
</span>
|
53 |
|
|
<!-- *ngIf="showTables" -->
|
54 |
|
|
<table #table1 datatable class="uk-table uk-table-striped divider-table" [dtOptions]="dtOptions[0]" [dtTrigger]="dtTrigger[0]" dtInstance="dtInstanceCallback" id="table1">
|
55 |
|
|
<thead>
|
56 |
|
|
<tr>
|
57 |
|
|
<th> Research Result </th>
|
58 |
|
|
<th class="uk-text-center">Claimed By </th>
|
59 |
|
|
<th class="uk-text-center">Claimed Date </th>
|
60 |
|
|
<th class="uk-text-center">Approve</th>
|
61 |
|
|
</tr>
|
62 |
|
|
</thead>
|
63 |
|
|
<tbody>
|
64 |
|
|
<tr class="uk-table-middle" *ngFor="let claim of pending_claims">
|
65 |
|
|
<td class="uk-width-2-5" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" [(properties)]=properties> </claim-entity></td>
|
66 |
|
|
<td class="uk-width-2-5 uk-text-center" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" [(properties)]=properties> </claim-entity></td>
|
67 |
|
|
<td class="uk-width-1-5 uk-text-center">{{claim.userMail}}</td>
|
68 |
|
|
<td class="uk-width-1-5 uk-text-center">{{claim.date}}</td>
|
69 |
|
|
<td class="uk-width-1-5 uk-text-center">
|
70 |
|
|
|
71 |
|
|
<label>
|
72 |
|
|
Yes <input [id]="claim.id" type="checkbox" (click)="selectApprove(claim.id,$event,'pending')" [ngModel]="isSelected(claim.id, selectedRight_PendingMode)"/>
|
73 |
|
|
</label>
|
74 |
|
|
<label>
|
75 |
|
|
No <input [id]="claim.id" type="checkbox" (click)="selectDisapprove(claim.id,$event,'pending')" [ngModel]="isSelected(claim.id, selectedWrong_PendingMode)"/>
|
76 |
|
|
</label>
|
77 |
|
|
</td>
|
78 |
|
|
</tr>
|
79 |
|
|
</tbody>
|
80 |
|
|
</table>
|
81 |
|
|
</div>
|
82 |
|
|
|
83 |
|
|
<div *ngIf="(selectedWrong_PendingMode.size+selectedRight_PendingMode.size) > 0" class="uk-alert-primary" uk-alert>
|
84 |
|
|
You have selected <span class="uk-badge">{{(selectedWrong_PendingMode.size+selectedRight_PendingMode.size)}}</span> claim(s) to curate
|
85 |
|
|
</div>
|
86 |
|
|
<div *ngIf="totalPendingResults.count > 0" class="uk-float-right">
|
87 |
|
|
<button (click)="clearCheckboxes()" [class]="((selectedWrong_PendingMode.size+selectedRight_PendingMode.size) == 0) ? 'uk-button uk-disabled' : 'uk-button'">Reset</button>
|
88 |
|
|
|
89 |
|
|
<span title="Approve or dissaprove at least one claim"
|
90 |
|
|
[attr.uk-tooltip]="((selectedWrong_PendingMode.size+selectedRight_PendingMode.size) == 0) ? 'pos:right; cls: uk-active' : 'cls: uk-invisible'">
|
91 |
|
|
<button [class]="((selectedWrong_PendingMode.size+selectedRight_PendingMode.size) == 0) ? 'uk-disabled uk-button uk-button-primary' : 'uk-button uk-button-primary'"
|
92 |
|
|
type="submit" (click)="saveChanges()">
|
93 |
|
|
<!-- <button class="uk-button uk-button-primary" type="submit" (click)="saveChanges()"> -->
|
94 |
|
|
Save Changes
|
95 |
|
|
</button>
|
96 |
|
|
</span>
|
97 |
|
|
</div>
|
98 |
|
|
</li>
|
99 |
|
|
<li [class]="mode == 'curated' ? 'uk-active' : ''" (click)="mode='curated'">
|
100 |
|
|
<h2>Curated Claims</h2>
|
101 |
|
|
|
102 |
|
|
<!-- <div *ngIf=" curated_claims && curated_claims.length == 0" >
|
103 |
|
|
<div class = "uk-alert uk-alert-primary " >No curated claims found.</div>
|
104 |
|
|
</div> -->
|
105 |
|
|
|
106 |
|
|
<errorMessages [status]="[curated_status]" [type]="'curated claims'"></errorMessages>
|
107 |
|
|
|
108 |
|
|
<div class="uk-overflow-container custom-dataTable-content">
|
109 |
|
|
|
110 |
|
|
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
|
111 |
|
|
<form class="uk-text-center uk-panel">
|
112 |
|
|
<input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="keyword2" name="keyword" />
|
113 |
|
|
<button (click)="refreshTable(1, 'curated')" type="submit" class=" uk-button">
|
114 |
|
|
<span class="uk-icon">
|
115 |
|
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
|
116 |
|
|
</span>Search
|
117 |
|
|
</button>
|
118 |
|
|
</form>
|
119 |
|
|
</div>
|
120 |
|
|
|
121 |
|
|
<span *ngIf="curated_claims && curated_claims.length > 0 && totalCuratedResults.count > 0">
|
122 |
|
|
{{totalCuratedResults.count | number}} curated claims, page {{activeCuratedPage.page | number}} of {{totalPages(totalCuratedResults.count) | number}}
|
123 |
|
|
<paging-no-load class="uk-float-right" [currentPage]="activeCuratedPage.page" [totalResults]="totalCuratedResults.count" [size]="rowsOnPage" (pageChange)="refreshTable($event.value, 'curated')"> </paging-no-load>
|
124 |
|
|
</span>
|
125 |
|
|
|
126 |
|
|
<!-- [dtTrigger]="dtTrigger2" dtInstance="dtInstanceCallback" -->
|
127 |
|
|
<!-- *ngIf="showTables" -->
|
128 |
|
|
<table #table2 datatable class="uk-table uk-table-striped divider-table" [dtOptions]="dtOptions[1]" [dtTrigger]="dtTrigger[1]" dtInstance="dtInstanceCallback" id="table2">
|
129 |
|
|
<thead>
|
130 |
|
|
<tr>
|
131 |
|
|
<th>Research Result</th>
|
132 |
|
|
<th class="uk-text-center">Claimed by </th>
|
133 |
|
|
<th class="uk-text-center">Claimed Date </th>
|
134 |
|
|
<th class="uk-text-center">Curated by </th>
|
135 |
|
|
<th class="uk-text-center">Curation Date </th>
|
136 |
|
|
<th class="uk-text-center">Approved</th>
|
137 |
|
|
<th class="uk-text-center">Actions</th>
|
138 |
|
|
</tr>
|
139 |
|
|
</thead>
|
140 |
|
|
<tbody>
|
141 |
|
|
<tr class="uk-table-middle" *ngFor="let claim of curated_claims let i=index">
|
142 |
|
|
<td class="uk-width-1-6" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" [(properties)]=properties> </claim-entity></td>
|
143 |
|
|
<td class="uk-width-1-6" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" [(properties)]=properties> </claim-entity></td>
|
144 |
|
|
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
|
145 |
|
|
<td class="uk-width-1-6 uk-text-center">{{claim.date}}</td>
|
146 |
|
|
<td class="uk-width-1-6 uk-text-center">{{claim.curatedBy}}</td>
|
147 |
|
|
<td class="uk-width-1-6 uk-text-center">{{claim.curationDate}}</td>
|
148 |
|
|
<td class="uk-width-1-6 uk-text-center uk-form-controls">
|
149 |
|
|
<label [class]="!editable.has(i) ? 'uk-disabled' : ''">
|
150 |
|
|
Yes <input [id]="claim.id" class="uk-radio" type="radio" [disabled]="!editable.has(i)" [checked]="isRight_CuratedMode(claim)" (click)="selectApprove(claim.id,$event,'curated')"/>
|
151 |
|
|
</label>
|
152 |
|
|
|
153 |
|
|
<label [class]="!editable.has(i) ? 'uk-disabled' : ''">
|
154 |
|
|
No <input [id]="claim.id" class="uk-radio" type="radio" [disabled]="!editable.has(i)" [checked]="isWrong_CuratedMode(claim)" (click)="selectDisapprove(claim.id,$event,'curated')"/>
|
155 |
|
|
</label>
|
156 |
|
|
|
157 |
|
|
</td>
|
158 |
|
|
<!-- <td><input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" (click)="selectDisapprove(claim.id,$event)" [ngModel]="isWrong(claim)"/></td> -->
|
159 |
|
|
<td class="uk-text-center">
|
160 |
|
|
<span *ngIf="!editable.has(i)"><button class="uk-button" (click)="editable.add(i)">Edit</button></span>
|
161 |
|
|
<!-- class="uk-button-group" -->
|
162 |
|
|
<span *ngIf="editable.has(i)">
|
163 |
|
|
<!-- [disabled]="!selectedRight_CuratedMode.has(claim.id) && !selectedWrong_CuratedMode.has(claim.id)" -->
|
164 |
|
|
<button class="uk-width-1-1 uk-button uk-button-primary uk-button-small" type="submit" (click)="saveEdited(claim, i)">Save</button>
|
165 |
|
|
<button class="uk-width-1-1 uk-button uk-button-small" (click)="editable.delete(i); cancelEditOfCuration(claim)">Cancel</button>
|
166 |
|
|
</span>
|
167 |
|
|
</td>
|
168 |
|
|
</tr>
|
169 |
|
|
</tbody>
|
170 |
|
|
</table>
|
171 |
|
|
</div>
|
172 |
|
|
</li>
|
173 |
|
|
</ul>
|
174 |
|
|
|
175 |
|
|
<modal-loading [message]= "'Loading...'"></modal-loading>
|
176 |
|
|
</div>
|
177 |
|
|
|
178 |
|
|
</div>
|
179 |
|
|
</div>
|
180 |
|
|
</div>
|
181 |
|
|
</div>
|