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