]>
Commit | Line | Data |
---|---|---|
ed5bb517 K |
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 | ||
5baee5fc | 6 | <p-table |
2e46eb97 C |
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" | |
5baee5fc RK |
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"> | |
2e46eb97 | 17 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> |
5baee5fc RK |
18 | </div> |
19 | </div> | |
20 | </ng-template> | |
21 | ||
22 | <ng-template pTemplate="header"> | |
23 | <tr> | |
24 | <th style="width: 40px"></th> | |
7706b370 | 25 | <th style="width: 150px;"></th> |
5baee5fc RK |
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> | |
5baee5fc RK |
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 *ngIf="videoBlock.reason" class="expand-cell c-hand" [pRowToggler]="videoBlock" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | |
37 | <span class="expander"> | |
38 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | |
39 | </span> | |
40 | </td> | |
41 | ||
7706b370 C |
42 | <td class="action-cell"> |
43 | <my-action-dropdown | |
44 | [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body" | |
45 | i18n-label label="Actions" [actions]="videoBlocklistActions" [entry]="videoBlock" | |
46 | ></my-action-dropdown> | |
47 | </td> | |
48 | ||
5baee5fc | 49 | <td> |
71ab65d0 RK |
50 | <a [href]="getVideoUrl(videoBlock)" class="table-video-link" [title]="videoBlock.video.name" target="_blank" rel="noopener noreferrer"> |
51 | <div class="table-video"> | |
52 | <div class="table-video-image"> | |
5baee5fc RK |
53 | <img [src]="videoBlock.video.thumbnailPath"> |
54 | </div> | |
71ab65d0 | 55 | <div class="table-video-text"> |
5baee5fc RK |
56 | <div> |
57 | <my-global-icon i18n-title title="The video was blocked due to automatic blocking of new videos" *ngIf="videoBlock.type == 2" iconName="robot"></my-global-icon> | |
58 | {{ videoBlock.video.name }} | |
59 | </div> | |
60 | <div class="text-muted">by {{ videoBlock.video.channel?.displayName }} on {{ videoBlock.video.channel?.host }} </div> | |
61 | </div> | |
62 | </div> | |
63 | </a> | |
64 | </td> | |
65 | ||
c195975c C |
66 | <td> |
67 | <span *ngIf="videoBlock.video.nsfw" class="badge badge-red" i18n>NSFW</span> | |
68 | </td> | |
69 | ||
70 | <td> | |
71 | <span *ngIf="videoBlock.unfederated" class="badge badge-blue" i18n>Unfederated</span> | |
72 | </td> | |
73 | ||
74 | <td> | |
75 | {{ videoBlock.createdAt | date: 'short' }} | |
76 | </td> | |
5baee5fc RK |
77 | </tr> |
78 | </ng-template> | |
79 | ||
80 | <ng-template pTemplate="rowexpansion" let-videoBlock> | |
81 | <tr> | |
82 | <td class="expand-cell" colspan="6"> | |
83 | <div class="d-flex moderation-expanded"> | |
71ab65d0 RK |
84 | |
85 | <!-- block right part (block details) --> | |
86 | <div class="col-8"> | |
87 | <span class="col-3 moderation-expanded-label" i18n>Block reason:</span> | |
88 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoBlock.reasonHtml"></span> | |
89 | </div> | |
90 | ||
91 | <!-- block right part (video embed) --> | |
92 | <div class="col-4"> | |
93 | <div class="screenratio"> | |
94 | <div [innerHTML]="videoBlock.embedHtml"></div> | |
95 | </div> | |
96 | </div> | |
97 | ||
5baee5fc RK |
98 | </div> |
99 | </td> | |
100 | </tr> | |
101 | </ng-template> | |
102 | ||
103 | <ng-template pTemplate="emptymessage"> | |
104 | <tr> | |
105 | <td colspan="6"> | |
22839330 | 106 | <div class="no-results"> |
5baee5fc RK |
107 | <ng-container *ngIf="search" i18n>No blocked video found matching current filters.</ng-container> |
108 | <ng-container *ngIf="!search" i18n>No blocked video found.</ng-container> | |
109 | </div> | |
110 | </td> | |
111 | </tr> | |
112 | </ng-template> | |
113 | </p-table> | |
114 |