]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
Add reportee stats for deleted videos
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-abuse-list / video-abuse-list.component.html
CommitLineData
ab998f7b 1<p-table
36004aa7 2 [value]="videoAbuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
9b4241e3 3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true"
2bc9bd08 4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
45c14ae1 5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
f595d394 6>
844db39e
RK
7 <ng-template pTemplate="caption">
8 <div class="caption">
9 <div class="ml-auto">
10 <input
11 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
12 (keyup)="onSearch($event)"
13 >
14 </div>
15 </div>
16 </ng-template>
17
ab998f7b 18 <ng-template pTemplate="header">
2bc9bd08
RK
19 <tr> <!-- header -->
20 <th style="width: 40px;"></th>
9b4241e3 21 <th style="width: 20%;" pResizableColumn i18n>Reporter</th>
b1d40cff 22 <th i18n>Video</th>
0251197e 23 <th style="width: 190px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
f0d4e7eb 24 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
af5767ff 25 <th style="width: 120px;"></th>
ab998f7b
C
26 </tr>
27 </ng-template>
28
efc9e845 29 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
ab998f7b 30 <tr>
2bc9bd08
RK
31 <td class="c-hand" [pRowToggler]="videoAbuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
32 <span class="expander">
efc9e845
C
33 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
34 </span>
35 </td>
36
19a3b914 37 <td>
d6af8146
RK
38 <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
39 <div class="chip two-lines">
40 <img
41 class="avatar"
d3840613 42 [src]="videoAbuse.reporterAccount.avatar?.path"
d6af8146
RK
43 (error)="switchToDefaultAvatar($event)"
44 alt="Avatar"
45 >
46 <div>
47 {{ videoAbuse.reporterAccount.displayName }}
48 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
49 </div>
50 </div>
19a3b914
C
51 </a>
52 </td>
efc9e845 53
844db39e 54 <td *ngIf="!videoAbuse.video.deleted">
aeb1bed9
RK
55 <a [href]="getVideoUrl(videoAbuse)" class="video-table-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
56 <div class="video-table-video">
57 <div class="video-table-video-image">
5fd4ca00
RK
58 <img [src]="videoAbuse.video.thumbnailPath">
59 <span
aeb1bed9 60 class="video-table-video-image-label" *ngIf="videoAbuse.count > 1"
5fd4ca00 61 i18n-title title="This video has been reported multiple times."
0251197e
RK
62 >
63 {{ videoAbuse.nth }}/{{ videoAbuse.count }}
64 </span>
5fd4ca00 65 </div>
aeb1bed9 66 <div class="video-table-video-text">
86521a67
RK
67 <div>
68 {{ videoAbuse.video.name }}
844db39e 69 <span *ngIf="!videoAbuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
86521a67
RK
70 <span *ngIf="videoAbuse.video.blacklisted" i18n-title title="Video was blacklisted" class="glyphicon glyphicon-ban-circle"></span>
71 </div>
0251197e 72 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
86521a67
RK
73 </div>
74 </div>
19a3b914 75 </a>
ab998f7b 76 </td>
efc9e845 77
844db39e 78 <td *ngIf="videoAbuse.video.deleted" class="c-hand" [pRowToggler]="videoAbuse">
aeb1bed9 79 <div class="video-table-video" i18n-title title="Video was deleted">
0251197e
RK
80 <div class="video-table-video-image">
81 <span i18n>Deleted</span>
82 </div>
aeb1bed9 83 <div class="video-table-video-text">
844db39e
RK
84 <div>
85 {{ videoAbuse.video.name }}
86 <span class="glyphicon glyphicon-trash"></span>
87 </div>
0251197e 88 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
844db39e
RK
89 </div>
90 </div>
91 </td>
92
93 <td class="c-hand" [pRowToggler]="videoAbuse">{{ videoAbuse.createdAt }}</td>
9b4241e3 94
68d19a0a 95 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
f0d4e7eb
C
96 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
97 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
5fd4ca00 98 <span *ngIf="videoAbuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
f0d4e7eb
C
99 </td>
100
efc9e845 101 <td class="action-cell">
5fd4ca00
RK
102 <my-action-dropdown
103 [ngClass]="{ 'show': expanded }" placement="bottom-right auto" container="body"
104 i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"
105 ></my-action-dropdown>
efc9e845
C
106 </td>
107 </tr>
108 </ng-template>
109
110 <ng-template pTemplate="rowexpansion" let-videoAbuse>
83b5fe9c 111 <tr>
d6af8146 112 <td class="expand-cell" colspan="6">
5fd4ca00 113 <div class="d-flex moderation-expanded">
0251197e 114 <!-- report left part (report details) -->
d6af8146 115 <div class="col-8">
0251197e
RK
116
117 <!-- report metadata -->
d6af8146 118 <div class="d-flex">
5fd4ca00
RK
119 <span class="col-3 moderation-expanded-label" i18n>Reporter</span>
120 <span class="col-9 moderation-expanded-text">
121 <div class="chip">
122 <img
123 class="avatar"
124 [src]="videoAbuse.reporterAccount.avatar.path"
125 (error)="switchToDefaultAvatar($event)"
126 alt="Avatar"
127 >
128 <div>
129 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
130 </div>
131 </div>
36004aa7 132 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': videoAbuse.reporterAccount.displayName }" class="ml-auto text-muted video-details-links" i18n>
5fd4ca00
RK
133 {videoAbuse.countReportsForReporter, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReporter }} reports}}<span class="ml-1 glyphicon glyphicon-flag"></span>
134 </a>
135 </span>
136 </div>
0251197e 137
5fd4ca00
RK
138 <div class="d-flex">
139 <span class="col-3 moderation-expanded-label" i18n>Reportee</span>
140 <span class="col-9 moderation-expanded-text">
141 <div class="chip">
142 <img
143 class="avatar"
144 [src]="videoAbuse.video.channel.ownerAccount?.avatar.path"
145 (error)="switchToDefaultAvatar($event)"
146 alt="Avatar"
147 >
148 <div>
149 <span class="text-muted">{{ videoAbuse.video.channel.ownerAccount ? createByString(videoAbuse.video.channel.ownerAccount) : '' }}</span>
150 </div>
151 </div>
efa012ed 152 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': videoAbuse.video.channel.ownerAccount.displayName }" class="ml-auto text-muted video-details-links" i18n>
5fd4ca00
RK
153 {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}}<span class="ml-1 glyphicon glyphicon-flag"></span>
154 </a>
155 </span>
156 </div>
0251197e 157
5fd4ca00
RK
158 <div class="d-flex">
159 <span class="col-3 moderation-expanded-label" i18n>Updated</span>
aeb1bed9 160 <time class="col-9 moderation-expanded-text video-details-date-updated">{{ videoAbuse.updatedAt | date: 'medium' }}</time>
5fd4ca00
RK
161 </div>
162
163 <!-- report text -->
164 <div class="mt-3 d-flex">
b8cf27c0 165 <span class="col-3 moderation-expanded-label" i18n>Report #{{ videoAbuse.id }}</span>
d6af8146
RK
166 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
167 </div>
0251197e 168
d6af8146 169 <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
5fd4ca00 170 <span class="col-3 moderation-expanded-label" i18n>Note</span>
d6af8146
RK
171 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
172 </div>
0251197e 173
d6af8146 174 </div>
45c14ae1 175
0251197e 176 <!-- report right part (video details) -->
d6af8146 177 <div class="col-4">
68d19a0a 178 <div class="screenratio">
86521a67 179 <div *ngIf="videoAbuse.video.deleted || videoAbuse.video.blacklisted">
0251197e
RK
180 <span i18n *ngIf="videoAbuse.video.deleted">The video was deleted</span>
181 <span i18n *ngIf="!videoAbuse.video.deleted">The video was blacklisted</span>
68d19a0a 182 </div>
86521a67 183 <div *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" [innerHTML]="videoAbuse.embedHtml"></div>
68d19a0a 184 </div>
d6af8146 185 </div>
83b5fe9c
FA
186 </div>
187 </td>
188 </tr>
ab998f7b 189 </ng-template>
d3840613
RK
190
191 <ng-template pTemplate="emptymessage">
192 <tr>
193 <td colspan="6">
194 <div class="empty-table-message">
195 <ng-container *ngIf="search" i18n>No video abuses found matching current filters.</ng-container>
196 <ng-container *ngIf="!search" i18n>No video abuses found.</ng-container>
197 </div>
198 </td>
199 </tr>
200 </ng-template>
ab998f7b 201</p-table>
efc9e845 202
4707f410 203<my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>