blob: 7e92ced540ee3c047a5d006bdc2d4a387943013a (
plain) (
tree)
|
|
<div class="row">
<div class="content-padding">
<h3>Friends list</h3>
<p-dataTable
[value]="friends" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
sortField="id" (onLazyLoad)="loadLazy($event)"
>
<p-column field="id" header="ID" [sortable]="true"></p-column>
<p-column field="host" header="Host" [sortable]="true"></p-column>
<p-column field="email" header="Email"></p-column>
<p-column field="score" header="Score" [sortable]="true"></p-column>
<p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
<p-column header="Delete" styleClass="action-cell">
<ng-template pTemplate="body" let-pod="rowData">
<span (click)="removeFriend(pod)" class="glyphicon glyphicon-remove glyphicon-black" title="Remove this pod"></span>
</ng-template>
</p-column>
</p-dataTable>
<a *ngIf="hasFriends()" class="btn btn-danger pull-left" (click)="quitFriends()">
Quit friends
</a>
<a *ngIf="!hasFriends()" class="btn btn-success pull-right" [routerLink]="[ '/admin/friends/add' ]">
Make friends
</a>
</div>
</div>
|