]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/friends/friend-list/friend-list.component.html
Move to HttpClient and PrimeNG data table
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / friends / friend-list / friend-list.component.html
index e15ecde14918fb2d2fd3568d8da478ae1f4186a8..7887bc5e3ae5131f00305ad630bf379b4b03dc65 100644 (file)
@@ -1,11 +1,26 @@
-<h3>Friends list</h3>
+<div class="row">
+  <div class="content-padding">
+    <h3>Friends list</h3>
 
-<ng2-smart-table [settings]="tableSettings" [source]="friendsSource"></ng2-smart-table>
+    <p-dataTable [value]="friends">
+      <p-column field="id" header="ID"></p-column>
+      <p-column field="host" header="Host"></p-column>
+      <p-column field="email" header="Email"></p-column>
+      <p-column field="score" header="Score"></p-column>
+      <p-column field="createdAt" header="Created date"></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-danger pull-left" (click)="quitFriends()">
+      Quit friends
+    </a>
 
-<a *ngIf="!hasFriends()" class="btn btn-success pull-right" [routerLink]="['/admin/friends/add']">
-  Make friends
-</a>
+    <a *ngIf="!hasFriends()" class="btn btn-success pull-right" [routerLink]="[ '/admin/friends/add' ]">
+      Make friends
+    </a>
+  </div>
+</div>