]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.html
Improve admin tables
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / video-blacklist / video-blacklist-list / video-blacklist-list.component.html
index 942f7c9f100f378ee83b72b2a3bc8a7e430fb2b1..ac30cec3984e38a1e0d18d6b4d019d437d1e12f5 100644 (file)
@@ -1,23 +1,35 @@
-<div class="row">
-  <div class="content-padding">
-    <h3>Blacklisted videos</h3>
-
-    <p-dataTable
-      [value]="blacklist" [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="name" header="Name" [sortable]="true"></p-column>
-      <p-column field="description" header="Description"></p-column>
-      <p-column field="views" header="Views" [sortable]="true"></p-column>
-      <p-column field="nsfw" header="NSFW"></p-column>
-      <p-column field="uuid" header="UUID" [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-entry="rowData">
-          <my-delete-button (click)="removeVideoFromBlacklist(entry)"></my-delete-button>
-        </ng-template>
-      </p-column>
-    </p-dataTable>
-  </div>
+<div class="admin-sub-header">
+  <div class="admin-sub-title">Blacklisted videos</div>
 </div>
+
+<p-table
+  [value]="blacklist" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
+  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
+>
+  <ng-template pTemplate="header">
+    <tr>
+      <th pSortableColumn="name">Name <p-sortIcon field="name"></p-sortIcon></th>
+      <th>Description</th>
+      <th pSortableColumn="views">Views <p-sortIcon field="views"></p-sortIcon></th>
+      <th>NSFW</th>
+      <th>UUID</th>
+      <th pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
+      <th></th>
+    </tr>
+  </ng-template>
+
+  <ng-template pTemplate="body" let-videoBlacklist>
+    <tr>
+      <td>{{ videoBlacklist.name }}</td>
+      <td>{{ videoBlacklist.description }}</td>
+      <td>{{ videoBlacklist.views }}</td>
+      <td>{{ videoBlacklist.nsfw }}</td>
+      <td>{{ videoBlacklist.uuid }}</td>
+      <td>{{ videoBlacklist.createdAt }}</td>
+      <td class="action-cell">
+        <my-delete-button label="Unblacklist" (click)="removeVideoFromBlacklist(videoBlacklist)"></my-delete-button>
+      </td>
+    </tr>
+  </ng-template>
+</p-table>
+