]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
Add ability to bulk delete comments
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-comment-list / video-comment-list.component.html
CommitLineData
0f8d00e3 1<h1>
f1273314 2 <my-global-icon iconName="message-circle" aria-hidden="true"></my-global-icon>
0f8d00e3 3 <ng-container i18n>Video comments</ng-container>
f1273314
C
4
5 <my-feed [syndicationItems]="syndicationItems"></my-feed>
0f8d00e3
C
6</h1>
7
f1273314 8<em>This view also shows comments from muted accounts.</em>
0f8d00e3
C
9
10<p-table
11 [value]="comments" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
13 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
14 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments"
15 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
93991770 16 [(selection)]="selectedComments"
0f8d00e3
C
17>
18 <ng-template pTemplate="caption">
19 <div class="caption">
93991770
C
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
0f8d00e3
C
28 <div class="ml-auto">
29 <div class="input-group has-feedback has-clear">
30 <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body">
31 <div class="input-group-text" ngbDropdownToggle>
32 <span class="caret" aria-haspopup="menu" role="button"></span>
33 </div>
34
35 <div role="menu" ngbDropdownMenu>
36 <h6 class="dropdown-header" i18n>Advanced comments filters</h6>
37 <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:true' }" class="dropdown-item" i18n>Local comments</a>
38 <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:false' }" class="dropdown-item" i18n>Remote comments</a>
39 </div>
40 </div>
41 <input
42 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
5ed46c1b 43 (keyup)="onSearch($event)"
0f8d00e3
C
44 >
45 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a>
46 <span class="sr-only" i18n>Clear filters</span>
47 </div>
48 </div>
49 </div>
50 </ng-template>
51
52 <ng-template pTemplate="header">
53 <tr>
93991770
C
54 <th style="width: 40px">
55 <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
56 </th>
0f8d00e3 57 <th style="width: 40px"></th>
7706b370 58 <th style="width: 150px;"></th>
f1273314
C
59 <th style="width: 300px" i18n>Account</th>
60 <th style="width: 300px" i18n>Video</th>
61 <th i18n>Comment</th>
0f8d00e3 62 <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
0f8d00e3
C
63 </tr>
64 </ng-template>
65
66 <ng-template pTemplate="body" let-videoComment let-expanded="expanded">
93991770
C
67 <tr [pSelectableRow]="videoComment">
68
69 <td class="checkbox-cell">
70 <p-tableCheckbox [value]="videoComment"></p-tableCheckbox>
71 </td>
72
0f8d00e3
C
73 <td class="expand-cell c-hand" [pRowToggler]="videoComment" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
74 <span class="expander">
75 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
76 </span>
77 </td>
78
7706b370
C
79 <td class="action-cell">
80 <my-action-dropdown
81 [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
82 i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
83 ></my-action-dropdown>
84 </td>
85
0f8d00e3 86 <td>
f1273314
C
87 <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
88 <div class="chip two-lines">
89 <img
90 class="avatar"
91 [src]="videoComment.accountAvatarUrl"
92 alt=""
93 >
94 <div>
95 {{ videoComment.account.displayName }}
96 <span>{{ videoComment.by }}</span>
97 </div>
98 </div>
99 </a>
0f8d00e3
C
100 </td>
101
f1273314
C
102 <td class="video">
103 <em i18n>Commented video</em>
104
105 <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
0f8d00e3
C
106 </td>
107
f1273314 108 <td class="comment-html">
0f8d00e3
C
109 <div [innerHTML]="videoComment.textHtml"></div>
110 </td>
111
112 <td>{{ videoComment.createdAt | date: 'short' }}</td>
0f8d00e3
C
113 </tr>
114 </ng-template>
115
116 <ng-template pTemplate="rowexpansion" let-videoComment>
117 <tr>
118 <td class="expand-cell" colspan="5">
119 <div [innerHTML]="videoComment.textHtml"></div>
120 </td>
121 </tr>
122 </ng-template>
123
124 <ng-template pTemplate="emptymessage">
125 <tr>
126 <td colspan="5">
127 <div class="no-results">
128 <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container>
129 <ng-container *ngIf="!search" i18n>No comments found.</ng-container>
130 </div>
131 </td>
132 </tr>
133 </ng-template>
134</p-table>
135