2 [value]="videoAbuses" [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()" [expandedRowKeys]="expandedRows"
8 <ng-template pTemplate="caption">
11 <div class="input-group">
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>
17 <div role="menu" ngbDropdownMenu>
18 <h6 class="dropdown-header" i18n>Filter reports</h6>
21 <div class="dropdown-item" i18n>Reports opened by admins</div>
22 <div class="dropdown-item" i18n>Reports on videos with multiple reports</div>
23 <div class="dropdown-item" i18n>Unassigned reports</div>
25 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:pending' }" class="dropdown-item" i18n>Unsolved reports</a>
26 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:accepted' }" class="dropdown-item" i18n>Accepted reports</a>
27 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:rejected' }" class="dropdown-item" i18n>Refused reports</a>
28 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'is:blacklisted' }" class="dropdown-item" i18n>Reports with blacklisted videos</a>
29 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'is:deleted' }" class="dropdown-item" i18n>Reports with deleted videos</a>
33 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
34 (keyup)="onSearch($event)"
41 <ng-template pTemplate="header">
43 <th style="width: 40px;"></th>
44 <th style="width: 20%;" pResizableColumn i18n>Reporter</th>
46 <th style="width: 140px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
47 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
48 <th style="width: 120px;"></th>
52 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
54 <td class="c-hand" [pRowToggler]="videoAbuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
55 <span class="expander">
56 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
61 <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
62 <div class="chip two-lines">
65 [src]="videoAbuse.reporterAccount.avatar?.path"
66 (error)="switchToDefaultAvatar($event)"
70 {{ videoAbuse.reporterAccount.displayName }}
71 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
77 <td *ngIf="!videoAbuse.video.deleted">
78 <a [href]="getVideoUrl(videoAbuse)" class="video-table-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
79 <div class="video-table-video">
80 <div class="video-table-video-image">
81 <img [src]="videoAbuse.video.thumbnailPath">
83 class="video-table-video-image-label" *ngIf="videoAbuse.count > 1"
84 i18n-title title="This video has been reported multiple times."
86 {{ videoAbuse.nth }}/{{ videoAbuse.count }}
89 <div class="video-table-video-text">
91 {{ videoAbuse.video.name }}
92 <span *ngIf="!videoAbuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
93 <span *ngIf="videoAbuse.video.blacklisted" i18n-title title="Video was blacklisted" class="glyphicon glyphicon-ban-circle"></span>
95 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
101 <td *ngIf="videoAbuse.video.deleted" class="c-hand" [pRowToggler]="videoAbuse">
102 <div class="video-table-video" i18n-title title="Video was deleted">
103 <div class="video-table-video-image">
104 <span i18n>Deleted</span>
106 <div class="video-table-video-text">
108 {{ videoAbuse.video.name }}
109 <span class="glyphicon glyphicon-trash"></span>
111 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
116 <td class="c-hand" [pRowToggler]="videoAbuse">{{ videoAbuse.createdAt | date: 'short' }}</td>
118 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
119 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
120 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
121 <span *ngIf="videoAbuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
124 <td class="action-cell">
126 [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
127 i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"
128 ></my-action-dropdown>
133 <ng-template pTemplate="rowexpansion" let-videoAbuse>
135 <td class="expand-cell" colspan="6">
136 <div class="d-flex moderation-expanded">
137 <!-- report left part (report details) -->
140 <!-- report metadata -->
142 <span class="col-3 moderation-expanded-label" i18n>Reporter</span>
143 <span class="col-9 moderation-expanded-text">
144 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reporter:"' + videoAbuse.reporterAccount.displayName + '"' }" class="chip">
147 [src]="videoAbuse.reporterAccount.avatar.path"
148 (error)="switchToDefaultAvatar($event)"
152 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
155 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:"' + videoAbuse.reporterAccount.displayName + '"' }" class="ml-auto text-muted video-details-links" i18n>
156 {videoAbuse.countReportsForReporter, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReporter }} reports}}<span class="ml-1Â glyphicon glyphicon-flag"></span>
162 <span class="col-3 moderation-expanded-label" i18n>Reportee</span>
163 <span class="col-9 moderation-expanded-text">
167 [src]="videoAbuse.video.channel.ownerAccount?.avatar.path"
168 (error)="switchToDefaultAvatar($event)"
172 <span class="text-muted">{{ videoAbuse.video.channel.ownerAccount ? createByString(videoAbuse.video.channel.ownerAccount) : '' }}</span>
175 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:"' +videoAbuse.video.channel.ownerAccount.displayName + '"' }" class="ml-auto text-muted video-details-links" i18n>
176 {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}}<span class="ml-1Â glyphicon glyphicon-flag"></span>
182 <span class="col-3 moderation-expanded-label" i18n>Updated</span>
183 <time class="col-9 moderation-expanded-text video-details-date-updated">{{ videoAbuse.updatedAt | date: 'medium' }}</time>
187 <div class="mt-3 d-flex">
188 <span class="col-3 moderation-expanded-label" i18n>Report #{{ videoAbuse.id }}</span>
189 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
192 <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
193 <span class="col-3 moderation-expanded-label" i18n>Note</span>
194 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
199 <!-- report right part (video details) -->
201 <div class="screenratio">
202 <div *ngIf="videoAbuse.video.deleted || videoAbuse.video.blacklisted">
203 <span i18n *ngIf="videoAbuse.video.deleted">The video was deleted</span>
204 <span i18n *ngIf="!videoAbuse.video.deleted">The video was blacklisted</span>
206 <div *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" [innerHTML]="videoAbuse.embedHtml"></div>
214 <ng-template pTemplate="emptymessage">
217 <div class="empty-table-message">
218 <ng-container *ngIf="search" i18n>No video abuses found matching current filters.</ng-container>
219 <ng-container *ngIf="!search" i18n>No video abuses found.</ng-container>
226 <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>