explore-services/src/app/claims/claims.component.html

92 lines
3.5 KiB
HTML

<h1>Claims</h1>
<h3>Filter claims by type:</h3>
<form>
<select [(ngModel)]="fetchBy">
<option *ngFor="let type of types" [value]="type">{{type}}</option>
</select>
<input type="text" [(ngModel)]="fetchId" />
<button class="btn btn-default" type = "submit" (click)="goTo()">Fetch</button>
</form>
<!--<div class="col-md-4">
<input type="text" #listFilter (keyup)="0" />
</div>-->
<div>
<div *ngIf="selected.length>0">
<p>You have selected {{selected.length}} claim(s)</p>
</div>
<button class="btn btn-default" (click)="selectAll()">Select All</button> <button class="btn btn-default" (click)="deselectAll()">Deselect All</button> <button class="btn btn-default" (click)="delete()">Delete</button>
</div>
<div *ngIf="resultsNum">
<paging [currentPage]="page" [totalResults]="resultsNum" [navigateTo]="navigateTo" [size]="size" [params]="getParameters()" > </paging>
</div>
<p *ngIf="resultsNum == 0" >No entries found.</p>
<p *ngIf="resultsNum>0" >Showing {{(size*page - size +1)}} to {{(size*page>resultsNum)?resultsNum:(size*page)}} of {{resultsNum}} entries</p>
<p *ngIf="resultsNum>size*page">Show
<select [(ngModel)]="size" (ngModelChange)="goTo()">
<option *ngIf="resultsNum > 10" [ngValue]="10">10</option>
<option *ngIf="resultsNum > 20" [ngValue]="20">20</option>
<option *ngIf="resultsNum > 30" [ngValue]="30">30</option>
<option *ngIf="resultsNum > 50" [ngValue]="50">50</option>
</select>
</p>
<div>
<div class="col-md-2">Filter Results by:</div>
<div class="col-md-4">
<form>
<input type="text" [(ngModel)]="inputkeyword" />
<button type = "submit" class="btn btn-primary" (click)="changekeyword()">Filter</button>
</form>
</div>
<div class="col-md-4" >
<label>
<input [(ngModel)]="projectCB" type="checkbox" (ngModelChange)="changeType()" />
Project
</label>
<label>
<input [(ngModel)]="publicationCB" type="checkbox" (ngModelChange)="changeType()" />
Publication
</label>
<label>
<input [(ngModel)]="datasetCB" type="checkbox" (ngModelChange)="changeType()" />
Dataset
</label>
<label>
<input [(ngModel)]="contextCB" type="checkbox" (ngModelChange)="changeType()" />
Context
</label>
<button class="btn btn-primary" (click)="clearFilters()">Clear filters</button>
</div>
</div>
<div class="">
<table *ngIf="claims" class="table table-striped">
<thead>
<tr>
<th></th>
<!--<th>Id</th>
<th>Source type</th> -->
<th><a (click)="changeOrderby('source')" >Source</a> </th>
<!-- <th>Target Type</th> -->
<th><a (click)="changeOrderby('target')" >Target</a> </th>
<th><a (click)="changeOrderby('user')" >Claimed by</a> </th>
<th><a (click)="changeOrderby('date')"> Claimed Date</a></th>
</tr>
</thead>
<tbody>
<!--<tr *ngFor="let claim of claims | claimTextFilter:textFilter | claimTypeFilter:publicationCB:datasetCB:projectCB:contextCB " >-->
<tr *ngFor="let claim of claims " >
<td><input [id]="claim.id" type="checkbox" (click)="select(claim,$event)" [ngModel]="selectAllClaims"/></td>
<!--<td><a (click)="goToClaim((claim.id))">{{claim.id}}</a></td>
<td>{{claim.sourceType}}</td> -->
<td><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
<!--<td>{{claim.targetType}}</td> -->
<td><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
<td>{{claim.userMail}}</td>
<td>{{claim.date}}</td>
</tr>
</tbody>
</table>
</div>