]>
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 | ||
f1273314 | 8 | <em>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" | |
16 | > | |
17 | <ng-template pTemplate="caption"> | |
18 | <div class="caption"> | |
19 | <div class="ml-auto"> | |
20 | <div class="input-group has-feedback has-clear"> | |
21 | <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body"> | |
22 | <div class="input-group-text" ngbDropdownToggle> | |
23 | <span class="caret" aria-haspopup="menu" role="button"></span> | |
24 | </div> | |
25 | ||
26 | <div role="menu" ngbDropdownMenu> | |
27 | <h6 class="dropdown-header" i18n>Advanced comments filters</h6> | |
28 | <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:true' }" class="dropdown-item" i18n>Local comments</a> | |
29 | <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:false' }" class="dropdown-item" i18n>Remote comments</a> | |
30 | </div> | |
31 | </div> | |
32 | <input | |
33 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
f1273314 | 34 | (keyup)="onInputSearch($event)" |
0f8d00e3 C |
35 | > |
36 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a> | |
37 | <span class="sr-only" i18n>Clear filters</span> | |
38 | </div> | |
39 | </div> | |
40 | </div> | |
41 | </ng-template> | |
42 | ||
43 | <ng-template pTemplate="header"> | |
44 | <tr> | |
45 | <th style="width: 40px"></th> | |
7706b370 | 46 | <th style="width: 150px;"></th> |
f1273314 C |
47 | <th style="width: 300px" i18n>Account</th> |
48 | <th style="width: 300px" i18n>Video</th> | |
49 | <th i18n>Comment</th> | |
0f8d00e3 | 50 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th> |
0f8d00e3 C |
51 | </tr> |
52 | </ng-template> | |
53 | ||
54 | <ng-template pTemplate="body" let-videoComment let-expanded="expanded"> | |
55 | <tr> | |
56 | <td class="expand-cell c-hand" [pRowToggler]="videoComment" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body"> | |
57 | <span class="expander"> | |
58 | <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> | |
59 | </span> | |
60 | </td> | |
61 | ||
7706b370 C |
62 | <td class="action-cell"> |
63 | <my-action-dropdown | |
64 | [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body" | |
65 | i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment" | |
66 | ></my-action-dropdown> | |
67 | </td> | |
68 | ||
0f8d00e3 | 69 | <td> |
f1273314 C |
70 | <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> |
71 | <div class="chip two-lines"> | |
72 | <img | |
73 | class="avatar" | |
74 | [src]="videoComment.accountAvatarUrl" | |
75 | alt="" | |
76 | > | |
77 | <div> | |
78 | {{ videoComment.account.displayName }} | |
79 | <span>{{ videoComment.by }}</span> | |
80 | </div> | |
81 | </div> | |
82 | </a> | |
0f8d00e3 C |
83 | </td> |
84 | ||
f1273314 C |
85 | <td class="video"> |
86 | <em i18n>Commented video</em> | |
87 | ||
88 | <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a> | |
0f8d00e3 C |
89 | </td> |
90 | ||
f1273314 | 91 | <td class="comment-html"> |
0f8d00e3 C |
92 | <div [innerHTML]="videoComment.textHtml"></div> |
93 | </td> | |
94 | ||
95 | <td>{{ videoComment.createdAt | date: 'short' }}</td> | |
0f8d00e3 C |
96 | </tr> |
97 | </ng-template> | |
98 | ||
99 | <ng-template pTemplate="rowexpansion" let-videoComment> | |
100 | <tr> | |
101 | <td class="expand-cell" colspan="5"> | |
102 | <div [innerHTML]="videoComment.textHtml"></div> | |
103 | </td> | |
104 | </tr> | |
105 | </ng-template> | |
106 | ||
107 | <ng-template pTemplate="emptymessage"> | |
108 | <tr> | |
109 | <td colspan="5"> | |
110 | <div class="no-results"> | |
111 | <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container> | |
112 | <ng-container *ngIf="!search" i18n>No comments found.</ng-container> | |
113 | </div> | |
114 | </td> | |
115 | </tr> | |
116 | </ng-template> | |
117 | </p-table> | |
118 |