openaire-library/claims/claim-utils/displayClaims/displayClaims.component.html

255 lines
14 KiB
HTML

<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<div class="uk-width-1-1">
</div>
<div class="uk-grid helper-grid">
<!-- <helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>-->
<div class="uk-width-expand uk-margin-top">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<form class="">
<div class=" ">
<span class="uk-text-muted">Filter by</span>
</div>
<div class="uk-margin-small-top ">
<label class="uk-margin-small-right"> <input [(ngModel)]="projectCB" type="checkbox"
[disabled]="pageLoading"
(ngModelChange)="changeType()" name="project"/>
Projects </label>
<label class="uk-margin-small-right"> <input [(ngModel)]="publicationCB" type="checkbox"
[disabled]="pageLoading"
(ngModelChange)="changeType()" name="publication"/>
Publications </label>
<label class="uk-margin-small-right"> <input [(ngModel)]="datasetCB" type="checkbox"
[disabled]="pageLoading"
(ngModelChange)="changeType()" name="dataset"/>
Research Data </label>
<label class="uk-margin-small-right"> <input [(ngModel)]="softwareCB" type="checkbox"
[disabled]="pageLoading"
(ngModelChange)="changeType()" name="software"/>
Software
</label>
<label class="uk-margin-small-right"> <input [(ngModel)]="otherCB" type="checkbox"
[disabled]="pageLoading"
(ngModelChange)="changeType()" name="other"/>
Other products
</label>
<label class="uk-margin-small-right"> <input [(ngModel)]="contextCB" type="checkbox"
[disabled]="pageLoading"
(ngModelChange)="changeType()" name="context"/>
Communities </label>
<div class="uk-inline">
<span class="uk-form-icon uk-icon"><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>
</span>
<input type="text" class=" uk-input uk-width-medium form-control" placeholder="Search links"
aria-describedby="sizing-addon2"
[(ngModel)]="inputkeyword" (keyup)="changekeyword()"
name="claims-keyword">
<span *ngIf="inputkeyword.length > 0" class="uk-margin-small-right uk-icon" style="cursor: pointer;"
(click)="inputkeyword=''; changekeyword();">
<svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" data-svg="close"><path fill="none" stroke="#000"
stroke-width="1.06"
d="M16,16 L4,4"></path><path
fill="none"
stroke="#000"
stroke-width="1.06"
d="M16,4 L4,16"></path></svg>
</span>
</div>
</div>
</form>
<div *ngIf="resultsNum>0 && selected.length == 0"
class="searchPaging uk-panel uk-margin-top portal-hr uk-margin-small-bottom"
data-uk-grid-margin="">
<div class="uk-width-1-2 uk-margin-top uk-margin-bottom">
<span> Results per page
<select *ngIf="resultsNum>10" class="uk-width-1-5 uk-select" [(ngModel)]="size" name="select_size"
(ngModelChange)="changeSize()" [disabled]="pageLoading">
<option *ngFor="let size of sizes" [value]="size">{{size}}</option>
</select>
</span>
</div>
<div class="uk-grid">
<div *ngIf="resultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{resultsNum|number}}</span> links, page <span
class="portal-color">{{page | number}}</span> of <span
class="portal-color">{{totalPages(resultsNum)|number}}</span>
</div>
<div *ngIf="resultsNum" class="uk-width-1-2 ">
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
[loading]="pageLoading"
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
</div>
</div>
</div>
<!-- Buttons for selecting and Delete Claims -->
<div *ngIf="enableDelete && selected.length>0 && resultsNum > 0 "
class="uk-margin-top portal-hr uk-margin-small-bottom uk-grid uk-margin-small-left">
<div class=" uk-width-1-2 uk-padding-remove-left">
{{selected.length | number}} link{{(selected.length > 1) ? 's' : ''}} selected
</div>
<div class=" uk-width-1-2">
<a [class]=" 'uk-text-danger uk-float-right '+(selected.length > 0?'':'uk-disabled')" (click)="confirmOpen()">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="trash" ratio="1"><polyline fill="none" stroke="#000"
points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline
fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7"
width="1"
height="9"></rect><rect
x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span>
delete links
</a>
</div>
</div>
<div *ngIf="deleteMessage.length>0 " [innerHTML]="deleteMessage">
<!--button *ngIf="claims && claims.length > 0" class=" uk-button uk-button-default" (click)="confirmOpen()"> <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="trash" ratio="1"><polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7" width="1" height="9"></rect><rect x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span> Delete</button-->
</div>
<div *ngIf="showErrorMessage " class="uk-alert uk-alert-danger ">
An Error occured.
</div>
<div *ngIf="showForbiddenMessage " class="uk-alert uk-alert-danger ">
You are not allowed to access this page.
</div>
<div *ngIf="userValidMessage.length > 0 " class="uk-alert uk-alert-danger ">
User session is not valid. Please login again.
</div>
<div *ngIf="claims && claims.length == 0" class="uk-margin-top">
<div class="uk-alert uk-alert-primary ">No entries found.</div>
</div>
<div class="">
<table *ngIf="claims && claims.length > 0" class="uk-table uk-table-small uk-table-striped dataTable">
<thead class="uk-text-capitalize">
<tr>
<th *ngIf="enableDelete" class="uk-padding-remove-right" title="Select all">
<input id="checkAll" type="checkbox" (click)="selectAll($event)"
[ngModel]="selected.length==claims.length"/>
</th>
<th [class]="'uk-width-1-3 '+(sortby != 'target'?'sorting':(descending?'sorting_desc':'sorting_asc'))"
(click)="changeOrderby('target')"> Source
</th>
<th [class]="'uk-width-1-3 '+(sortby != 'source'?'sorting':(descending?'sorting_desc':'sorting_asc'))"
(click)="changeOrderby('source')">
Link to
</th>
<th *ngIf=" showUserEmail
" [class]="sortby != 'user'?'sorting':(descending?'sorting_desc':'sorting_asc')"
(click)="changeOrderby('user')">
Claimed by
</th>
<th [class]="sortby != 'date'?'sorting':(descending?'sorting_desc':'sorting_asc')"
(click)="changeOrderby('date')">
Claim Date
</th>
<th>Status
<span class="uk-icon"
[attr.uk-tooltip]="'title:<div class=\'uk-margin uk-padding-small\'>Status declares if the link information is available in the portal and the APIs<br> If it is pending, the information will be added in the next content provision workflow.</div>'">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="info" ratio="1"><path
d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle
fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span>
</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let claim of claims ">
<td *ngIf="enableDelete"><input [id]="claim.id" type="checkbox" (click)="select(claim,$event)"
[ngModel]="isSelected(claim.id)"/></td>
<!-- <td></td>-->
<td>
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
[externalPortalUrl]=externalPortalUrl></claim-entity>
</td>
<td>
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [properties]=properties
[externalPortalUrl]=externalPortalUrl></claim-entity>
</td>
<td *ngIf="showUserEmail">{{claim.userMail}}</td>
<td>{{claim.date}}</td>
<td>
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success">available</span>
<ng-template #notAvailable><span class="uk-label uk-label-warning">pending</span></ng-template>
<!-- <span class="uk-icon"-->
<!-- [attr.uk-tooltip]="'title:<div class=\'uk-margin-small\'>'+isClaimAvailable(claim)+'</div>'">-->
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="question"-->
<!-- ratio="1">-->
<!-- <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle><circle cx="10.44"-->
<!-- cy="14.42"-->
<!-- r="1.05"></circle><path-->
<!-- fill="none" stroke="#000" stroke-width="1.2"-->
<!-- d="M8.17,7.79 C8.17,4.75 12.72,4.73 12.72,7.72 C12.72,8.67 11.81,9.15 11.23,9.75 C10.75,10.24 10.51,10.73 10.45,11.4 C10.44,11.53 10.43,11.64 10.43,11.75"></path></svg>-->
<!-- </span>-->
</td>
</tr>
</tbody>
</table>
</div>
<div class="portal-hr uk-margin-top">
<div class="uk-grid ">
<div *ngIf="resultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{resultsNum|number}}</span> links, page <span
class="portal-color">{{page | number}}</span> of <span
class="portal-color">{{totalPages(resultsNum)|number}}</span>
</div>
<div *ngIf="resultsNum" class="uk-width-1-2 ">
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
</div>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0"
[texts]="pageContents['right']" class="uk-width-1-5"></helper>
<!-- <div class="uk-width-1-5">
<div class="uk-card portal-card uk-padding" *ngIf="externalPortalUrl || claimsInfoURL">
<h6 *ngIf="!externalPortalUrl || externalPortalUrl.indexOf('http')==-1" class="uk-h6">
<a class="el-content uk-link-text" routerLink="/participate/claim">Claim more links?</a>
</h6>
<h6 *ngIf="externalPortalUrl && externalPortalUrl.indexOf('http')!=-1" class="uk-h6">
<a class="el-content uk-link-text" [href]="externalPortalUrl+'/participate/claim'"
target="_blank">Claim more links?</a>
</h6>
<h6 *ngIf="claimsInfoURL" class="uk-h6 uk-margin-small-top">
<a class="el-content uk-link-text" [href]="claimsInfoURL" target="_blank">Learn more</a>
</h6>
</div>
<helper position="right" styleName=" uk-width-1-5"></helper>
</div>-->
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
<modal-alert (alertOutput)="confirmClose()">
<h4 class="modal-title uk-text-bold " id="myModalLabel">Are you sure?</h4>
<p>
You are about to delete {{this.selected.length}} link(s) you selected. <br>
<span class="uk-text-bold">
Usually it takes 2-4 weeks for the links to permanently disappear from the Openaire platfrom.
</span>
</p>
<p>Do you want to delete the link(s)?</p>
</modal-alert>
<modal-loading [message]="'Please wait...'"></modal-loading>