]>
Commit | Line | Data |
---|---|---|
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 | ||
e0436741 | 8 | <em i18n>This view also shows comments from muted accounts.</em> |
0f8d00e3 C |
9 | |
10 | <p-table | |
0667dbaf C |
11 | [value]="comments" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start" |
12 | [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" | |
807a2280 | 13 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true" |
0f8d00e3 C |
14 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
15 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments" | |
cd940f40 | 16 | [expandedRowKeys]="expandedRows" [(selection)]="selectedRows" |
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" | |
cd940f40 | 23 | [actions]="bulkActions" [entry]="selectedRows" |
93991770 C |
24 | > |
25 | </my-action-dropdown> | |
26 | </div> | |
27 | ||
4c8749cb | 28 | <div class="ms-auto right-form"> |
2e46eb97 | 29 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> |
fbd573e5 C |
30 | |
31 | <my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button> | |
0f8d00e3 C |
32 | </div> |
33 | </div> | |
34 | </ng-template> | |
35 | ||
36 | <ng-template pTemplate="header"> | |
37 | <tr> | |
1378c0d3 | 38 | <th style="width: 40px;"> |
1916c966 | 39 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> |
93991770 | 40 | </th> |
1378c0d3 | 41 | <th style="width: 40px;"></th> |
7706b370 | 42 | <th style="width: 150px;"></th> |
1378c0d3 C |
43 | <th style="width: 300px;" i18n>Account</th> |
44 | <th style="width: 300px;" i18n>Video</th> | |
f1273314 | 45 | <th i18n>Comment</th> |
0f8d00e3 | 46 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> |
0f8d00e3 C |
47 | </tr> |
48 | </ng-template> | |
49 | ||
50 | <ng-template pTemplate="body" let-videoComment let-expanded="expanded"> | |
93991770 C |
51 | <tr [pSelectableRow]="videoComment"> |
52 | ||
53 | <td class="checkbox-cell"> | |
1916c966 | 54 | <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> |
93991770 C |
55 | </td> |
56 | ||
e4611b54 C |
57 | <td class="expand-cell" [pRowToggler]="videoComment"> |
58 | <my-table-expander-icon i18n-ngbTooltip ngbTooltip="See full comment" [expanded]="expanded"></my-table-expander-icon> | |
0f8d00e3 C |
59 | </td> |
60 | ||
7706b370 C |
61 | <td class="action-cell"> |
62 | <my-action-dropdown | |
63 | [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body" | |
64 | i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment" | |
65 | ></my-action-dropdown> | |
66 | </td> | |
67 | ||
0f8d00e3 | 68 | <td> |
f1273314 C |
69 | <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> |
70 | <div class="chip two-lines"> | |
87fdea2f | 71 | <my-actor-avatar [actor]="videoComment.account" actorType="account" size="32"></my-actor-avatar> |
fbdcd4ec | 72 | <div> |
f1273314 C |
73 | {{ videoComment.account.displayName }} |
74 | <span>{{ videoComment.by }}</span> | |
75 | </div> | |
76 | </div> | |
77 | </a> | |
0f8d00e3 C |
78 | </td> |
79 | ||
f1273314 C |
80 | <td class="video"> |
81 | <em i18n>Commented video</em> | |
82 | ||
83 | <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a> | |
0f8d00e3 C |
84 | </td> |
85 | ||
c5dcdab3 | 86 | <td class="comment-html c-hand" [pRowToggler]="videoComment"> |
0f8d00e3 C |
87 | <div [innerHTML]="videoComment.textHtml"></div> |
88 | </td> | |
89 | ||
c5dcdab3 | 90 | <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td> |
0f8d00e3 C |
91 | </tr> |
92 | </ng-template> | |
93 | ||
94 | <ng-template pTemplate="rowexpansion" let-videoComment> | |
95 | <tr> | |
4b70c278 | 96 | <td class="expand-cell" myAutoColspan> |
0f8d00e3 C |
97 | <div [innerHTML]="videoComment.textHtml"></div> |
98 | </td> | |
99 | </tr> | |
100 | </ng-template> | |
101 | ||
102 | <ng-template pTemplate="emptymessage"> | |
103 | <tr> | |
4b70c278 | 104 | <td myAutoColspan> |
0f8d00e3 C |
105 | <div class="no-results"> |
106 | <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container> | |
107 | <ng-container *ngIf="!search" i18n>No comments found.</ng-container> | |
108 | </div> | |
109 | </td> | |
110 | </tr> | |
111 | </ng-template> | |
112 | </p-table> | |
113 |