]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/friends/friend-list/friend-list.component.html
Client: replace simple tables by ng2 smart table component
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / friends / friend-list / friend-list.component.html
index 06258f8c8a20f20e7f51a0161be27e892fcd21c6..254d0c65e34cead3498dda00d518ccfb757e8983 100644 (file)
@@ -1,29 +1,11 @@
 <h3>Friends list</h3>
 
-<table class="table table-hover">
-  <thead>
-    <tr>
-      <th class="table-column-id">ID</th>
-      <th>Host</th>
-      <th>Score</th>
-      <th>Created Date</th>
-    </tr>
-  </thead>
+<ng2-smart-table [settings]="tableSettings" [source]="friendsSource"></ng2-smart-table>
 
-  <tbody>
-    <tr *ngFor="let friend of friends">
-      <td>{{ friend.id }}</td>
-      <td>{{ friend.host }}</td>
-      <td>{{ friend.score }}</td>
-      <td>{{ friend.createdAt | date: 'medium' }}</td>
-    </tr>
-  </tbody>
-</table>
-
-<a *ngIf="friends && friends.length !== 0" class="add-user btn btn-danger pull-left" (click)="quitFriends()">
+<a *ngIf="hasFriends()" class="add-user btn btn-danger pull-left" (click)="quitFriends()">
   Quit friends
 </a>
 
-<a *ngIf="friends?.length === 0" class="add-user btn btn-success pull-right" [routerLink]="['/admin/friends/add']">
+<a *ngIf="!hasFriends()" class="add-user btn btn-success pull-right" [routerLink]="['/admin/friends/add']">
   Make friends
 </a>