diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-28 16:27:25 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-28 16:27:25 +0100 |
commit | 5a51ecc2172282786dab47bd874026621554ba6d (patch) | |
tree | 129a6bc40d2f048fd73362e427b75974f040ac5f /client/src/app/+admin/overview/comments/video-comment-list.component.html | |
parent | f1c70a8666e53414f4e604290d35d26ae725b691 (diff) | |
download | PeerTube-5a51ecc2172282786dab47bd874026621554ba6d.tar.gz PeerTube-5a51ecc2172282786dab47bd874026621554ba6d.tar.zst PeerTube-5a51ecc2172282786dab47bd874026621554ba6d.zip |
Move admin comments list in overviews menu
Diffstat (limited to 'client/src/app/+admin/overview/comments/video-comment-list.component.html')
-rw-r--r-- | client/src/app/+admin/overview/comments/video-comment-list.component.html | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.html b/client/src/app/+admin/overview/comments/video-comment-list.component.html new file mode 100644 index 000000000..0dbbbe1cc --- /dev/null +++ b/client/src/app/+admin/overview/comments/video-comment-list.component.html | |||
@@ -0,0 +1,111 @@ | |||
1 | <h1> | ||
2 | <my-global-icon iconName="message-circle" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>Video comments</ng-container> | ||
4 | |||
5 | <my-feed [syndicationItems]="syndicationItems"></my-feed> | ||
6 | </h1> | ||
7 | |||
8 | <em i18n>This view also shows comments from muted accounts.</em> | ||
9 | |||
10 | <p-table | ||
11 | [value]="comments" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | ||
12 | [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" | ||
13 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true" | ||
14 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | ||
15 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments" | ||
16 | [expandedRowKeys]="expandedRows" [(selection)]="selectedComments" | ||
17 | > | ||
18 | <ng-template pTemplate="caption"> | ||
19 | <div class="caption"> | ||
20 | <div> | ||
21 | <my-action-dropdown | ||
22 | *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange" | ||
23 | [actions]="bulkCommentActions" [entry]="selectedComments" | ||
24 | > | ||
25 | </my-action-dropdown> | ||
26 | </div> | ||
27 | |||
28 | <div class="ml-auto"> | ||
29 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> | ||
30 | </div> | ||
31 | </div> | ||
32 | </ng-template> | ||
33 | |||
34 | <ng-template pTemplate="header"> | ||
35 | <tr> | ||
36 | <th style="width: 40px;"> | ||
37 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> | ||
38 | </th> | ||
39 | <th style="width: 40px;"></th> | ||
40 | <th style="width: 150px;"></th> | ||
41 | <th style="width: 300px;" i18n>Account</th> | ||
42 | <th style="width: 300px;" i18n>Video</th> | ||
43 | <th i18n>Comment</th> | ||
44 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> | ||
45 | </tr> | ||
46 | </ng-template> | ||
47 | |||
48 | <ng-template pTemplate="body" let-videoComment let-expanded="expanded"> | ||
49 | <tr [pSelectableRow]="videoComment"> | ||
50 | |||
51 | <td class="checkbox-cell"> | ||
52 | <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> | ||
53 | </td> | ||
54 | |||
55 | <td class="expand-cell" [pRowToggler]="videoComment"> | ||
56 | <my-table-expander-icon i18n-ngbTooltip ngbTooltip="See full comment" [expanded]="expanded"></my-table-expander-icon> | ||
57 | </td> | ||
58 | |||
59 | <td class="action-cell"> | ||
60 | <my-action-dropdown | ||
61 | [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body" | ||
62 | i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment" | ||
63 | ></my-action-dropdown> | ||
64 | </td> | ||
65 | |||
66 | <td> | ||
67 | <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | ||
68 | <div class="chip two-lines"> | ||
69 | <my-actor-avatar [account]="videoComment.account" size="32"></my-actor-avatar> | ||
70 | <div> | ||
71 | {{ videoComment.account.displayName }} | ||
72 | <span>{{ videoComment.by }}</span> | ||
73 | </div> | ||
74 | </div> | ||
75 | </a> | ||
76 | </td> | ||
77 | |||
78 | <td class="video"> | ||
79 | <em i18n>Commented video</em> | ||
80 | |||
81 | <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a> | ||
82 | </td> | ||
83 | |||
84 | <td class="comment-html c-hand" [pRowToggler]="videoComment"> | ||
85 | <div [innerHTML]="videoComment.textHtml"></div> | ||
86 | </td> | ||
87 | |||
88 | <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td> | ||
89 | </tr> | ||
90 | </ng-template> | ||
91 | |||
92 | <ng-template pTemplate="rowexpansion" let-videoComment> | ||
93 | <tr> | ||
94 | <td class="expand-cell" colspan="5"> | ||
95 | <div [innerHTML]="videoComment.textHtml"></div> | ||
96 | </td> | ||
97 | </tr> | ||
98 | </ng-template> | ||
99 | |||
100 | <ng-template pTemplate="emptymessage"> | ||
101 | <tr> | ||
102 | <td colspan="7"> | ||
103 | <div class="no-results"> | ||
104 | <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container> | ||
105 | <ng-container *ngIf="!search" i18n>No comments found.</ng-container> | ||
106 | </div> | ||
107 | </td> | ||
108 | </tr> | ||
109 | </ng-template> | ||
110 | </p-table> | ||
111 | |||