]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/users/user-list/user-list.component.html
Add i18n attributes
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / users / user-list / user-list.component.html
index 36193d119c162b2847629f0c2a0477f642bc5d24..166fafef0ff8064dc4b899105d0fce2cae8a7a19 100644 (file)
@@ -1,28 +1,38 @@
-<h3>Users list</h3>
+<div class="admin-sub-header">
+  <div i18n class="form-sub-title">Users list</div>
 
-<table class="table table-hover">
-  <thead>
+  <a class="add-button" routerLink="/admin/users/create">
+    <span class="icon icon-add"></span>
+    <ng-container i18n>Create user</ng-container>
+  </a>
+</div>
+
+<p-table
+  [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
+  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
+>
+  <ng-template pTemplate="header">
     <tr>
-      <th class="table-column-id">ID</th>
-      <th>Username</th>
-      <th>Created Date</th>
-      <th class="text-right">Remove</th>
+      <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th>
+      <th i18n>Email</th>
+      <th i18n>Video quota</th>
+      <th i18n>Role</th>
+      <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
+      <th></th>
     </tr>
-  </thead>
+  </ng-template>
 
-  <tbody>
-    <tr *ngFor="let user of users">
-      <td>{{ user.id }}</td>
+  <ng-template pTemplate="body" let-user>
+    <tr>
       <td>{{ user.username }}</td>
-      <td>{{ user.createdAt | date: 'medium' }}</td>
-      <td class="text-right">
-        <span class="glyphicon glyphicon-remove" *ngIf="!user.isAdmin()" (click)="removeUser(user)"></span>
+      <td>{{ user.email }}</td>
+      <td>{{ user.videoQuota }}</td>
+      <td>{{ user.roleLabel }}</td>
+      <td>{{ user.createdAt }}</td>
+      <td class="action-cell">
+        <my-edit-button [routerLink]="getRouterUserEditLink(user)"></my-edit-button>
+        <my-delete-button (click)="removeUser(user)"></my-delete-button>
       </td>
     </tr>
-  </tbody>
-</table>
-
-<a class="add-user btn btn-success pull-right" [routerLink]="['/admin/users/add']">
-  <span class="glyphicon glyphicon-plus"></span>
-  Add user
-</a>
+  </ng-template>
+</p-table>