]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
Add admin view to manage comments
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-comment-list / video-comment-list.component.html
CommitLineData
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>
f1273314
C
46 <th style="width: 300px" i18n>Account</th>
47 <th style="width: 300px" i18n>Video</th>
48 <th i18n>Comment</th>
0f8d00e3
C
49 <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
50 <th style="width: 150px;"></th>
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
62 <td>
f1273314
C
63 <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
64 <div class="chip two-lines">
65 <img
66 class="avatar"
67 [src]="videoComment.accountAvatarUrl"
68 alt=""
69 >
70 <div>
71 {{ videoComment.account.displayName }}
72 <span>{{ videoComment.by }}</span>
73 </div>
74 </div>
75 </a>
0f8d00e3
C
76 </td>
77
f1273314
C
78 <td class="video">
79 <em i18n>Commented video</em>
80
81 <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
0f8d00e3
C
82 </td>
83
f1273314 84 <td class="comment-html">
0f8d00e3
C
85 <div [innerHTML]="videoComment.textHtml"></div>
86 </td>
87
88 <td>{{ videoComment.createdAt | date: 'short' }}</td>
89
90 <td class="action-cell">
91 <my-action-dropdown
92 [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
93 i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
94 ></my-action-dropdown>
95 </td>
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