]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
e2c08f910d1d6f0ed5fe18478952dd1c342eda67
[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="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
18 <ng-template pTemplate="header">
19 <tr> <!-- header -->
20 <th style="width: 40px;"></th>
21 <th style="width: 20%;" pResizableColumn i18n>Reporter</th>
22 <th i18n>Video</th>
23 <th style="width:190px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
24 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
25 <th style="width: 120px;"></th>
26 </tr>
27 </ng-template>
28
29 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
30 <tr>
31 <td class="c-hand" [pRowToggler]="videoAbuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
32 <span class="expander">
33 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
34 </span>
35 </td>
36
37 <td>
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"
42 [src]="videoAbuse.reporterAccount.avatar.path"
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>
51 </a>
52 </td>
53
54 <td *ngIf="!videoAbuse.video.deleted">
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">
58 <img [src]="videoAbuse.video.thumbnailPath">
59 <span
60 class="video-table-video-image-label" *ngIf="videoAbuse.count > 1"
61 i18n-title title="This video has been reported multiple times."
62 >{{ videoAbuse.nth }}/{{ videoAbuse.count }}</span>
63 </div>
64 <div class="video-table-video-text">
65 <div>
66 {{ videoAbuse.video.name }}
67 <span *ngIf="!videoAbuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
68 <span *ngIf="videoAbuse.video.blacklisted" i18n-title title="Video was blacklisted" class="glyphicon glyphicon-ban-circle"></span>
69 </div>
70 <div class="text-muted">by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
71 </div>
72 </div>
73 </a>
74 </td>
75
76 <td *ngIf="videoAbuse.video.deleted" class="c-hand" [pRowToggler]="videoAbuse">
77 <div class="video-table-video" i18n-title title="Video was deleted">
78 <div class="video-table-video-image"><span i18n>Deleted</span></div>
79 <div class="video-table-video-text">
80 <div>
81 {{ videoAbuse.video.name }}
82 <span class="glyphicon glyphicon-trash"></span>
83 </div>
84 <div class="text-muted">by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
85 </div>
86 </div>
87 </td>
88
89 <td class="c-hand" [pRowToggler]="videoAbuse">{{ videoAbuse.createdAt }}</td>
90
91 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
92 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
93 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
94 <span *ngIf="videoAbuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
95 </td>
96
97 <td class="action-cell">
98 <my-action-dropdown
99 [ngClass]="{ 'show': expanded }" placement="bottom-right auto" container="body"
100 i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"
101 ></my-action-dropdown>
102 </td>
103 </tr>
104 </ng-template>
105
106 <ng-template pTemplate="rowexpansion" let-videoAbuse>
107 <tr>
108 <td class="expand-cell" colspan="6">
109 <div class="d-flex moderation-expanded">
110 <!-- report metadata -->
111 <div class="col-8">
112 <div class="d-flex">
113 <span class="col-3 moderation-expanded-label" i18n>Reporter</span>
114 <span class="col-9 moderation-expanded-text">
115 <div class="chip">
116 <img
117 class="avatar"
118 [src]="videoAbuse.reporterAccount.avatar.path"
119 (error)="switchToDefaultAvatar($event)"
120 alt="Avatar"
121 >
122 <div>
123 <span class="text-muted">{{ createByString(videoAbuse.reporterAccount) }}</span>
124 </div>
125 </div>
126 <a routerLink="/admin/moderation/video-abuses/list" class="ml-auto text-muted video-details-links" i18n>
127 {videoAbuse.countReportsForReporter, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReporter }} reports}}<span class="ml-1 glyphicon glyphicon-flag"></span>
128 </a>
129 </span>
130 </div>
131 <div class="d-flex">
132 <span class="col-3 moderation-expanded-label" i18n>Reportee</span>
133 <span class="col-9 moderation-expanded-text">
134 <div class="chip">
135 <img
136 class="avatar"
137 [src]="videoAbuse.video.channel.ownerAccount?.avatar.path"
138 (error)="switchToDefaultAvatar($event)"
139 alt="Avatar"
140 >
141 <div>
142 <span class="text-muted">{{ videoAbuse.video.channel.ownerAccount ? createByString(videoAbuse.video.channel.ownerAccount) : '' }}</span>
143 </div>
144 </div>
145 <a routerLink="/admin/moderation/video-abuses/list" class="ml-auto text-muted video-details-links" *ngIf="!videoAbuse.video.deleted" i18n>
146 {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}}<span class="ml-1 glyphicon glyphicon-flag"></span>
147 </a>
148 </span>
149 </div>
150 <div class="d-flex">
151 <span class="col-3 moderation-expanded-label" i18n>Updated</span>
152 <time class="col-9 moderation-expanded-text video-details-date-updated">{{ videoAbuse.updatedAt | date: 'medium' }}</time>
153 </div>
154
155 <!-- report text -->
156 <div class="mt-3 d-flex">
157 <span class="col-3 moderation-expanded-label" i18n>Report</span>
158 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
159 </div>
160 <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
161 <span class="col-3 moderation-expanded-label" i18n>Note</span>
162 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
163 </div>
164 </div>
165
166 <div class="col-4">
167 <div class="screenratio">
168 <div *ngIf="videoAbuse.video.deleted || videoAbuse.video.blacklisted">
169 <span i18n>The video was {{ videoAbuse.video.deleted ? 'deleted' : 'blacklisted' }}</span>
170 </div>
171 <div *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" [innerHTML]="videoAbuse.embedHtml"></div>
172 </div>
173 </div>
174 </div>
175 </td>
176 </tr>
177 </ng-template>
178 </p-table>
179
180 <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>