]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
Improve admin tables row expand
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-abuse-list / video-abuse-list.component.html
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
19 <td class="expand-cell">
20 <span class="expander" i18n-ngbTooltip ngbTooltip="More information" [pRowToggler]="videoAbuse">
21 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
22 </span>
23 </td>
24
25 <td>
26 <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Go to the account" target="_blank" rel="noopener noreferrer">
27 {{ createByString(videoAbuse.reporterAccount) }}
28 </a>
29 </td>
30
31 <td>{{ videoAbuse.createdAt }}</td>
32
33 <td>
34 <a [href]="getVideoUrl(videoAbuse)" i18n-title title="Go to the video" target="_blank" rel="noopener noreferrer">
35 {{ videoAbuse.video.name }}
36 </a>
37 </td>
38
39 <td>
40 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
41 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
42 </td>
43
44 <td class="action-cell">
45 <my-action-dropdown placement="bottom-right" i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"></my-action-dropdown>
46 </td>
47 </tr>
48 </ng-template>
49
50 <ng-template pTemplate="rowexpansion" let-videoAbuse>
51 <tr>
52 <td class="moderation-expanded" colspan="6">
53 <div>
54 <span i18n class="moderation-expanded-label">Reason:</span>
55 <span class="moderation-expanded-text" [innerHTML]="videoAbuse.reasonHtml"></span>
56 </div>
57 <div *ngIf="videoAbuse.moderationComment">
58 <span i18n class="moderation-expanded-label">Moderation comment:</span>
59 <span class="moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
60 </div>
61 </td>
62 </tr>
63 </ng-template>
64 </p-table>
65
66 <my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>