]>
Commit | Line | Data |
---|---|---|
ab998f7b C |
1 | <p-table |
2 | [value]="blacklist" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
26b7305a | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" |
2bc9bd08 | 4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
45c14ae1 | 5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} blacklisted videos" |
ab998f7b C |
6 | > |
7 | <ng-template pTemplate="header"> | |
8 | <tr> | |
26b7305a | 9 | <th style="width: 40px"></th> |
2bc9bd08 | 10 | <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th> |
aeb1bed9 | 11 | <th style="width: 100px;" i18n>Sensitive</th> |
2bc9bd08 | 12 | <th style="width: 120px;" i18n>Unfederated</th> |
9b4241e3 | 13 | <th style="width: 190px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> |
af5767ff | 14 | <th style="width: 120px;"></th> |
ab998f7b C |
15 | </tr> |
16 | </ng-template> | |
17 | ||
26b7305a | 18 | <ng-template pTemplate="body" let-videoBlacklist let-expanded="expanded"> |
ab998f7b | 19 | <tr> |
2bc9bd08 RK |
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"> | |
26b7305a C |
23 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> |
24 | </span> | |
25 | </td> | |
26 | ||
191764f3 | 27 | <td> |
aeb1bed9 RK |
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> | |
191764f3 C |
41 | </a> |
42 | </td> | |
43 | ||
5fd4ca00 RK |
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> | |
26b7305a | 54 | |
ab998f7b | 55 | <td class="action-cell"> |
4707f410 | 56 | <my-action-dropdown i18n-label placement="bottom-right" label="Actions" [actions]="videoBlacklistActions" [entry]="videoBlacklist"></my-action-dropdown> |
26b7305a C |
57 | </td> |
58 | </tr> | |
59 | </ng-template> | |
60 | ||
61 | <ng-template pTemplate="rowexpansion" let-videoBlacklist> | |
83b5fe9c | 62 | <tr> |
d6af8146 RK |
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> | |
ab998f7b C |
66 | </td> |
67 | </tr> | |
68 | </ng-template> | |
69 | </p-table> | |
70 |