]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
Implement video comment list in admin
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-comment-list / video-comment-list.component.html
1 <h1>
2 <my-global-icon iconName="cross" aria-hidden="true"></my-global-icon>
3 <ng-container i18n>Video comments</ng-container>
4 </h1>
5
6 this view does show comments from muted accounts so you can delete them
7
8 <p-table
9 [value]="comments" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
10 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
11 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
12 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments"
13 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
14 >
15 <ng-template pTemplate="caption">
16 <div class="caption">
17 <div class="ml-auto">
18 <div class="input-group has-feedback has-clear">
19 <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body">
20 <div class="input-group-text" ngbDropdownToggle>
21 <span class="caret" aria-haspopup="menu" role="button"></span>
22 </div>
23
24 <div role="menu" ngbDropdownMenu>
25 <h6 class="dropdown-header" i18n>Advanced comments filters</h6>
26 <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:true' }" class="dropdown-item" i18n>Local comments</a>
27 <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:false' }" class="dropdown-item" i18n>Remote comments</a>
28 </div>
29 </div>
30 <input
31 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
32 (keyup)="onSearch($event)"
33 >
34 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a>
35 <span class="sr-only" i18n>Clear filters</span>
36 </div>
37 </div>
38 </div>
39 </ng-template>
40
41 <ng-template pTemplate="header">
42 <tr>
43 <th style="width: 40px"></th>
44 <th style="width: 100px;" i18n>Account</th>
45 <th style="width: 100px;" i18n>Video</th>
46 <th style="width: 100px;" i18n>Comment</th>
47 <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
48 <th style="width: 150px;"></th>
49 </tr>
50 </ng-template>
51
52 <ng-template pTemplate="body" let-videoComment let-expanded="expanded">
53 <tr>
54 <td class="expand-cell c-hand" [pRowToggler]="videoComment" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
55 <span class="expander">
56 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
57 </span>
58 </td>
59
60 <td>
61 {{ videoComment.by }}
62 </td>
63
64 <td>
65 {{ videoComment.video.name }}
66 </td>
67
68 <td>
69 <div [innerHTML]="videoComment.textHtml"></div>
70 </td>
71
72 <td>{{ videoComment.createdAt | date: 'short' }}</td>
73
74 <td class="action-cell">
75 <my-action-dropdown
76 [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
77 i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
78 ></my-action-dropdown>
79 </td>
80 </tr>
81 </ng-template>
82
83 <ng-template pTemplate="rowexpansion" let-videoComment>
84 <tr>
85 <td class="expand-cell" colspan="5">
86 <div [innerHTML]="videoComment.textHtml"></div>
87 </td>
88 </tr>
89 </ng-template>
90
91 <ng-template pTemplate="emptymessage">
92 <tr>
93 <td colspan="5">
94 <div class="no-results">
95 <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container>
96 <ng-container *ngIf="!search" i18n>No comments found.</ng-container>
97 </div>
98 </td>
99 </tr>
100 </ng-template>
101 </p-table>
102