]>
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 | |
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 | 54 | <th style="width: 40px"> |
1916c966 | 55 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> |
93991770 | 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"> | |
1916c966 | 70 | <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> |
93991770 C |
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"> | |
fbdcd4ec | 89 | <my-account-avatar [account]="videoComment.account"></my-account-avatar> |
90 | <div> | |
f1273314 C |
91 | {{ videoComment.account.displayName }} |
92 | <span>{{ videoComment.by }}</span> | |
93 | </div> | |
94 | </div> | |
95 | </a> | |
0f8d00e3 C |
96 | </td> |
97 | ||
f1273314 C |
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> | |
0f8d00e3 C |
102 | </td> |
103 | ||
c5dcdab3 | 104 | <td class="comment-html c-hand" [pRowToggler]="videoComment"> |
0f8d00e3 C |
105 | <div [innerHTML]="videoComment.textHtml"></div> |
106 | </td> | |
107 | ||
c5dcdab3 | 108 | <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td> |
0f8d00e3 C |
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> | |
3f6441e0 | 122 | <td colspan="7"> |
0f8d00e3 C |
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 |