]>
Commit | Line | Data |
---|---|---|
ab998f7b | 1 | <p-table |
b8cf27c0 | 2 | [value]="blacklist" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
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" |
d4051183 | 6 | (onPage)="onPage()" [expandedRowKeys]="expandedRows" |
ab998f7b | 7 | > |
e0a92917 RK |
8 | <ng-template pTemplate="caption"> |
9 | <div class="caption"> | |
10 | <div class="ml-auto"> | |
11 | <input | |
12 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
13 | (keyup)="onSearch($event)" | |
14 | > | |
15 | </div> | |
16 | </div> | |
17 | </ng-template> | |
18 | ||
ab998f7b C |
19 | <ng-template pTemplate="header"> |
20 | <tr> | |
26b7305a | 21 | <th style="width: 40px"></th> |
2bc9bd08 | 22 | <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th> |
aeb1bed9 | 23 | <th style="width: 100px;" i18n>Sensitive</th> |
2bc9bd08 | 24 | <th style="width: 120px;" i18n>Unfederated</th> |
7f979fd8 | 25 | <th style="width: 140px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> |
af5767ff | 26 | <th style="width: 120px;"></th> |
ab998f7b C |
27 | </tr> |
28 | </ng-template> | |
29 | ||
26b7305a | 30 | <ng-template pTemplate="body" let-videoBlacklist let-expanded="expanded"> |
ab998f7b | 31 | <tr> |
2bc9bd08 RK |
32 | <td *ngIf="!videoBlacklist.reason"></td> |
33 | <td *ngIf="videoBlacklist.reason" class="expand-cell c-hand" [pRowToggler]="videoBlacklist" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | |
34 | <span class="expander"> | |
26b7305a C |
35 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> |
36 | </span> | |
37 | </td> | |
38 | ||
191764f3 | 39 | <td> |
aeb1bed9 RK |
40 | <a [href]="getVideoUrl(videoBlacklist)" class="video-table-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer"> |
41 | <div class="video-table-video"> | |
42 | <div class="video-table-video-image"> | |
43 | <img [src]="videoBlacklist.video.thumbnailPath"> | |
44 | </div> | |
45 | <div class="video-table-video-text"> | |
46 | <div> | |
47 | {{ videoBlacklist.video.name }} | |
e0a92917 | 48 | <span i18n-title title="Video was blacklisted" class="glyphicon glyphicon-ban-circle"></span> |
aeb1bed9 RK |
49 | </div> |
50 | <div class="text-muted">by {{ videoBlacklist.video.channel?.displayName }} on {{ videoBlacklist.video.channel?.host }} </div> | |
51 | </div> | |
52 | </div> | |
191764f3 C |
53 | </a> |
54 | </td> | |
55 | ||
5fd4ca00 RK |
56 | <ng-container *ngIf="videoBlacklist.reason"> |
57 | <td class="c-hand" [pRowToggler]="videoBlacklist">{{ booleanToText(videoBlacklist.video.nsfw) }}</td> | |
58 | <td class="c-hand" [pRowToggler]="videoBlacklist">{{ booleanToText(videoBlacklist.unfederated) }}</td> | |
7f979fd8 | 59 | <td class="c-hand" [pRowToggler]="videoBlacklist">{{ videoBlacklist.createdAt | date: 'short' }}</td> |
5fd4ca00 RK |
60 | </ng-container> |
61 | <ng-container *ngIf="!videoBlacklist.reason"> | |
62 | <td>{{ booleanToText(videoBlacklist.video.nsfw) }}</td> | |
63 | <td>{{ booleanToText(videoBlacklist.unfederated) }}</td> | |
7f979fd8 | 64 | <td>{{ videoBlacklist.createdAt | date: 'short' }}</td> |
5fd4ca00 | 65 | </ng-container> |
26b7305a | 66 | |
ab998f7b | 67 | <td class="action-cell"> |
e0a92917 RK |
68 | <my-action-dropdown |
69 | [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body" | |
70 | i18n-label label="Actions" [actions]="videoBlacklistActions" [entry]="videoBlacklist" | |
71 | ></my-action-dropdown> | |
26b7305a C |
72 | </td> |
73 | </tr> | |
74 | </ng-template> | |
75 | ||
76 | <ng-template pTemplate="rowexpansion" let-videoBlacklist> | |
83b5fe9c | 77 | <tr> |
d6af8146 | 78 | <td class="expand-cell" colspan="6"> |
e0a92917 RK |
79 | <div class="d-flex moderation-expanded"> |
80 | <span class="col-2 moderation-expanded-label" i18n>Blacklist reason:</span> | |
81 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoBlacklist.reasonHtml"></span> | |
82 | </div> | |
ab998f7b C |
83 | </td> |
84 | </tr> | |
85 | </ng-template> | |
d3840613 RK |
86 | |
87 | <ng-template pTemplate="emptymessage"> | |
88 | <tr> | |
89 | <td colspan="6"> | |
90 | <div class="empty-table-message"> | |
91 | <ng-container *ngIf="search" i18n>No blacklisted video found matching current filters.</ng-container> | |
92 | <ng-container *ngIf="!search" i18n>No blacklisted video found.</ng-container> | |
93 | </div> | |
94 | </td> | |
95 | </tr> | |
96 | </ng-template> | |
ab998f7b C |
97 | </p-table> |
98 |