]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
2204bb371c5ffb0ded2bc7c4fb51d1d514404fb3
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-abuse-list / video-abuse-list.component.html
1 <p-table
2 [value]="videoAbuses" [lazy]="true" [paginator]="true" [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 >
7 <ng-template pTemplate="header">
8 <tr> <!-- header -->
9 <th style="width: 40px;"></th>
10 <th style="width: 20%;" pResizableColumn i18n>Reporter</th>
11 <th i18n>Video</th>
12 <th style="width:190px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
13 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
14 <th style="width: 120px;"></th>
15 </tr>
16 </ng-template>
17
18 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
19 <tr>
20 <td class="c-hand" [pRowToggler]="videoAbuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
21 <span class="expander">
22 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
23 </span>
24 </td>
25
26 <td>
27 <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
28 <div class="chip two-lines">
29 <img
30 class="avatar"
31 [src]="videoAbuse.reporterAccount.avatar.path"
32 (error)="switchToDefaultAvatar($event)"
33 alt="Avatar"
34 >
35 <div>
36 {{ videoAbuse.reporterAccount.displayName }}
37 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
38 </div>
39 </div>
40 </a>
41 </td>
42
43 <td>
44 <a [href]="getVideoUrl(videoAbuse)" class="video-abuse-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
45 <div class="video-abuse-video">
46 <div class="video-abuse-video-image">
47 <img *ngIf="!videoAbuse.video.deleted" [src]="videoAbuse.video.thumbnailPath">
48 <span *ngIf="videoAbuse.video.deleted" i18n>Deleted</span>
49 </div>
50 <div class="video-abuse-video-text">
51 <div>
52 {{ videoAbuse.video.name }}
53 <span *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
54 <span *ngIf="videoAbuse.video.deleted" i18n-title title="Video was deleted" class="glyphicon glyphicon-trash"></span>
55 <span *ngIf="videoAbuse.video.blacklisted" i18n-title title="Video was blacklisted" class="glyphicon glyphicon-ban-circle"></span>
56 </div>
57 <div class="text-muted">by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
58 </div>
59 </div>
60 </a>
61 </td>
62
63 <td>{{ videoAbuse.createdAt }}</td>
64
65 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
66 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
67 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
68 <span *ngIf="videoAbuse.moderationComment" [title]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
69 </td>
70
71 <td class="action-cell">
72 <my-action-dropdown placement="bottom-right auto" container="body" i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"></my-action-dropdown>
73 </td>
74 </tr>
75 </ng-template>
76
77 <ng-template pTemplate="rowexpansion" let-videoAbuse>
78 <tr>
79 <td class="expand-cell" colspan="6">
80 <div class="d-flex">
81 <div class="col-8">
82 <div class="d-flex">
83 <span class="col-3 moderation-expanded-label" i18n>Reason:</span>
84 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
85 </div>
86 <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
87 <span class="col-3 moderation-expanded-label" i18n>Note:</span>
88 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
89 </div>
90 </div>
91
92 <div class="col-4">
93 <div class="screenratio">
94 <div *ngIf="videoAbuse.video.deleted || videoAbuse.video.blacklisted">
95 <span i18n>The video was {{ videoAbuse.video.deleted ? 'deleted' : 'blacklisted' }}</span>
96 </div>
97 <div *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" [innerHTML]="videoAbuse.embedHtml"></div>
98 </div>
99 </div>
100 </div>
101 </td>
102 </tr>
103 </ng-template>
104 </p-table>
105
106 <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>