]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
b6cec9c5165725cb98a4ea4be905b751d0deeaf6
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-comment-list / video-comment-list.component.html
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" [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"
16 [(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 <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..."
43 (keyup)="onSearch($event)"
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>
54 <th style="width: 40px">
55 <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
56 </th>
57 <th style="width: 40px"></th>
58 <th style="width: 150px;"></th>
59 <th style="width: 300px" i18n>Account</th>
60 <th style="width: 300px" i18n>Video</th>
61 <th i18n>Comment</th>
62 <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
63 </tr>
64 </ng-template>
65
66 <ng-template pTemplate="body" let-videoComment let-expanded="expanded">
67 <tr [pSelectableRow]="videoComment">
68
69 <td class="checkbox-cell">
70 <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
71 </td>
72
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
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
86 <td>
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 <my-actor-avatar [account]="videoComment.account"></my-actor-avatar>
90 <div>
91 {{ videoComment.account.displayName }}
92 <span>{{ videoComment.by }}</span>
93 </div>
94 </div>
95 </a>
96 </td>
97
98 <td class="video">
99 <em i18n>Commented video</em>
100
101 <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
102 </td>
103
104 <td class="comment-html c-hand" [pRowToggler]="videoComment">
105 <div [innerHTML]="videoComment.textHtml"></div>
106 </td>
107
108 <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td>
109 </tr>
110 </ng-template>
111
112 <ng-template pTemplate="rowexpansion" let-videoComment>
113 <tr>
114 <td class="expand-cell" colspan="5">
115 <div [innerHTML]="videoComment.textHtml"></div>
116 </td>
117 </tr>
118 </ng-template>
119
120 <ng-template pTemplate="emptymessage">
121 <tr>
122 <td colspan="7">
123 <div class="no-results">
124 <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container>
125 <ng-container *ngIf="!search" i18n>No comments found.</ng-container>
126 </div>
127 </td>
128 </tr>
129 </ng-template>
130 </p-table>
131