]>
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" |
f595d394 | 4 | > |
ab998f7b C |
5 | <ng-template pTemplate="header"> |
6 | <tr> | |
efc9e845 | 7 | <th style="width: 40px"></th> |
b1d40cff C |
8 | <th i18n>Reporter</th> |
9 | <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
10 | <th i18n>Video</th> | |
f0d4e7eb | 11 | <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th> |
af5767ff | 12 | <th style="width: 120px;"></th> |
ab998f7b C |
13 | </tr> |
14 | </ng-template> | |
15 | ||
efc9e845 | 16 | <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse> |
ab998f7b | 17 | <tr> |
efc9e845 | 18 | <td> |
83b5fe9c | 19 | <span class="expander" [pRowToggler]="videoAbuse"> |
efc9e845 C |
20 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> |
21 | </span> | |
22 | </td> | |
23 | ||
19a3b914 | 24 | <td> |
b1d40cff | 25 | <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Go to the account" target="_blank" rel="noopener noreferrer"> |
19a3b914 C |
26 | {{ createByString(videoAbuse.reporterAccount) }} |
27 | </a> | |
28 | </td> | |
efc9e845 | 29 | |
ab998f7b | 30 | <td>{{ videoAbuse.createdAt }}</td> |
efc9e845 | 31 | |
ab998f7b | 32 | <td> |
191764f3 | 33 | <a [href]="getVideoUrl(videoAbuse)" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer"> |
19a3b914 C |
34 | {{ videoAbuse.video.name }} |
35 | </a> | |
ab998f7b | 36 | </td> |
efc9e845 | 37 | |
f0d4e7eb C |
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 | ||
efc9e845 | 43 | <td class="action-cell"> |
4707f410 | 44 | <my-action-dropdown placement="bottom-right" i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"></my-action-dropdown> |
efc9e845 C |
45 | </td> |
46 | </tr> | |
47 | </ng-template> | |
48 | ||
49 | <ng-template pTemplate="rowexpansion" let-videoAbuse> | |
83b5fe9c FA |
50 | <tr> |
51 | <td class="moderation-expanded" colspan="6"> | |
52 | <div> | |
53 | <span i18n class="moderation-expanded-label">Reason:</span> | |
1506307f | 54 | <span class="moderation-expanded-text" [innerHTML]="toHtml(videoAbuse.reason)"></span> |
83b5fe9c FA |
55 | </div> |
56 | <div *ngIf="videoAbuse.moderationComment"> | |
57 | <span i18n class="moderation-expanded-label">Moderation comment:</span> | |
1506307f | 58 | <span class="moderation-expanded-text" [innerHTML]="toHtml(videoAbuse.moderationComment)"></span> |
83b5fe9c FA |
59 | </div> |
60 | </td> | |
61 | </tr> | |
ab998f7b C |
62 | </ng-template> |
63 | </p-table> | |
efc9e845 | 64 | |
4707f410 | 65 | <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal> |