]>
Commit | Line | Data |
---|---|---|
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 | |
bb152476 | 51 | <td class="c-hand" [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> | |
54 | </td> | |
55 | ||
efc9e845 | 56 | <td class="action-cell"> |
bb152476 | 57 | <my-action-dropdown placement="bottom-right auto" i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"></my-action-dropdown> |
efc9e845 C |
58 | </td> |
59 | </tr> | |
60 | </ng-template> | |
61 | ||
62 | <ng-template pTemplate="rowexpansion" let-videoAbuse> | |
83b5fe9c | 63 | <tr> |
d6af8146 RK |
64 | <td class="expand-cell" colspan="6"> |
65 | <div class="d-flex"> | |
66 | <div class="col-8"> | |
67 | <div class="d-flex"> | |
68 | <span class="col-3 moderation-expanded-label" i18n>Reason:</span> | |
69 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span> | |
70 | </div> | |
71 | <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment"> | |
72 | <span class="col-3 moderation-expanded-label" i18n>Note:</span> | |
73 | <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span> | |
74 | </div> | |
75 | </div> | |
45c14ae1 | 76 | |
d6af8146 RK |
77 | <div class="col-4"> |
78 | <div class="screenratio" [innerHTML]="videoAbuse.embedHtml"></div> | |
79 | </div> | |
83b5fe9c FA |
80 | </div> |
81 | </td> | |
82 | </tr> | |
ab998f7b C |
83 | </ng-template> |
84 | </p-table> | |
efc9e845 | 85 | |
4707f410 | 86 | <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal> |