]>
Commit | Line | Data |
---|---|---|
1 | <p-table | |
2 | [value]="videoAbuses" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | |
4 | > | |
5 | <ng-template pTemplate="header"> | |
6 | <tr> | |
7 | <th style="width: 40px"></th> | |
8 | <th i18n>Reporter</th> | |
9 | <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
10 | <th i18n>Video</th> | |
11 | <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th> | |
12 | <th style="width: 120px;"></th> | |
13 | </tr> | |
14 | </ng-template> | |
15 | ||
16 | <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse> | |
17 | <tr> | |
18 | <td class="expand-cell"> | |
19 | <span class="expander" [pRowToggler]="videoAbuse"> | |
20 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | |
21 | </span> | |
22 | </td> | |
23 | ||
24 | <td> | |
25 | <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Go to the account" target="_blank" rel="noopener noreferrer"> | |
26 | {{ createByString(videoAbuse.reporterAccount) }} | |
27 | </a> | |
28 | </td> | |
29 | ||
30 | <td>{{ videoAbuse.createdAt }}</td> | |
31 | ||
32 | <td> | |
33 | <a [href]="getVideoUrl(videoAbuse)" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer"> | |
34 | {{ videoAbuse.video.name }} | |
35 | </a> | |
36 | </td> | |
37 | ||
38 | <td> | |
39 | <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span> | |
40 | <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span> | |
41 | </td> | |
42 | ||
43 | <td class="action-cell"> | |
44 | <my-action-dropdown placement="bottom-right" i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"></my-action-dropdown> | |
45 | </td> | |
46 | </tr> | |
47 | </ng-template> | |
48 | ||
49 | <ng-template pTemplate="rowexpansion" let-videoAbuse> | |
50 | <tr> | |
51 | <td class="moderation-expanded" colspan="6"> | |
52 | <div> | |
53 | <span i18n class="moderation-expanded-label">Reason:</span> | |
54 | <span class="moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span> | |
55 | </div> | |
56 | <div *ngIf="videoAbuse.moderationComment"> | |
57 | <span i18n class="moderation-expanded-label">Moderation comment:</span> | |
58 | <span class="moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span> | |
59 | </div> | |
60 | </td> | |
61 | </tr> | |
62 | </ng-template> | |
63 | </p-table> | |
64 | ||
65 | <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal> |