]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html
More secure target blank links
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / video-abuses / video-abuse-list / video-abuse-list.component.html
index 46043577c96b9bc1e38ba2da19585dec4aa083d6..13a5b1117d510ee9a2349e304da509f42964b56e 100644 (file)
@@ -1,27 +1,34 @@
-<h3>Video abuses list</h3>
+<div class="admin-sub-header">
+  <div class="admin-sub-title">Video abuses list</div>
+</div>
 
-<table class="table table-hover">
-  <thead>
+<p-table
+  [value]="videoAbuses" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
+  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
+>
+  <ng-template pTemplate="header">
     <tr>
-      <th class="cell-id">ID</th>
-      <th class="cell-reason">Reason</th>
-      <th>Reporter pod host</th>
-      <th>Reporter username</th>
+      <th>Reason</th>
+      <th>Reporter</th>
+      <th pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
       <th>Video</th>
-      <th>Created at</th>
     </tr>
-  </thead>
+  </ng-template>
 
-  <tbody>
-    <tr *ngFor="let videoAbuse of videoAbuses">
-      <td>{{ videoAbuse.id }}</td>
+  <ng-template pTemplate="body" let-videoAbuse>
+    <tr>
       <td>{{ videoAbuse.reason }}</td>
-      <td>{{ videoAbuse.reporterPodHost }}</td>
-      <td>{{ videoAbuse.reporterUsername }}</td>
       <td>
-        <a [routerLink]="buildVideoLink(videoAbuse)" title="Go to video">{{ videoAbuse.videoId }}</a>
+        <a [href]="videoAbuse.reporterAccount.url" title="Go to the account" target="_blank" rel="noopener noreferrer">
+          {{ createByString(videoAbuse.reporterAccount) }}
+        </a>
+      </td>
+      <td>{{ videoAbuse.createdAt }}</td>
+      <td>
+        <a [href]="videoAbuse.video.url" title="Go to the video" target="_blank" rel="noopener noreferrer">
+          {{ videoAbuse.video.name }}
+        </a>
       </td>
-      <td>{{ videoAbuse.createdAt | date: 'medium' }}</td>
     </tr>
-  </tbody>
-</table>
+  </ng-template>
+</p-table>