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"
7 <ng-template pTemplate="caption">
10 <div class="input-group">
11 <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body">
12 <div class="input-group-text" ngbDropdownToggle>
13 <span class="caret" aria-haspopup="menu" role="button"></span>
16 <div role="menu" ngbDropdownMenu>
17 <h6 class="dropdown-header" i18n>Filter reports</h6>
20 <div class="dropdown-item" i18n>Reports opened by admins</div>
21 <div class="dropdown-item" i18n>Reports on videos with multiple reports</div>
22 <div class="dropdown-item" i18n>Unassigned reports</div>
24 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:pending' }" class="dropdown-item" i18n>Unsolved reports</a>
25 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:accepted' }" class="dropdown-item" i18n>Accepted reports</a>
26 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:rejected' }" class="dropdown-item" i18n>Refused reports</a>
27 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'is:blocked' }" class="dropdown-item" i18n>Reports with blocked videos</a>
28 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'is:deleted' }" class="dropdown-item" i18n>Reports with deleted videos</a>
32 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
33 (keyup)="onSearch($event)"
40 <ng-template pTemplate="header">
42 <th style="width: 40px;"></th>
43 <th style="width: 20%;" pResizableColumn i18n>Reporter</th>
45 <th style="width: 140px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
46 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
47 <th style="width: 120px;"></th>
51 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
53 <td class="c-hand" [pRowToggler]="videoAbuse" 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>
60 <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
61 <div class="chip two-lines">
64 [src]="videoAbuse.reporterAccount.avatar?.path"
65 (error)="switchToDefaultAvatar($event)"
69 {{ videoAbuse.reporterAccount.displayName }}
70 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
76 <td *ngIf="!videoAbuse.video.deleted">
77 <a [href]="getVideoUrl(videoAbuse)" class="video-table-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
78 <div class="video-table-video">
79 <div class="video-table-video-image">
80 <img [src]="videoAbuse.video.thumbnailPath">
82 class="video-table-video-image-label" *ngIf="videoAbuse.count > 1"
83 i18n-title title="This video has been reported multiple times."
85 {{ videoAbuse.nth }}/{{ videoAbuse.count }}
88 <div class="video-table-video-text">
90 {{ videoAbuse.video.name }}
91 <span *ngIf="!videoAbuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
92 <span *ngIf="videoAbuse.video.blacklisted" i18n-title title="Video was blacklisted" class="glyphicon glyphicon-ban-circle"></span>
94 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
100 <td *ngIf="videoAbuse.video.deleted" class="c-hand" [pRowToggler]="videoAbuse">
101 <div class="video-table-video" i18n-title title="Video was deleted">
102 <div class="video-table-video-image">
103 <span i18n>Deleted</span>
105 <div class="video-table-video-text">
107 {{ videoAbuse.video.name }}
108 <span class="glyphicon glyphicon-trash"></span>
110 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
115 <td class="c-hand" [pRowToggler]="videoAbuse">{{ videoAbuse.createdAt | date: 'short' }}</td>
117 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
118 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
119 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
120 <span *ngIf="videoAbuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
123 <td class="action-cell">
125 [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
126 i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"
127 ></my-action-dropdown>
132 <ng-template pTemplate="rowexpansion" let-videoAbuse>
134 <td class="expand-cell" colspan="6">
135 <div class="d-flex moderation-expanded">
136 <!-- report left part (report details) -->
139 <!-- report metadata -->
141 <span class="col-3 moderation-expanded-label" i18n>Reporter</span>
142 <span class="col-9 moderation-expanded-text">
143 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reporter:"' + videoAbuse.reporterAccount.displayName + '"' }" class="chip">
146 [src]="videoAbuse.reporterAccount.avatar.path"
147 (error)="switchToDefaultAvatar($event)"
151 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
154 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:"' + videoAbuse.reporterAccount.displayName + '"' }" class="ml-auto text-muted video-details-links" i18n>
155 {videoAbuse.countReportsForReporter, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReporter }} reports}}<span class="ml-1Â glyphicon glyphicon-flag"></span>
161 <span class="col-3 moderation-expanded-label" i18n>Reportee</span>
162 <span class="col-9 moderation-expanded-text">
166 [src]="videoAbuse.video.channel.ownerAccount?.avatar.path"
167 (error)="switchToDefaultAvatar($event)"
171 <span class="text-muted">{{ videoAbuse.video.channel.ownerAccount ? createByString(videoAbuse.video.channel.ownerAccount) : '' }}</span>
174 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:"' +videoAbuse.video.channel.ownerAccount.displayName + '"' }" class="ml-auto text-muted video-details-links" i18n>
175 {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}}<span class="ml-1Â glyphicon glyphicon-flag"></span>
181 <span class="col-3 moderation-expanded-label" i18n>Updated</span>
182 <time class="col-9 moderation-expanded-text video-details-date-updated">{{ videoAbuse.updatedAt | date: 'medium' }}</time>
186 <div class="mt-3 d-flex">
187 <span class="col-3 moderation-expanded-label" i18n>Report #{{ videoAbuse.id }}</span>
188 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
191 <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
192 <span class="col-3 moderation-expanded-label" i18n>Note</span>
193 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
198 <!-- report right part (video details) -->
200 <div class="screenratio">
201 <div *ngIf="videoAbuse.video.deleted || videoAbuse.video.blacklisted">
202 <span i18n *ngIf="videoAbuse.video.deleted">The video was deleted</span>
203 <span i18n *ngIf="!videoAbuse.video.deleted">The video was blacklisted</span>
205 <div *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" [innerHTML]="videoAbuse.embedHtml"></div>
213 <ng-template pTemplate="emptymessage">
216 <div class="empty-table-message">
217 <ng-container *ngIf="search" i18n>No video abuses found matching current filters.</ng-container>
218 <ng-container *ngIf="!search" i18n>No video abuses found.</ng-container>
225 <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>