blob: b0d8131bfaa1266e3ff766021ccadb1220d10d25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
<h1>
<my-global-icon iconName="message-circle" aria-hidden="true"></my-global-icon>
<ng-container i18n>Video comments</ng-container>
<my-feed [syndicationItems]="syndicationItems"></my-feed>
</h1>
<em i18n>This view also shows comments from muted accounts.</em>
<p-table
[value]="comments" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start"
[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"
[expandedRowKeys]="expandedRows" [(selection)]="selectedRows"
>
<ng-template pTemplate="caption">
<div class="caption">
<div>
<my-action-dropdown
*ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
[actions]="bulkActions" [entry]="selectedRows"
>
</my-action-dropdown>
</div>
<div class="ms-auto right-form">
<my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
<my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button>
</div>
</div>
</ng-template>
<ng-template pTemplate="header">
<tr>
<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 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 [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">
<my-action-dropdown
[ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
></my-action-dropdown>
</td>
<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">
<my-actor-avatar [actor]="videoComment.account" actorType="account" size="32"></my-actor-avatar>
<div>
{{ videoComment.account.displayName }}
<span>{{ videoComment.by }}</span>
</div>
</div>
</a>
</td>
<td class="video">
<em i18n>Commented video</em>
<a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
</td>
<td class="comment-html c-hand" [pRowToggler]="videoComment">
<div [innerHTML]="videoComment.textHtml"></div>
</td>
<td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td>
</tr>
</ng-template>
<ng-template pTemplate="rowexpansion" let-videoComment>
<tr>
<td class="expand-cell" colspan="5">
<div [innerHTML]="videoComment.textHtml"></div>
</td>
</tr>
</ng-template>
<ng-template pTemplate="emptymessage">
<tr>
<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>
</div>
</td>
</tr>
</ng-template>
</p-table>
|