-<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>