]>
Commit | Line | Data |
---|---|---|
1 | <h1> | |
2 | <my-global-icon iconName="cross" aria-hidden="true"></my-global-icon> | |
3 | <ng-container i18n>Video blocks</ng-container> | |
4 | </h1> | |
5 | ||
6 | <p-table | |
7 | [value]="blocklist" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | |
8 | [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" | |
9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" | |
10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | |
11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} blocked videos" | |
12 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" | |
13 | > | |
14 | <ng-template pTemplate="caption"> | |
15 | <div class="caption"> | |
16 | <div class="ml-auto"> | |
17 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> | |
18 | </div> | |
19 | </div> | |
20 | </ng-template> | |
21 | ||
22 | <ng-template pTemplate="header"> | |
23 | <tr> | |
24 | <th style="width: 40px;"></th> | |
25 | <th style="width: 150px;"></th> | |
26 | <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th> | |
27 | <th style="width: 100px;" i18n>Sensitive</th> | |
28 | <th style="width: 120px;" i18n>Unfederated</th> | |
29 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> | |
30 | </tr> | |
31 | </ng-template> | |
32 | ||
33 | <ng-template pTemplate="body" let-videoBlock let-expanded="expanded"> | |
34 | <tr> | |
35 | <td *ngIf="!videoBlock.reason"></td> | |
36 | <td class="expand-cell" *ngIf="videoBlock.reason" [pRowToggler]="videoBlock"> | |
37 | <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon> | |
38 | </td> | |
39 | ||
40 | <td class="action-cell"> | |
41 | <my-action-dropdown | |
42 | [ngClass]="{ 'show': expanded }" placement="bottom-right auto" container="body" | |
43 | i18n-label label="Actions" [actions]="videoBlocklistActions" [entry]="videoBlock" | |
44 | ></my-action-dropdown> | |
45 | </td> | |
46 | ||
47 | <td> | |
48 | <my-video-cell [video]="videoBlock.video"> | |
49 | <span name> | |
50 | <my-global-icon *ngIf="videoBlock.type === 2" i18n-title title="The video was blocked due to automatic blocking of new videos" iconName="robot"></my-global-icon> | |
51 | </span> | |
52 | </my-video-cell> | |
53 | </td> | |
54 | ||
55 | <td> | |
56 | <span *ngIf="videoBlock.video.nsfw" class="badge badge-red" i18n>NSFW</span> | |
57 | </td> | |
58 | ||
59 | <td> | |
60 | <span *ngIf="videoBlock.unfederated" class="badge badge-blue" i18n>Unfederated</span> | |
61 | </td> | |
62 | ||
63 | <td> | |
64 | {{ videoBlock.createdAt | date: 'short' }} | |
65 | </td> | |
66 | </tr> | |
67 | </ng-template> | |
68 | ||
69 | <ng-template pTemplate="rowexpansion" let-videoBlock> | |
70 | <tr> | |
71 | <td class="expand-cell" colspan="6"> | |
72 | <div class="d-flex moderation-expanded"> | |
73 | ||
74 | <div class="left"> | |
75 | <span class="moderation-expanded-label" i18n>Block reason:</span> | |
76 | <span class="moderation-expanded-text" [innerHTML]="videoBlock.reasonHtml"></span> | |
77 | </div> | |
78 | ||
79 | <div class="right"> | |
80 | <my-embed [video]="videoBlock.video"></my-embed> | |
81 | </div> | |
82 | ||
83 | </div> | |
84 | </td> | |
85 | </tr> | |
86 | </ng-template> | |
87 | ||
88 | <ng-template pTemplate="emptymessage"> | |
89 | <tr> | |
90 | <td colspan="6"> | |
91 | <div class="no-results"> | |
92 | <ng-container *ngIf="search" i18n>No blocked video found matching current filters.</ng-container> | |
93 | <ng-container *ngIf="!search" i18n>No blocked video found.</ng-container> | |
94 | </div> | |
95 | </td> | |
96 | </tr> | |
97 | </ng-template> | |
98 | </p-table> | |
99 |