<my-feed [syndicationItems]="syndicationItems"></my-feed>
</h1>
-<em>This view also shows comments from muted accounts.</em>
+<em i18n>This view also shows comments from muted accounts.</em>
<p-table
- [value]="comments" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
- [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
+ [value]="comments" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
+ [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id"
+ [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true"
[showCurrentPageReport]="true" i18n-currentPageReportTemplate
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments"
- (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
+ [expandedRowKeys]="expandedRows" [(selection)]="selectedComments"
>
<ng-template pTemplate="caption">
<div class="caption">
- <div class="ml-auto">
- <div class="input-group has-feedback has-clear">
- <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body">
- <div class="input-group-text" ngbDropdownToggle>
- <span class="caret" aria-haspopup="menu" role="button"></span>
- </div>
+ <div>
+ <my-action-dropdown
+ *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
+ [actions]="bulkCommentActions" [entry]="selectedComments"
+ >
+ </my-action-dropdown>
+ </div>
- <div role="menu" ngbDropdownMenu>
- <h6 class="dropdown-header" i18n>Advanced comments filters</h6>
- <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:true' }" class="dropdown-item" i18n>Local comments</a>
- <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:false' }" class="dropdown-item" i18n>Remote comments</a>
- </div>
- </div>
- <input
- type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
- (keyup)="onSearch($event)"
- >
- <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a>
- <span class="sr-only" i18n>Clear filters</span>
- </div>
+ <div class="ml-auto">
+ <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
</div>
</div>
</ng-template>
<ng-template pTemplate="header">
<tr>
- <th style="width: 40px"></th>
+ <th style="width: 40px;">
+ <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
+ </th>
+ <th style="width: 40px;"></th>
<th style="width: 150px;"></th>
- <th style="width: 300px" i18n>Account</th>
- <th style="width: 300px" i18n>Video</th>
+ <th style="width: 300px;" i18n>Account</th>
+ <th style="width: 300px;" i18n>Video</th>
<th i18n>Comment</th>
<th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-videoComment let-expanded="expanded">
- <tr>
- <td class="expand-cell c-hand" [pRowToggler]="videoComment" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
- <span class="expander">
- <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
- </span>
+ <tr [pSelectableRow]="videoComment">
+
+ <td class="checkbox-cell">
+ <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
+ </td>
+
+ <td class="expand-cell" [pRowToggler]="videoComment">
+ <my-table-expander-icon i18n-ngbTooltip ngbTooltip="See full comment" [expanded]="expanded"></my-table-expander-icon>
</td>
<td class="action-cell">
<td>
<a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
<div class="chip two-lines">
- <img
- class="avatar"
- [src]="videoComment.accountAvatarUrl"
- alt=""
- >
- <div>
+ <my-actor-avatar [account]="videoComment.account"></my-actor-avatar>
+ <div>
{{ videoComment.account.displayName }}
<span>{{ videoComment.by }}</span>
</div>
<a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
</td>
- <td class="comment-html">
+ <td class="comment-html c-hand" [pRowToggler]="videoComment">
<div [innerHTML]="videoComment.textHtml"></div>
</td>
- <td>{{ videoComment.createdAt | date: 'short' }}</td>
+ <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td>
</tr>
</ng-template>
<ng-template pTemplate="emptymessage">
<tr>
- <td colspan="5">
+ <td colspan="7">
<div class="no-results">
<ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container>
<ng-container *ngIf="!search" i18n>No comments found.</ng-container>