]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
rename blacklist to block/blocklist, merge block and auto-block views
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-abuse-list / video-abuse-list.component.html
CommitLineData
ab998f7b 1<p-table
36004aa7 2 [value]="videoAbuses" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
9b4241e3 3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true"
2bc9bd08 4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
45c14ae1 5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} reports"
25a42e29 6 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
f595d394 7>
844db39e
RK
8 <ng-template pTemplate="caption">
9 <div class="caption">
10 <div class="ml-auto">
25a42e29 11 <div class="input-group has-feedback has-clear">
0d3a2982
RK
12 <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body">
13 <div class="input-group-text" ngbDropdownToggle>
14 <span class="caret" aria-haspopup="menu" role="button"></span>
15 </div>
16
17 <div role="menu" ngbDropdownMenu>
25a42e29 18 <h6 class="dropdown-header" i18n>Advanced report filters</h6>
0d3a2982
RK
19 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:pending' }" class="dropdown-item" i18n>Unsolved reports</a>
20 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:accepted' }" class="dropdown-item" i18n>Accepted reports</a>
21 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'state:rejected' }" class="dropdown-item" i18n>Refused reports</a>
5baee5fc 22 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'videoIs:blacklisted' }" class="dropdown-item" i18n>Reports with blocked videos</a>
feb34f6b 23 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'videoIs:deleted' }" class="dropdown-item" i18n>Reports with deleted videos</a>
0d3a2982
RK
24 </div>
25 </div>
26 <input
27 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
25a42e29 28 (keyup)="onAbuseSearch($event)"
0d3a2982 29 >
25a42e29
RK
30 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a>
31 <span class="sr-only" i18n>Clear filters</span>
0d3a2982 32 </div>
844db39e
RK
33 </div>
34 </div>
35 </ng-template>
36
ab998f7b 37 <ng-template pTemplate="header">
2bc9bd08
RK
38 <tr> <!-- header -->
39 <th style="width: 40px;"></th>
9b4241e3 40 <th style="width: 20%;" pResizableColumn i18n>Reporter</th>
b1d40cff 41 <th i18n>Video</th>
df4c603d 42 <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
f0d4e7eb 43 <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
572bf73b 44 <th style="width: 150px;"></th>
ab998f7b
C
45 </tr>
46 </ng-template>
47
efc9e845 48 <ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
ab998f7b 49 <tr>
2bc9bd08
RK
50 <td class="c-hand" [pRowToggler]="videoAbuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
51 <span class="expander">
efc9e845
C
52 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
53 </span>
54 </td>
55
19a3b914 56 <td>
d6af8146
RK
57 <a [href]="videoAbuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
58 <div class="chip two-lines">
59 <img
60 class="avatar"
d3840613 61 [src]="videoAbuse.reporterAccount.avatar?.path"
d6af8146
RK
62 (error)="switchToDefaultAvatar($event)"
63 alt="Avatar"
64 >
65 <div>
66 {{ videoAbuse.reporterAccount.displayName }}
25a42e29 67 <span class="text-muted">{{ videoAbuse.reporterAccount.nameWithHost }}</span>
d6af8146
RK
68 </div>
69 </div>
19a3b914
C
70 </a>
71 </td>
efc9e845 72
844db39e 73 <td *ngIf="!videoAbuse.video.deleted">
aeb1bed9
RK
74 <a [href]="getVideoUrl(videoAbuse)" class="video-table-video-link" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
75 <div class="video-table-video">
76 <div class="video-table-video-image">
5fd4ca00
RK
77 <img [src]="videoAbuse.video.thumbnailPath">
78 <span
aeb1bed9 79 class="video-table-video-image-label" *ngIf="videoAbuse.count > 1"
5fd4ca00 80 i18n-title title="This video has been reported multiple times."
0251197e
RK
81 >
82 {{ videoAbuse.nth }}/{{ videoAbuse.count }}
83 </span>
5fd4ca00 84 </div>
aeb1bed9 85 <div class="video-table-video-text">
86521a67 86 <div>
844db39e 87 <span *ngIf="!videoAbuse.video.blacklisted" class="glyphicon glyphicon-new-window"></span>
5baee5fc
RK
88 <span *ngIf="videoAbuse.video.blacklisted" i18n-title title="The video was blocked" class="glyphicon glyphicon-ban-circle"></span>
89 {{ videoAbuse.video.name }}
86521a67 90 </div>
0251197e 91 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
86521a67
RK
92 </div>
93 </div>
19a3b914 94 </a>
ab998f7b 95 </td>
efc9e845 96
844db39e 97 <td *ngIf="videoAbuse.video.deleted" class="c-hand" [pRowToggler]="videoAbuse">
aeb1bed9 98 <div class="video-table-video" i18n-title title="Video was deleted">
0251197e
RK
99 <div class="video-table-video-image">
100 <span i18n>Deleted</span>
101 </div>
aeb1bed9 102 <div class="video-table-video-text">
844db39e
RK
103 <div>
104 {{ videoAbuse.video.name }}
105 <span class="glyphicon glyphicon-trash"></span>
106 </div>
0251197e 107 <div class="text-muted" i18n>by {{ videoAbuse.video.channel?.displayName }} on {{ videoAbuse.video.channel?.host }} </div>
844db39e
RK
108 </div>
109 </div>
110 </td>
111
7f979fd8 112 <td class="c-hand" [pRowToggler]="videoAbuse">{{ videoAbuse.createdAt | date: 'short' }}</td>
9b4241e3 113
68d19a0a 114 <td class="c-hand video-abuse-states" [pRowToggler]="videoAbuse">
f0d4e7eb
C
115 <span *ngIf="isVideoAbuseAccepted(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-ok"></span>
116 <span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
5fd4ca00 117 <span *ngIf="videoAbuse.moderationComment" container="body" placement="left auto" [ngbTooltip]="videoAbuse.moderationComment" class="glyphicon glyphicon-comment"></span>
f0d4e7eb
C
118 </td>
119
efc9e845 120 <td class="action-cell">
5fd4ca00 121 <my-action-dropdown
0d3a2982 122 [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
5fd4ca00
RK
123 i18n-label label="Actions" [actions]="videoAbuseActions" [entry]="videoAbuse"
124 ></my-action-dropdown>
efc9e845
C
125 </td>
126 </tr>
127 </ng-template>
128
129 <ng-template pTemplate="rowexpansion" let-videoAbuse>
83b5fe9c 130 <tr>
d6af8146 131 <td class="expand-cell" colspan="6">
801d9571 132 <my-video-abuse-details [videoAbuse]="videoAbuse"></my-video-abuse-details>
83b5fe9c
FA
133 </td>
134 </tr>
ab998f7b 135 </ng-template>
d3840613
RK
136
137 <ng-template pTemplate="emptymessage">
138 <tr>
139 <td colspan="6">
140 <div class="empty-table-message">
141 <ng-container *ngIf="search" i18n>No video abuses found matching current filters.</ng-container>
142 <ng-container *ngIf="!search" i18n>No video abuses found.</ng-container>
143 </div>
144 </td>
145 </tr>
146 </ng-template>
ab998f7b 147</p-table>
efc9e845 148
4707f410 149<my-moderation-comment-modal #moderationCommentModal (commentUpdated)="onModerationCommentUpdated()"></my-moderation-comment-modal>