]>
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> |
26b7305a | 8 | <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th> |
b1d40cff C |
9 | <th i18n>Reporter</th> |
10 | <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
11 | <th i18n>Video</th> | |
efc9e845 | 12 | <th style="width: 50px;"></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 | ||
24 | <td> | |
25 | <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span> | |
26 | <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span> | |
27 | </td> | |
28 | ||
19a3b914 | 29 | <td> |
b1d40cff | 30 | <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Go to the account" target="_blank" rel="noopener noreferrer"> |
19a3b914 C |
31 | {{ createByString(videoAbuse.reporterAccount) }} |
32 | </a> | |
33 | </td> | |
efc9e845 | 34 | |
ab998f7b | 35 | <td>{{ videoAbuse.createdAt }}</td> |
efc9e845 | 36 | |
ab998f7b | 37 | <td> |
191764f3 | 38 | <a [href]="getVideoUrl(videoAbuse)" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer"> |
19a3b914 C |
39 | {{ videoAbuse.video.name }} |
40 | </a> | |
ab998f7b | 41 | </td> |
efc9e845 C |
42 | |
43 | <td class="action-cell"> | |
44 | <my-action-dropdown 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> | |
83b5fe9c FA |
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">{{ videoAbuse.reason }}</span> | |
55 | </div> | |
56 | <div *ngIf="videoAbuse.moderationComment"> | |
57 | <span i18n class="moderation-expanded-label">Moderation comment:</span> | |
58 | <span class="moderation-expanded-text">{{ videoAbuse.moderationComment }}</span> | |
59 | </div> | |
60 | </td> | |
61 | </tr> | |
ab998f7b C |
62 | </ng-template> |
63 | </p-table> | |
efc9e845 C |
64 | |
65 | <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal> |