diff options
Diffstat (limited to 'client/src/app/+admin/moderation/abuse-list/abuse-list.component.html')
-rw-r--r-- | client/src/app/+admin/moderation/abuse-list/abuse-list.component.html | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html b/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html new file mode 100644 index 000000000..167f32fe6 --- /dev/null +++ b/client/src/app/+admin/moderation/abuse-list/abuse-list.component.html | |||
@@ -0,0 +1,149 @@ | |||
1 | <p-table | ||
2 | [value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | ||
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true" | ||
4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | ||
5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports" | ||
6 | (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" | ||
7 | > | ||
8 | <ng-template pTemplate="caption"> | ||
9 | <div class="caption"> | ||
10 | <div class="ml-auto"> | ||
11 | <div class="input-group has-feedback has-clear"> | ||
12 | <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body"> | ||
13 | <div class="input-group-text" ngbDropdownToggle> | ||
14 | <span class="caret" aria-haspopup="menu" role="button"></span> | ||
15 | </div> | ||
16 | |||
17 | <div role="menu" ngbDropdownMenu> | ||
18 | <h6 class="dropdown-header" i18n>Advanced report filters</h6> | ||
19 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'state:pending' }" class="dropdown-item" i18n>Unsolved reports</a> | ||
20 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'state:accepted' }" class="dropdown-item" i18n>Accepted reports</a> | ||
21 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'state:rejected' }" class="dropdown-item" i18n>Refused reports</a> | ||
22 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'videoIs:blacklisted' }" class="dropdown-item" i18n>Reports with blocked videos</a> | ||
23 | <a [routerLink]="[ '/admin/moderation/abuses/list' ]" [queryParams]="{ 'search': 'videoIs:deleted' }" class="dropdown-item" i18n>Reports with deleted videos</a> | ||
24 | </div> | ||
25 | </div> | ||
26 | <input | ||
27 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | ||
28 | (keyup)="onAbuseSearch($event)" | ||
29 | > | ||
30 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a> | ||
31 | <span class="sr-only" i18n>Clear filters</span> | ||
32 | </div> | ||
33 | </div> | ||
34 | </div> | ||
35 | </ng-template> | ||
36 | |||
37 | <ng-template pTemplate="header"> | ||
38 | <tr> <!-- header --> | ||
39 | <th style="width: 40px;"></th> | ||
40 | <th style="width: 20%;" pResizableColumn i18n>Reporter</th> | ||
41 | <th i18n>Video</th> | ||
42 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | ||
43 | <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th> | ||
44 | <th style="width: 150px;"></th> | ||
45 | </tr> | ||
46 | </ng-template> | ||
47 | |||
48 | <ng-template pTemplate="body" let-expanded="expanded" let-abuse> | ||
49 | <tr> | ||
50 | <td class="c-hand" [pRowToggler]="abuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | ||
51 | <span class="expander"> | ||
52 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | ||
53 | </span> | ||
54 | </td> | ||
55 | |||
56 | <td> | ||
57 | <a [href]="abuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | ||
58 | <div class="chip two-lines"> | ||
59 | <img | ||
60 | class="avatar" | ||
61 | [src]="abuse.reporterAccount.avatar?.path" | ||
62 | (error)="switchToDefaultAvatar($event)" | ||
63 | alt="Avatar" | ||
64 | > | ||
65 | <div> | ||
66 | {{ abuse.reporterAccount.displayName }} | ||
67 | <span class="text-muted">{{ abuse.reporterAccount.nameWithHost }}</span> | ||
68 | </div> | ||
69 | </div> | ||
70 | </a> | ||
71 | </td> | ||
72 | |||
73 | <td *ngIf="!abuse.video.deleted"> | ||
74 | <a [href]="getVideoUrl(abuse)" class="video-table-video-link" [title]="abuse.video.name" target="_blank" rel="noopener noreferrer"> | ||
75 | <div class="video-table-video"> | ||
76 | <div class="video-table-video-image"> | ||
77 | <img [src]="abuse.video.thumbnailPath"> | ||
78 | <span | ||
79 | class="video-table-video-image-label" *ngIf="abuse.count > 1" | ||
80 | i18n-title title="This video has been reported multiple times." | ||
81 | > | ||
82 | {{ abuse.nth }}/{{ abuse.count }} | ||
83 | </span> | ||
84 | </div> | ||
85 | <div class="video-table-video-text"> | ||
86 | <div> | ||
87 | <span *ngIf="!abuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span> | ||
88 | <span *ngIf="abuse.video.blacklisted" i18n-title title="The video was blocked" class="glyphicon glyphicon-ban-circle"></span> | ||
89 | {{ abuse.video.name }} | ||
90 | </div> | ||
91 | <div class="text-muted" i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div> | ||
92 | </div> | ||
93 | </div> | ||
94 | </a> | ||
95 | </td> | ||
96 | |||
97 | <td *ngIf="abuse.video.deleted" class="c-hand" [pRowToggler]="abuse"> | ||
98 | <div class="video-table-video" i18n-title title="Video was deleted"> | ||
99 | <div class="video-table-video-image"> | ||
100 | <span i18n>Deleted</span> | ||
101 | </div> | ||
102 | <div class="video-table-video-text"> | ||
103 | <div> | ||
104 | {{ abuse.video.name }} | ||
105 | <span class="glyphicon glyphicon-trash"></span> | ||
106 | </div> | ||
107 | <div class="text-muted" i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div> | ||
108 | </div> | ||
109 | </div> | ||
110 | </td> | ||
111 | |||
112 | <td class="c-hand" [pRowToggler]="abuse">{{ abuse.createdAt | date: 'short' }}</td> | ||
113 | |||
114 | <td class="c-hand video-abuse-states" [pRowToggler]="abuse"> | ||
115 | <span *ngIf="isAbuseAccepted(abuse)" [title]="abuse.state.label" class="glyphicon glyphicon-ok"></span> | ||
116 | <span *ngIf="isAbuseRejected(abuse)" [title]="abuse.state.label" class="glyphicon glyphicon-remove"></span> | ||
117 | <span *ngIf="abuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="abuse.moderationComment" class="glyphicon glyphicon-comment"></span> | ||
118 | </td> | ||
119 | |||
120 | <td class="action-cell"> | ||
121 | <my-action-dropdown | ||
122 | [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body" | ||
123 | i18n-label label="Actions" [actions]="abuseActions" [entry]="abuse" | ||
124 | ></my-action-dropdown> | ||
125 | </td> | ||
126 | </tr> | ||
127 | </ng-template> | ||
128 | |||
129 | <ng-template pTemplate="rowexpansion" let-abuse> | ||
130 | <tr> | ||
131 | <td class="expand-cell" colspan="6"> | ||
132 | <my-abuse-details [abuse]="abuse"></my-abuse-details> | ||
133 | </td> | ||
134 | </tr> | ||
135 | </ng-template> | ||
136 | |||
137 | <ng-template pTemplate="emptymessage"> | ||
138 | <tr> | ||
139 | <td colspan="6"> | ||
140 | <div class="no-results"> | ||
141 | <ng-container *ngIf="search" i18n>No video abuses found matching current filters.</ng-container> | ||
142 | <ng-container *ngIf="!search" i18n>No video abuses found.</ng-container> | ||
143 | </div> | ||
144 | </td> | ||
145 | </tr> | ||
146 | </ng-template> | ||
147 | </p-table> | ||
148 | |||
149 | <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal> | ||