]>
Commit | Line | Data |
---|---|---|
1 | <p-table | |
2 | [value]="blacklist" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | |
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | |
5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} blacklisted videos" | |
6 | > | |
7 | <ng-template pTemplate="header"> | |
8 | <tr> | |
9 | <th style="width: 40px"></th> | |
10 | <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th> | |
11 | <th style="width: 100px;" i18n>Sensitive</th> | |
12 | <th style="width: 120px;" i18n>Unfederated</th> | |
13 | <th style="width: 190px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> | |
14 | <th style="width: 120px;"></th> | |
15 | </tr> | |
16 | </ng-template> | |
17 | ||
18 | <ng-template pTemplate="body" let-videoBlacklist let-expanded="expanded"> | |
19 | <tr> | |
20 | <td *ngIf="!videoBlacklist.reason"></td> | |
21 | <td *ngIf="videoBlacklist.reason" class="expand-cell c-hand" [pRowToggler]="videoBlacklist" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | |
22 | <span class="expander"> | |
23 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | |
24 | </span> | |
25 | </td> | |
26 | ||
27 | <td> | |
28 | <a [href]="getVideoUrl(videoBlacklist)" class="video-table-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer"> | |
29 | <div class="video-table-video"> | |
30 | <div class="video-table-video-image"> | |
31 | <img [src]="videoBlacklist.video.thumbnailPath"> | |
32 | </div> | |
33 | <div class="video-table-video-text"> | |
34 | <div> | |
35 | {{ videoBlacklist.video.name }} | |
36 | <span class="glyphicon glyphicon-new-window"></span> | |
37 | </div> | |
38 | <div class="text-muted">by {{ videoBlacklist.video.channel?.displayName }} on {{ videoBlacklist.video.channel?.host }} </div> | |
39 | </div> | |
40 | </div> | |
41 | </a> | |
42 | </td> | |
43 | ||
44 | <ng-container *ngIf="videoBlacklist.reason"> | |
45 | <td class="c-hand" [pRowToggler]="videoBlacklist">{{ booleanToText(videoBlacklist.video.nsfw) }}</td> | |
46 | <td class="c-hand" [pRowToggler]="videoBlacklist">{{ booleanToText(videoBlacklist.unfederated) }}</td> | |
47 | <td class="c-hand" [pRowToggler]="videoBlacklist">{{ videoBlacklist.createdAt }}</td> | |
48 | </ng-container> | |
49 | <ng-container *ngIf="!videoBlacklist.reason"> | |
50 | <td>{{ booleanToText(videoBlacklist.video.nsfw) }}</td> | |
51 | <td>{{ booleanToText(videoBlacklist.unfederated) }}</td> | |
52 | <td>{{ videoBlacklist.createdAt }}</td> | |
53 | </ng-container> | |
54 | ||
55 | <td class="action-cell"> | |
56 | <my-action-dropdown i18n-label placement="bottom-right" label="Actions" [actions]="videoBlacklistActions" [entry]="videoBlacklist"></my-action-dropdown> | |
57 | </td> | |
58 | </tr> | |
59 | </ng-template> | |
60 | ||
61 | <ng-template pTemplate="rowexpansion" let-videoBlacklist> | |
62 | <tr> | |
63 | <td class="expand-cell" colspan="6"> | |
64 | <span class="col-2 moderation-expanded-label" i18n>Blacklist reason:</span> | |
65 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoBlacklist.reasonHtml"></span> | |
66 | </td> | |
67 | </tr> | |
68 | </ng-template> | |
69 | </p-table> | |
70 |