]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
Make sure a report doesn't get deleted upon the deletion of its video
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-abuse-list / video-abuse-list.component.html
CommitLineData
ab998f7b
C
1<p-table
2 [value]="videoAbuses" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
efc9e845 3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
2bc9bd08 4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
45c14ae1 5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
f595d394 6>
ab998f7b 7 <ng-template pTemplate="header">
2bc9bd08
RK
8 <tr> <!-- header -->
9 <th style="width: 40px;"></th>
b1d40cff 10 <th i18n>Reporter</th>
2bc9bd08 11 <th style="width: 200px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
b1d40cff 12 <th i18n>Video</th>
f0d4e7eb 13 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
af5767ff 14 <th style="width: 120px;"></th>
ab998f7b
C
15 </tr>
16 </ng-template>
17
efc9e845 18 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
ab998f7b 19 <tr>
2bc9bd08
RK
20 <td class="c-hand" [pRowToggler]="videoAbuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
21 <span class="expander">
efc9e845
C
22 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
23 </span>
24 </td>
25
19a3b914 26 <td>
d6af8146
RK
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>
19a3b914
C
40 </a>
41 </td>
efc9e845 42
ab998f7b 43 <td>{{ videoAbuse.createdAt }}</td>
efc9e845 44
ab998f7b 45 <td>
2bc9bd08 46 <a [href]="getVideoUrl(videoAbuse)" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
19a3b914
C
47 {{ videoAbuse.video.name }}
48 </a>
ab998f7b 49 </td>
efc9e845 50
68d19a0a 51 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
f0d4e7eb
C
52 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
53 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
68d19a0a 54 <span *ngIf="videoAbuse.moderationComment" [title]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
f0d4e7eb
C
55 </td>
56
efc9e845 57 <td class="action-cell">
bb152476 58 <my-action-dropdown placement="bottom-right auto" i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"></my-action-dropdown>
efc9e845
C
59 </td>
60 </tr>
61 </ng-template>
62
63 <ng-template pTemplate="rowexpansion" let-videoAbuse>
83b5fe9c 64 <tr>
d6af8146
RK
65 <td class="expand-cell" colspan="6">
66 <div class="d-flex">
67 <div class="col-8">
68 <div class="d-flex">
69 <span class="col-3 moderation-expanded-label" i18n>Reason:</span>
70 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
71 </div>
72 <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
73 <span class="col-3 moderation-expanded-label" i18n>Note:</span>
74 <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
75 </div>
76 </div>
45c14ae1 77
d6af8146 78 <div class="col-4">
68d19a0a
RK
79 <div class="screenratio">
80 <div *ngIf="videoAbuse.video.deleted">
81 <span i18n>The video was {{ videoAbuse.video.deleted ? 'deleted' : 'blacklisted' }}</span>
82 </div>
83 <div *ngIf="!videoAbuse.video.deleted" [innerHTML]="videoAbuse.embedHtml"></div>
84 </div>
d6af8146 85 </div>
83b5fe9c
FA
86 </div>
87 </td>
88 </tr>
ab998f7b
C
89 </ng-template>
90</p-table>
efc9e845 91
4707f410 92<my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>