]>
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 RK |
6 | <p-table |
7 | [value]="blocklist" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | |
8 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | |
9 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | |
10 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} blocked videos" | |
11 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" | |
12 | > | |
13 | <ng-template pTemplate="caption"> | |
14 | <div class="caption"> | |
15 | <div class="ml-auto"> | |
16 | <div class="input-group has-feedback has-clear"> | |
17 | <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body"> | |
18 | <div class="input-group-text" ngbDropdownToggle> | |
19 | <span class="caret" aria-haspopup="menu" role="button"></span> | |
20 | </div> | |
21 | ||
22 | <div role="menu" ngbDropdownMenu> | |
23 | <h6 class="dropdown-header" i18n>Advanced block filters</h6> | |
24 | <a [routerLink]="[ '/admin/moderation/video-blocks/list' ]" [queryParams]="{ 'search': 'type:auto' }" class="dropdown-item" i18n>Automatic blocks</a> | |
25 | <a [routerLink]="[ '/admin/moderation/video-blocks/list' ]" [queryParams]="{ 'search': 'type:manual' }" class="dropdown-item" i18n>Manual blocks</a> | |
26 | </div> | |
27 | </div> | |
28 | <input | |
29 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
30 | (keyup)="onBlockSearch($event)" | |
31 | > | |
32 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a> | |
33 | <span class="sr-only" i18n>Clear filters</span> | |
34 | </div> | |
35 | </div> | |
36 | </div> | |
37 | </ng-template> | |
38 | ||
39 | <ng-template pTemplate="header"> | |
40 | <tr> | |
41 | <th style="width: 40px"></th> | |
42 | <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th> | |
43 | <th style="width: 100px;" i18n>Sensitive</th> | |
44 | <th style="width: 120px;" i18n>Unfederated</th> | |
45 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> | |
46 | <th style="width: 150px;"></th> | |
47 | </tr> | |
48 | </ng-template> | |
49 | ||
50 | <ng-template pTemplate="body" let-videoBlock let-expanded="expanded"> | |
51 | <tr> | |
52 | <td *ngIf="!videoBlock.reason"></td> | |
53 | <td *ngIf="videoBlock.reason" class="expand-cell c-hand" [pRowToggler]="videoBlock" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | |
54 | <span class="expander"> | |
55 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | |
56 | </span> | |
57 | </td> | |
58 | ||
59 | <td> | |
7dfe3528 | 60 | <a [href]="getVideoUrl(videoBlock)" class="video-table-video-link" [title]="videoBlock.video.name" target="_blank" rel="noopener noreferrer"> |
5baee5fc RK |
61 | <div class="video-table-video"> |
62 | <div class="video-table-video-image"> | |
63 | <img [src]="videoBlock.video.thumbnailPath"> | |
64 | </div> | |
65 | <div class="video-table-video-text"> | |
66 | <div> | |
67 | <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> | |
68 | {{ videoBlock.video.name }} | |
69 | </div> | |
70 | <div class="text-muted">by {{ videoBlock.video.channel?.displayName }} on {{ videoBlock.video.channel?.host }} </div> | |
71 | </div> | |
72 | </div> | |
73 | </a> | |
74 | </td> | |
75 | ||
76 | <ng-container *ngIf="videoBlock.reason"> | |
77 | <td class="c-hand" [pRowToggler]="videoBlock">{{ booleanToText(videoBlock.video.nsfw) }}</td> | |
78 | <td class="c-hand" [pRowToggler]="videoBlock">{{ booleanToText(videoBlock.unfederated) }}</td> | |
79 | <td class="c-hand" [pRowToggler]="videoBlock">{{ videoBlock.createdAt | date: 'short' }}</td> | |
80 | </ng-container> | |
81 | <ng-container *ngIf="!videoBlock.reason"> | |
82 | <td>{{ booleanToText(videoBlock.video.nsfw) }}</td> | |
83 | <td>{{ booleanToText(videoBlock.unfederated) }}</td> | |
84 | <td>{{ videoBlock.createdAt | date: 'short' }}</td> | |
85 | </ng-container> | |
86 | ||
87 | <td class="action-cell"> | |
88 | <my-action-dropdown | |
89 | [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body" | |
90 | i18n-label label="Actions" [actions]="videoBlocklistActions" [entry]="videoBlock" | |
91 | ></my-action-dropdown> | |
92 | </td> | |
93 | </tr> | |
94 | </ng-template> | |
95 | ||
96 | <ng-template pTemplate="rowexpansion" let-videoBlock> | |
97 | <tr> | |
98 | <td class="expand-cell" colspan="6"> | |
99 | <div class="d-flex moderation-expanded"> | |
100 | <span class="col-2 moderation-expanded-label" i18n>Block reason:</span> | |
101 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoBlock.reasonHtml"></span> | |
102 | </div> | |
103 | </td> | |
104 | </tr> | |
105 | </ng-template> | |
106 | ||
107 | <ng-template pTemplate="emptymessage"> | |
108 | <tr> | |
109 | <td colspan="6"> | |
22839330 | 110 | <div class="no-results"> |
5baee5fc RK |
111 | <ng-container *ngIf="search" i18n>No blocked video found matching current filters.</ng-container> |
112 | <ng-container *ngIf="!search" i18n>No blocked video found.</ng-container> | |
113 | </div> | |
114 | </td> | |
115 | </tr> | |
116 | </ng-template> | |
117 | </p-table> | |
118 |