]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-abuse-list/abuse-list-table.component.html
Reduce advanced search input debounce time
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-abuse-list / abuse-list-table.component.html
CommitLineData
94148c90
C
1<p-table
2 [value]="abuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
6c53d8bf 3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true"
94148c90
C
4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
6 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
7>
8 <ng-template pTemplate="caption">
9 <div class="caption">
10 <div class="ml-auto">
1fd61899 11 <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)" (resetTableFilter)="resetTableFilter()"></my-advanced-input-filter>
94148c90
C
12 </div>
13 </div>
14 </ng-template>
15
16 <ng-template pTemplate="header">
17 <tr> <!-- header -->
18 <th style="width: 40px;"></th>
7706b370 19 <th style="width: 150px;"></th>
94148c90
C
20 <th *ngIf="isAdminView()" style="width: 20%;" pResizableColumn i18n>Reporter</th>
21 <th i18n>Video/Comment/Account</th>
22 <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
23 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
24 <th i18n style="width: 80px;">Messages</th>
d573926e 25 <th i18n *ngIf="isAdminView()" style="width: 100px;">Internal note</th>
94148c90
C
26 </tr>
27 </ng-template>
28
29 <ng-template pTemplate="body" let-expanded="expanded" let-abuse>
30 <tr>
7706b370 31 <td class="expand-cell c-hand" [pRowToggler]="abuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
94148c90
C
32 <span class="expander">
33 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
34 </span>
35 </td>
36
7706b370
C
37 <td class="action-cell">
38 <my-action-dropdown
39 [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
40 i18n-label label="Actions" [actions]="abuseActions" [entry]="abuse"
41 ></my-action-dropdown>
42 </td>
43
94148c90
C
44 <td *ngIf="isAdminView()">
45 <a *ngIf="abuse.reporterAccount" [href]="abuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
46 <div class="chip two-lines">
746018f6 47 <my-actor-avatar [account]="abuse.reporterAccount"></my-actor-avatar>
94148c90
C
48 <div>
49 {{ abuse.reporterAccount.displayName }}
50 <span>{{ abuse.reporterAccount.nameWithHost }}</span>
51 </div>
52 </div>
53 </a>
54
55 <span i18n *ngIf="!abuse.reporterAccount">
56 Deleted account
57 </span>
58 </td>
59
60 <ng-container *ngIf="abuse.video">
61
62 <td *ngIf="!abuse.video.deleted">
63 <a [href]="getVideoUrl(abuse)" class="table-video-link" [title]="abuse.video.name" target="_blank" rel="noopener noreferrer">
64 <div class="table-video">
65 <div class="table-video-image">
66 <img [src]="abuse.video.thumbnailPath">
67 <span
68 class="table-video-image-label" *ngIf="abuse.count > 1"
69 i18n-title title="This video has been reported multiple times."
70 >
71 {{ abuse.nth }}/{{ abuse.count }}
72 </span>
73 </div>
74
75 <div class="table-video-text">
76 <div>
77 <span *ngIf="!abuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
78 <span *ngIf="abuse.video.blacklisted" i18n-title title="The video was blocked" class="glyphicon glyphicon-ban-circle"></span>
79 {{ abuse.video.name }}
80 </div>
81 <div i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div>
82 </div>
83 </div>
84 </a>
85 </td>
86
87 <td *ngIf="abuse.video.deleted" class="c-hand" [pRowToggler]="abuse">
88 <div class="table-video" i18n-title title="Video was deleted">
89 <div class="table-video-image">
90 <span i18n>Deleted</span>
91 </div>
92
93 <div class="table-video-text">
94 <div>
95 {{ abuse.video.name }}
96 <span class="glyphicon glyphicon-trash"></span>
97 </div>
98 <div i18n>by {{ abuse.video.channel?.displayName }} on {{ abuse.video.channel?.host }} </div>
99 </div>
100 </div>
101 </td>
102 </ng-container>
103
104 <ng-container *ngIf="abuse.comment">
105 <td>
106 <a [href]="getCommentUrl(abuse)" [innerHTML]="abuse.truncatedCommentHtml" class="table-comment-link"
107 [title]="abuse.comment.video.name" target="_blank" rel="noopener noreferrer"
108 ></a>
109
110 <div class="comment-flagged-account" *ngIf="abuse.flaggedAccount">by {{ abuse.flaggedAccount.displayName }}</div>
111 </td>
112 </ng-container>
113
114 <ng-container *ngIf="!abuse.comment && !abuse.video">
115 <td *ngIf="abuse.flaggedAccount">
116 <a [href]="getAccountUrl(abuse)" class="table-account-link" target="_blank" rel="noopener noreferrer">
117 <span>{{ abuse.flaggedAccount.displayName }}</span>
118
119 <span class="account-flagged-handle">{{ abuse.flaggedAccount.nameWithHostForced }}</span>
120 </a>
121 </td>
122
123 <td i18n *ngIf="!abuse.flaggedAccount">
124 Account deleted
125 </td>
126
127 </ng-container>
128
94148c90
C
129 <td class="c-hand" [pRowToggler]="abuse">{{ abuse.createdAt | date: 'short' }}</td>
130
131 <td class="c-hand abuse-states" [pRowToggler]="abuse">
132 <span *ngIf="isAbuseAccepted(abuse)" [title]="abuse.state.label" class="glyphicon glyphicon-ok"></span>
133 <span *ngIf="isAbuseRejected(abuse)" [title]="abuse.state.label" class="glyphicon glyphicon-remove"></span>
94148c90
C
134 </td>
135
136 <td class="c-hand abuse-messages" (click)="openAbuseMessagesModal(abuse)">
137 <ng-container *ngIf="isLocalAbuse(abuse)">
138 {{ abuse.countMessages }}
139
140 <my-global-icon iconName="message-circle"></my-global-icon>
141 </ng-container>
142 </td>
143
d573926e
C
144 <td *ngIf="isAdminView()" class="internal-note" container="body" placement="left auto" [ngbTooltip]="abuse.moderationComment">
145 {{ abuse.moderationComment }}
146 </td>
94148c90
C
147 </tr>
148 </ng-template>
149
150 <ng-template pTemplate="rowexpansion" let-abuse>
151 <tr>
71ab65d0 152 <td class="expand-cell" colspan="8">
1fd61899 153 <my-abuse-details [abuse]="abuse" [isAdminView]="isAdminView()"></my-abuse-details>
94148c90
C
154 </td>
155 </tr>
156 </ng-template>
157
158 <ng-template pTemplate="emptymessage">
159 <tr>
160 <td colspan="6">
161 <div class="no-results">
162 <ng-container *ngIf="search" i18n>No abuses found matching current filters.</ng-container>
163 <ng-container *ngIf="!search" i18n>No abuses found.</ng-container>
164 </div>
165 </td>
166 </tr>
167 </ng-template>
168</p-table>
169
170<my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>
171<my-abuse-message-modal #abuseMessagesModal [isAdminView]="isAdminView()" (countMessagesUpdated)="onCountMessagesUpdated($event)"></my-abuse-message-modal>